@nuxt/devtools 0.5.4 → 0.6.0
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/dist/chunks/module-main.mjs +134 -29
- package/dist/chunks/vscode.mjs +5 -2
- package/dist/client/200.html +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/__blank/index.html +7 -0
- package/dist/client/_nuxt/{Badge.ade65c69.js → Badge.bb04dbdf.js} +1 -1
- package/dist/client/_nuxt/CodeSnippets.vue.b3f0f3dc.js +1 -0
- package/dist/client/_nuxt/DrawerRight.vue.48c2c3d6.js +1 -0
- package/dist/client/_nuxt/DurationDisplay.vue.1f2b63ce.js +1 -0
- package/dist/client/_nuxt/FilepathItem.vue.67a3bac2.js +1 -0
- package/dist/client/_nuxt/{HelpFab.vue.1ab4e4f1.js → HelpFab.vue.e0c5b3b9.js} +1 -1
- package/dist/client/_nuxt/LaunchPage.vue.a3f71c42.js +1 -0
- package/dist/client/_nuxt/NCheckbox.vue.56878d59.js +1 -0
- package/dist/client/_nuxt/NCodeBlock.vue.2f00c5a7.js +2 -0
- package/dist/client/_nuxt/NIconButton.vue.afd698ce.js +1 -0
- package/dist/client/_nuxt/NIconTitle.vue.025b1812.js +1 -0
- package/dist/client/_nuxt/NLink.vue.efbf2660.js +1 -0
- package/dist/client/_nuxt/NMarkdown.vue.4a55718e.js +1 -0
- package/dist/client/_nuxt/{NPanelGrids.24e40025.js → NPanelGrids.e209861e.js} +1 -1
- package/dist/client/_nuxt/NSectionBlock.012f83f1.css +1 -0
- package/dist/client/_nuxt/NSectionBlock.a9d6a8bd.js +1 -0
- package/dist/client/_nuxt/NSelect.vue.0258c4d8.js +1 -0
- package/dist/client/_nuxt/NSwitch.vue.774134ee.js +1 -0
- package/dist/client/_nuxt/NTip.vue.b7996913.js +1 -0
- package/dist/client/_nuxt/{Navbar.vue.12ff05d9.js → Navbar.vue.97a344a8.js} +1 -1
- package/dist/client/_nuxt/NpmVersionCheck.vue.5857e84f.js +1 -0
- package/dist/client/_nuxt/{PanelLeftRight.vue.0d3c5a22.js → PanelLeftRight.vue.4252eb45.js} +1 -1
- package/dist/client/_nuxt/StateEditor.vue.a6af1a3f.js +1 -0
- package/dist/client/_nuxt/__blank.f74f0354.js +1 -0
- package/dist/client/_nuxt/analyze-build.d8530c6c.js +1 -0
- package/dist/client/_nuxt/assets.e5e05d1f.js +16 -0
- package/dist/client/_nuxt/{client.d93a636c.js → client.c658398a.js} +1 -1
- package/dist/client/_nuxt/{components.060d9fd5.js → components.c29053f6.js} +27 -27
- package/dist/client/_nuxt/custom-_name_.85ea5a6a.js +1 -0
- package/dist/client/_nuxt/{default.6eda7699.js → default.a568b6bd.js} +1 -1
- package/dist/client/_nuxt/editor.beb173d9.js +1 -0
- package/dist/client/_nuxt/entry.ea777320.css +1 -0
- package/dist/client/_nuxt/entry.eb90118b.js +19 -0
- package/dist/client/_nuxt/{error-404.7bcf1a44.js → error-404.47f56ae7.js} +1 -1
- package/dist/client/_nuxt/{error-500.b67f8091.js → error-500.3d8abd19.js} +1 -1
- package/dist/client/_nuxt/{error-component.5479d89e.js → error-component.97bd3af7.js} +2 -2
- package/dist/client/_nuxt/{full.89a525fd.js → full.039e8e59.js} +1 -1
- package/dist/client/_nuxt/hooks.4df47b77.js +1 -0
- package/dist/client/_nuxt/imports.dd38df5c.js +1 -0
- package/dist/client/_nuxt/{index.b8d7fad0.js → index.2d500b42.js} +1 -1
- package/dist/client/_nuxt/{index.a348e979.js → index.ee7015bb.js} +1 -1
- package/dist/client/_nuxt/json-editor-vue.6b7715bf.js +137 -0
- package/dist/client/_nuxt/{middleware.61ccc755.js → middleware.a6f1dc81.js} +1 -1
- package/dist/client/_nuxt/modules.8de52693.js +4 -0
- package/dist/client/_nuxt/{none.566b9a55.js → none.7a55d586.js} +1 -1
- package/dist/client/_nuxt/nuxt-docs.100caa70.js +1 -0
- package/dist/client/_nuxt/open-graph.ba654e1e.js +3 -0
- package/dist/client/_nuxt/overview.4725a261.js +1 -0
- package/dist/client/_nuxt/pages.46157a67.js +1 -0
- package/dist/client/_nuxt/payload.b59c0588.js +1 -0
- package/dist/client/_nuxt/plugins.6a2cae7a.js +1 -0
- package/dist/client/_nuxt/runtime-configs.4a7ef849.js +1 -0
- package/dist/client/_nuxt/server-routes.2d06f2c7.js +9 -0
- package/dist/client/_nuxt/settings.1b865c96.js +1 -0
- package/dist/client/_nuxt/state-components.ed0b4287.js +1 -0
- package/dist/client/_nuxt/storage.b18c38a9.js +1 -0
- package/dist/client/_nuxt/terminals.195d8588.js +9 -0
- package/dist/client/_nuxt/{terminals.d1dcf297.css → terminals.ae8c3544.css} +1 -1
- package/dist/client/_nuxt/{unocss-runtime.a821baa9.js → unocss-runtime.032bcb78.js} +2 -2
- package/dist/client/_nuxt/{virtual-files.2fc42163.js → virtual-files.5f7c5d81.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/modules/analyze-build/index.html +2 -2
- package/dist/client/modules/assets/index.html +2 -2
- package/dist/client/modules/components/index.html +2 -2
- package/dist/client/modules/hooks/index.html +2 -2
- package/dist/client/modules/imports/index.html +2 -2
- package/dist/client/modules/middleware/index.html +2 -2
- package/dist/client/modules/modules/index.html +2 -2
- package/dist/client/modules/open-graph/index.html +2 -2
- package/dist/client/modules/overview/index.html +2 -2
- package/dist/client/modules/pages/index.html +2 -2
- package/dist/client/modules/payload/index.html +2 -2
- package/dist/client/modules/plugins/index.html +2 -2
- package/dist/client/modules/runtime-configs/index.html +2 -2
- package/dist/client/modules/server-routes/index.html +2 -2
- package/dist/client/modules/storage/index.html +2 -2
- package/dist/client/modules/terminals/index.html +2 -2
- package/dist/client/modules/virtual-files/index.html +2 -2
- package/dist/client/settings/index.html +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/auth/index.html +71 -0
- package/dist/runtime/nitro/inline.d.ts +3 -0
- package/dist/runtime/nitro/inline.mjs +6 -0
- package/dist/runtime/plugins/devtools.client.d.ts +8 -0
- package/dist/runtime/plugins/devtools.client.mjs +73 -8
- package/dist/runtime/plugins/devtools.server.d.ts +2 -0
- package/dist/runtime/plugins/devtools.server.mjs +8 -0
- package/dist/runtime/plugins/view/Frame.vue +31 -228
- package/dist/runtime/plugins/view/FrameBox.vue +167 -0
- package/dist/runtime/plugins/view/Main.vue +360 -0
- package/dist/runtime/plugins/view/client.d.ts +3 -0
- package/dist/runtime/plugins/view/client.mjs +45 -0
- package/dist/runtime/plugins/view/state.d.ts +2 -3
- package/dist/runtime/plugins/view/state.mjs +12 -9
- package/dist/runtime/plugins/view/utils.d.ts +1 -0
- package/dist/runtime/plugins/view/utils.mjs +9 -0
- package/dist/shared/{devtools.345c630c.mjs → devtools.7ab40af4.mjs} +3 -1
- package/dist/types.d.ts +1 -1
- package/package.json +30 -29
- package/dist/client/__inspecting/index.html +0 -7
- package/dist/client/_nuxt/CodeSnippets.vue.0933ada7.js +0 -1
- package/dist/client/_nuxt/DrawerRight.vue.7bc0ac9b.js +0 -1
- package/dist/client/_nuxt/DurationDisplay.vue.d2a5c09b.js +0 -1
- package/dist/client/_nuxt/FilepathItem.vue.a3a55bfd.js +0 -1
- package/dist/client/_nuxt/LaunchPage.vue.dff3dd39.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.cd1637b2.js +0 -1
- package/dist/client/_nuxt/NCodeBlock.vue.d5b2e85d.js +0 -2
- package/dist/client/_nuxt/NIconButton.vue.3defcade.js +0 -1
- package/dist/client/_nuxt/NIconTitle.vue.62b2ff0a.js +0 -1
- package/dist/client/_nuxt/NLink.vue.be635eca.js +0 -1
- package/dist/client/_nuxt/NMarkdown.vue.00fc3014.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.63c19da9.css +0 -1
- package/dist/client/_nuxt/NSectionBlock.eb96beb4.js +0 -1
- package/dist/client/_nuxt/NSelect.vue.7652516b.js +0 -1
- package/dist/client/_nuxt/NSwitch.vue.c07ff0b7.js +0 -1
- package/dist/client/_nuxt/NTip.vue.3fd9b115.js +0 -1
- package/dist/client/_nuxt/NpmVersionCheck.vue.7bc4775a.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.6e8c107a.js +0 -1
- package/dist/client/_nuxt/__inspecting.137e909d.js +0 -1
- package/dist/client/_nuxt/analyze-build.790e4c36.js +0 -1
- package/dist/client/_nuxt/assets.1c0d54b4.js +0 -16
- package/dist/client/_nuxt/custom-_name_.e88f914e.js +0 -1
- package/dist/client/_nuxt/editor.4380b623.js +0 -1
- package/dist/client/_nuxt/entry.34446c1f.js +0 -19
- package/dist/client/_nuxt/entry.bf8a0e33.css +0 -1
- package/dist/client/_nuxt/hooks.99ea2107.js +0 -1
- package/dist/client/_nuxt/imports.29e62250.js +0 -1
- package/dist/client/_nuxt/json-editor-vue.62f947e8.js +0 -137
- package/dist/client/_nuxt/modules.f8953fab.js +0 -4
- package/dist/client/_nuxt/open-graph.26d327ec.js +0 -3
- package/dist/client/_nuxt/overview.4326006b.js +0 -1
- package/dist/client/_nuxt/pages.b234eacb.js +0 -1
- package/dist/client/_nuxt/payload.fbf9b90d.js +0 -1
- package/dist/client/_nuxt/plugins.9c9f9450.js +0 -1
- package/dist/client/_nuxt/runtime-configs.cf5a4a0c.js +0 -1
- package/dist/client/_nuxt/server-routes.7185e439.js +0 -9
- package/dist/client/_nuxt/settings.8603972f.js +0 -1
- package/dist/client/_nuxt/state-components.f564bfa7.js +0 -1
- package/dist/client/_nuxt/storage.4b5872ff.js +0 -1
- package/dist/client/_nuxt/terminals.d263a781.js +0 -9
- package/dist/runtime/plugins/view/Container.vue +0 -97
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CSSProperties } from 'vue'
|
|
3
|
+
import { computed, onMounted, reactive, ref } from 'vue'
|
|
4
|
+
import type { NuxtDevtoolsHostClient } from '../../../types'
|
|
5
|
+
import { state, togglePanel } from './state'
|
|
6
|
+
import { millisecondToHumanreadable, useEventListener } from './utils'
|
|
7
|
+
import FrameBox from './FrameBox.vue'
|
|
8
|
+
|
|
9
|
+
const props = defineProps<{
|
|
10
|
+
client: NuxtDevtoolsHostClient
|
|
11
|
+
}>()
|
|
12
|
+
|
|
13
|
+
const PANEL_MARGIN = 10
|
|
14
|
+
const FRAME_MARGIN = 24
|
|
15
|
+
const SNAP_THRESHOLD = 2
|
|
16
|
+
|
|
17
|
+
const vars = computed(() => {
|
|
18
|
+
const dark = props.client.colorMode.value === 'dark'
|
|
19
|
+
return {
|
|
20
|
+
'--nuxt-devtools-widget-bg': dark ? '#111' : '#ffffff',
|
|
21
|
+
'--nuxt-devtools-widget-fg': dark ? '#F5F5F5' : '#111',
|
|
22
|
+
'--nuxt-devtools-widget-border': dark ? '#3336' : '#efefef',
|
|
23
|
+
'--nuxt-devtools-widget-shadow': dark ? 'rgba(0,0,0,0.3)' : 'rgba(128,128,128,0.1)',
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
const frameBox = ref<InstanceType<typeof FrameBox>>()
|
|
28
|
+
const panelEl = ref<HTMLDivElement>()
|
|
29
|
+
const anchorEl = ref<HTMLDivElement>()
|
|
30
|
+
|
|
31
|
+
const windowSize = reactive({ width: 0, height: 0 })
|
|
32
|
+
const isDragging = ref(false)
|
|
33
|
+
const draggingOffset = reactive({ x: 0, y: 0 })
|
|
34
|
+
const mousePosition = reactive({ x: 0, y: 0 })
|
|
35
|
+
|
|
36
|
+
function onPointerDown(e: PointerEvent) {
|
|
37
|
+
isDragging.value = true
|
|
38
|
+
const { left, top, width, height } = panelEl.value!.getBoundingClientRect()
|
|
39
|
+
draggingOffset.x = e.clientX - left - width / 2
|
|
40
|
+
draggingOffset.y = e.clientY - top - height / 2
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
onMounted(() => {
|
|
44
|
+
windowSize.width = window.innerWidth
|
|
45
|
+
windowSize.height = window.innerHeight
|
|
46
|
+
|
|
47
|
+
useEventListener(window, 'resize', () => {
|
|
48
|
+
windowSize.width = window.innerWidth
|
|
49
|
+
windowSize.height = window.innerHeight
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
useEventListener(window, 'pointermove', (e: PointerEvent) => {
|
|
53
|
+
if (!isDragging.value)
|
|
54
|
+
return
|
|
55
|
+
|
|
56
|
+
const centerX = windowSize.width / 2
|
|
57
|
+
const centerY = windowSize.height / 2
|
|
58
|
+
|
|
59
|
+
const x = e.clientX - draggingOffset.x
|
|
60
|
+
const y = e.clientY - draggingOffset.y
|
|
61
|
+
|
|
62
|
+
mousePosition.x = x
|
|
63
|
+
mousePosition.y = y
|
|
64
|
+
|
|
65
|
+
// Get position
|
|
66
|
+
const deg = Math.atan2(y - centerY, x - centerX)
|
|
67
|
+
const HORIZONTAL_MARGIN = 70
|
|
68
|
+
const TL = Math.atan2(0 - centerY + HORIZONTAL_MARGIN, 0 - centerX)
|
|
69
|
+
const TR = Math.atan2(0 - centerY + HORIZONTAL_MARGIN, windowSize.width - centerX)
|
|
70
|
+
const BL = Math.atan2(windowSize.height - HORIZONTAL_MARGIN - centerY, 0 - centerX)
|
|
71
|
+
const BR = Math.atan2(windowSize.height - HORIZONTAL_MARGIN - centerY, windowSize.width - centerX)
|
|
72
|
+
|
|
73
|
+
state.value.position = deg >= TL && deg <= TR
|
|
74
|
+
? 'top'
|
|
75
|
+
: deg >= TR && deg <= BR
|
|
76
|
+
? 'right'
|
|
77
|
+
: deg >= BR && deg <= BL
|
|
78
|
+
? 'bottom'
|
|
79
|
+
: 'left'
|
|
80
|
+
|
|
81
|
+
state.value.left = snapToPoints(x / windowSize.width * 100)
|
|
82
|
+
state.value.top = snapToPoints(y / windowSize.height * 100)
|
|
83
|
+
})
|
|
84
|
+
useEventListener(window, 'pointerup', () => {
|
|
85
|
+
isDragging.value = false
|
|
86
|
+
})
|
|
87
|
+
useEventListener(window, 'pointerleave', () => {
|
|
88
|
+
isDragging.value = false
|
|
89
|
+
})
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
function snapToPoints(value: number) {
|
|
93
|
+
if (value < 5)
|
|
94
|
+
return 0
|
|
95
|
+
if (value > 95)
|
|
96
|
+
return 100
|
|
97
|
+
if (Math.abs(value - 50) < SNAP_THRESHOLD)
|
|
98
|
+
return 50
|
|
99
|
+
return value
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const isVertical = computed(() => state.value.position === 'left' || state.value.position === 'right')
|
|
103
|
+
|
|
104
|
+
const anchorPos = computed(() => {
|
|
105
|
+
const halfWidth = (panelEl.value?.clientWidth || 0) / 2
|
|
106
|
+
const halfHeight = (panelEl.value?.clientHeight || 0) / 2
|
|
107
|
+
|
|
108
|
+
const left = state.value.left * windowSize.width / 100
|
|
109
|
+
const top = state.value.top * windowSize.height / 100
|
|
110
|
+
|
|
111
|
+
switch (state.value.position) {
|
|
112
|
+
case 'top':
|
|
113
|
+
return {
|
|
114
|
+
left: Math.min(Math.max(left, halfWidth + PANEL_MARGIN), windowSize.width - halfWidth - PANEL_MARGIN),
|
|
115
|
+
top: PANEL_MARGIN + halfHeight,
|
|
116
|
+
}
|
|
117
|
+
case 'right':
|
|
118
|
+
return {
|
|
119
|
+
left: windowSize.width - PANEL_MARGIN - halfHeight,
|
|
120
|
+
top,
|
|
121
|
+
}
|
|
122
|
+
case 'left':
|
|
123
|
+
return {
|
|
124
|
+
left: PANEL_MARGIN + halfHeight,
|
|
125
|
+
top,
|
|
126
|
+
}
|
|
127
|
+
case 'bottom':
|
|
128
|
+
default:
|
|
129
|
+
return {
|
|
130
|
+
left: Math.min(Math.max(left, halfWidth + PANEL_MARGIN), windowSize.width - halfWidth - PANEL_MARGIN),
|
|
131
|
+
top: windowSize.height - PANEL_MARGIN - halfHeight,
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
})
|
|
135
|
+
|
|
136
|
+
const anchorStyle = computed(() => ({ left: `${anchorPos.value.left}px`, top: `${anchorPos.value.top}px` }))
|
|
137
|
+
|
|
138
|
+
const iframeStyle = computed(() => {
|
|
139
|
+
// eslint-disable-next-line no-unused-expressions, no-sequences
|
|
140
|
+
mousePosition.x, mousePosition.y
|
|
141
|
+
|
|
142
|
+
const maxWidth = windowSize.width - FRAME_MARGIN * 2
|
|
143
|
+
const maxHeight = windowSize.height - FRAME_MARGIN * 2
|
|
144
|
+
|
|
145
|
+
const style: CSSProperties = {
|
|
146
|
+
zIndex: -1,
|
|
147
|
+
pointerEvents: isDragging.value ? 'none' : 'auto',
|
|
148
|
+
width: `min(${state.value.width}vw, calc(100vw - ${FRAME_MARGIN * 2}px))`,
|
|
149
|
+
height: `min(${state.value.height}vh, calc(100vh - ${FRAME_MARGIN * 2}px))`,
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const anchor = anchorPos.value
|
|
153
|
+
const width = Math.min(maxWidth, state.value.width * windowSize.width / 100)
|
|
154
|
+
const height = Math.min(maxHeight, state.value.height * windowSize.height / 100)
|
|
155
|
+
|
|
156
|
+
const anchorX = anchor?.left || 0
|
|
157
|
+
const anchorY = anchor?.top || 0
|
|
158
|
+
|
|
159
|
+
switch (state.value.position) {
|
|
160
|
+
case 'top':
|
|
161
|
+
case 'bottom':
|
|
162
|
+
style.left = 0
|
|
163
|
+
style.transform = 'translate(-50%, 0)'
|
|
164
|
+
if ((anchorX - FRAME_MARGIN) < width / 2)
|
|
165
|
+
style.left = `${width / 2 - anchorX + FRAME_MARGIN}px`
|
|
166
|
+
else if ((windowSize.width - anchorX - FRAME_MARGIN) < width / 2)
|
|
167
|
+
style.left = `${windowSize.width - anchorX - width / 2 - FRAME_MARGIN}px`
|
|
168
|
+
break
|
|
169
|
+
case 'right':
|
|
170
|
+
case 'left':
|
|
171
|
+
style.top = 0
|
|
172
|
+
style.transform = 'translate(0, -50%)'
|
|
173
|
+
if ((anchorY - FRAME_MARGIN) < height / 2)
|
|
174
|
+
style.top = `${height / 2 - anchorY + FRAME_MARGIN}px`
|
|
175
|
+
else if ((windowSize.height - anchorY - FRAME_MARGIN) < height / 2)
|
|
176
|
+
style.top = `${windowSize.height - anchorY - height / 2 - FRAME_MARGIN}px`
|
|
177
|
+
break
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
switch (state.value.position) {
|
|
181
|
+
case 'top':
|
|
182
|
+
style.top = 0
|
|
183
|
+
break
|
|
184
|
+
case 'right':
|
|
185
|
+
style.right = 0
|
|
186
|
+
break
|
|
187
|
+
case 'left':
|
|
188
|
+
style.left = 0
|
|
189
|
+
break
|
|
190
|
+
case 'bottom':
|
|
191
|
+
default:
|
|
192
|
+
style.bottom = 0
|
|
193
|
+
break
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return style
|
|
197
|
+
})
|
|
198
|
+
|
|
199
|
+
const time = computed(() => {
|
|
200
|
+
let type = ''
|
|
201
|
+
const metric = props.client.loadingTimeMetrics
|
|
202
|
+
let time = -1
|
|
203
|
+
if (metric.pageEnd && metric.pageStart) {
|
|
204
|
+
time = metric.pageEnd - metric.pageStart
|
|
205
|
+
type = 'Page'
|
|
206
|
+
}
|
|
207
|
+
else if (metric.appLoad && metric.appInit) {
|
|
208
|
+
time = metric.appLoad - metric.appInit
|
|
209
|
+
type = 'App'
|
|
210
|
+
}
|
|
211
|
+
if (time < 0)
|
|
212
|
+
return [type, '', '-']
|
|
213
|
+
return [type, ...millisecondToHumanreadable(time)]
|
|
214
|
+
})
|
|
215
|
+
</script>
|
|
216
|
+
|
|
217
|
+
<template>
|
|
218
|
+
<div
|
|
219
|
+
id="nuxt-devtools-anchor"
|
|
220
|
+
ref="anchorEl"
|
|
221
|
+
:style="[anchorStyle, vars]"
|
|
222
|
+
:class="{ vertical: isVertical, active: state.open }"
|
|
223
|
+
>
|
|
224
|
+
<div class="glowing" :style="isDragging ? 'opacity: 0.6 !important' : ''" />
|
|
225
|
+
<div ref="panelEl" class="panel" @pointerdown="onPointerDown">
|
|
226
|
+
<button class="icon-button nuxt-button" title="Toggle Nuxt DevTools" @click="togglePanel">
|
|
227
|
+
<svg
|
|
228
|
+
viewBox="0 0 324 324" fill="none" xmlns="http://www.w3.org/2000/svg"
|
|
229
|
+
style="margin-top:-1px; height: 1.2em; width: 1.2em;"
|
|
230
|
+
>
|
|
231
|
+
<path d="M181.767 270H302.211C306.037 270 309.795 269.003 313.108 267.107C316.421 265.211 319.172 262.484 321.084 259.2C322.996 255.915 324.002 252.19 324 248.399C323.998 244.607 322.989 240.883 321.074 237.601L240.187 98.7439C238.275 95.4607 235.525 92.7342 232.213 90.8385C228.901 88.9429 225.143 87.9449 221.318 87.9449C217.494 87.9449 213.736 88.9429 210.424 90.8385C207.112 92.7342 204.361 95.4607 202.449 98.7439L181.767 134.272L141.329 64.7975C139.416 61.5145 136.664 58.7884 133.351 56.8931C130.038 54.9978 126.28 54 122.454 54C118.629 54 114.871 54.9978 111.558 56.8931C108.245 58.7884 105.493 61.5145 103.58 64.7975L2.92554 237.601C1.01067 240.883 0.00166657 244.607 2.06272e-06 248.399C-0.00166244 252.19 1.00407 255.915 2.91605 259.2C4.82803 262.484 7.57884 265.211 10.8918 267.107C14.2047 269.003 17.963 270 21.7886 270H97.3936C127.349 270 149.44 256.959 164.641 231.517L201.546 168.172L221.313 134.272L280.637 236.1H201.546L181.767 270ZM96.1611 236.065L43.3984 236.054L122.49 100.291L161.953 168.172L135.531 213.543C125.436 230.051 113.968 236.065 96.1611 236.065Z" fill="#00DC82" />
|
|
232
|
+
</svg>
|
|
233
|
+
</button>
|
|
234
|
+
<div style="border-left: 1px solid #8883;width:1px;height:10px;" />
|
|
235
|
+
<div class="label" :title="`${time[0]} load time`">
|
|
236
|
+
<div class="label-main">
|
|
237
|
+
{{ time[1] }}
|
|
238
|
+
</div>
|
|
239
|
+
<span class="label-secondary">
|
|
240
|
+
{{ time[2] }}
|
|
241
|
+
</span>
|
|
242
|
+
</div>
|
|
243
|
+
<template v-if="client.inspector">
|
|
244
|
+
<div style="border-left: 1px solid #8883;width:1px;height:10px;" />
|
|
245
|
+
<button class="icon-button" title="Toggle Component Inspector" @click="client.inspector.toggle">
|
|
246
|
+
<svg
|
|
247
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
248
|
+
style="height: 1.2em; width: 1.2em; opacity:0.5;"
|
|
249
|
+
:style="client.inspector.isEnabled.value ? 'opacity:1;color:#00dc82' : ''"
|
|
250
|
+
viewBox="0 0 24 24"
|
|
251
|
+
>
|
|
252
|
+
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r=".5" fill="currentColor" /><path d="M5 12a7 7 0 1 0 14 0a7 7 0 1 0-14 0m7-9v2m-9 7h2m7 7v2m7-9h2" /></g>
|
|
253
|
+
</svg>
|
|
254
|
+
</button>
|
|
255
|
+
</template>
|
|
256
|
+
</div>
|
|
257
|
+
<FrameBox ref="frameBox" :client="client" :style="iframeStyle" />
|
|
258
|
+
</div>
|
|
259
|
+
</template>
|
|
260
|
+
|
|
261
|
+
<style scoped>
|
|
262
|
+
#nuxt-devtools-anchor {
|
|
263
|
+
width: 0;
|
|
264
|
+
z-index: 2147483645;
|
|
265
|
+
position: fixed;
|
|
266
|
+
transform-origin: center center;
|
|
267
|
+
transform: translate(-50%, -50%) rotate(0);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
#nuxt-devtools-anchor .label {
|
|
271
|
+
padding: 0 7px 0 8px;
|
|
272
|
+
font-size: 0.8em;
|
|
273
|
+
line-height: 1em;
|
|
274
|
+
display: flex;
|
|
275
|
+
gap: 3px;
|
|
276
|
+
justify-items: center;
|
|
277
|
+
align-items: center;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
#nuxt-devtools-anchor .label .label-main {
|
|
281
|
+
opacity: 0.8;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
#nuxt-devtools-anchor .label .label-secondary {
|
|
285
|
+
font-size: 0.8em;
|
|
286
|
+
line-height: 0.6em;
|
|
287
|
+
opacity: 0.5;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
#nuxt-devtools-anchor.vertical .nuxt-button {
|
|
291
|
+
transform: rotate(-90deg);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
#nuxt-devtools-anchor.vertical .label {
|
|
295
|
+
transform: rotate(-90deg);
|
|
296
|
+
flex-direction: column;
|
|
297
|
+
gap: 2px;
|
|
298
|
+
padding: 0 10px;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
#nuxt-devtools-anchor .panel {
|
|
302
|
+
position: absolute;
|
|
303
|
+
left: 0;
|
|
304
|
+
top: 0;
|
|
305
|
+
transform: translate(-50%, -50%);
|
|
306
|
+
display: flex;
|
|
307
|
+
justify-content: center;
|
|
308
|
+
align-items: center;
|
|
309
|
+
gap: 2px;
|
|
310
|
+
height: 30px;
|
|
311
|
+
padding: 2px 2px 2px 4px;
|
|
312
|
+
border: 1px solid var(--nuxt-devtools-widget-border);
|
|
313
|
+
border-radius: 100px;
|
|
314
|
+
background-color: var(--nuxt-devtools-widget-bg);
|
|
315
|
+
backdrop-filter: blur(10px);
|
|
316
|
+
color: var(--nuxt-devtools-widget-fg);
|
|
317
|
+
box-shadow: 2px 2px 8px var(--nuxt-devtools-widget-shadow);
|
|
318
|
+
transition: background 0.2s ease;
|
|
319
|
+
user-select: none;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
#nuxt-devtools-anchor.vertical .panel {
|
|
323
|
+
transform: translate(-50%, -50%) rotate(90deg);
|
|
324
|
+
box-shadow: 2px -2px 8px var(--nuxt-devtools-widget-shadow);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
#nuxt-devtools-anchor .icon-button {
|
|
328
|
+
border-radius: 100%;
|
|
329
|
+
width: 30px;
|
|
330
|
+
height: 30px;
|
|
331
|
+
display: flex;
|
|
332
|
+
justify-content: center;
|
|
333
|
+
align-items: center;
|
|
334
|
+
opacity: 0.8;
|
|
335
|
+
transition: opacity 0.2s ease-in-out;
|
|
336
|
+
}
|
|
337
|
+
#nuxt-devtools-anchor .icon-button:hover {
|
|
338
|
+
opacity: 1;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
#nuxt-devtools-anchor:hover .glowing {
|
|
342
|
+
opacity: 0.6;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
#nuxt-devtools-anchor .glowing {
|
|
346
|
+
position: absolute;
|
|
347
|
+
left: 0;
|
|
348
|
+
top: 0;
|
|
349
|
+
transform: translate(-50%, -50%);
|
|
350
|
+
width: 160px;
|
|
351
|
+
height: 160px;
|
|
352
|
+
opacity: 0;
|
|
353
|
+
transition: all 0.8s ease;
|
|
354
|
+
pointer-events: none;
|
|
355
|
+
z-index: -1;
|
|
356
|
+
border-radius: 9999px;
|
|
357
|
+
background-image: linear-gradient(45deg,#00dc82,#36e4da,#0047e1);
|
|
358
|
+
filter: blur(60px);
|
|
359
|
+
}
|
|
360
|
+
</style>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { computed, ref } from "vue";
|
|
2
|
+
export function useClientColorMode() {
|
|
3
|
+
const explicitColor = ref();
|
|
4
|
+
const systemColor = ref();
|
|
5
|
+
const elements = [
|
|
6
|
+
document.documentElement,
|
|
7
|
+
document.body
|
|
8
|
+
];
|
|
9
|
+
const ob = new MutationObserver(getExplicitColor);
|
|
10
|
+
elements.forEach((el) => {
|
|
11
|
+
ob.observe(el, {
|
|
12
|
+
attributes: true,
|
|
13
|
+
attributeFilter: ["class"]
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
const preferDarkQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
17
|
+
const preferLightQuery = window.matchMedia("(prefers-color-scheme: light)");
|
|
18
|
+
preferDarkQuery.addEventListener("change", getSystemColor);
|
|
19
|
+
preferLightQuery.addEventListener("change", getSystemColor);
|
|
20
|
+
function getExplicitColor() {
|
|
21
|
+
let color;
|
|
22
|
+
for (const el of elements) {
|
|
23
|
+
if (el.classList.contains("dark")) {
|
|
24
|
+
color = "dark";
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
if (el.classList.contains("light")) {
|
|
28
|
+
color = "light";
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
explicitColor.value = color;
|
|
33
|
+
}
|
|
34
|
+
function getSystemColor() {
|
|
35
|
+
if (preferDarkQuery.matches)
|
|
36
|
+
systemColor.value = "dark";
|
|
37
|
+
else if (preferLightQuery.matches)
|
|
38
|
+
systemColor.value = "light";
|
|
39
|
+
else
|
|
40
|
+
systemColor.value = void 0;
|
|
41
|
+
}
|
|
42
|
+
getExplicitColor();
|
|
43
|
+
getSystemColor();
|
|
44
|
+
return computed(() => explicitColor.value || systemColor.value || "light");
|
|
45
|
+
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { DevToolsFrameState } from '../../../types';
|
|
2
2
|
export declare const PANEL_PADDING = 10;
|
|
3
|
-
export declare const PANEL_MIN =
|
|
3
|
+
export declare const PANEL_MIN = 20;
|
|
4
4
|
export declare const PANEL_MAX = 100;
|
|
5
|
-
export type ViewMode = 'default' | 'component-inspector';
|
|
6
|
-
export declare const viewMode: import("vue").Ref<ViewMode>;
|
|
7
5
|
export declare const state: import("vue").Ref<DevToolsFrameState>;
|
|
6
|
+
export declare const isInitialized: import("vue").Ref<boolean>;
|
|
8
7
|
export declare function togglePanel(): void;
|
|
9
8
|
export declare function closePanel(): void;
|
|
10
9
|
export declare function openPanel(): void;
|
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
import { ref } from "vue";
|
|
1
|
+
import { ref, watch } from "vue";
|
|
2
2
|
import { useObjectStorage } from "./utils.mjs";
|
|
3
3
|
export const PANEL_PADDING = 10;
|
|
4
|
-
export const PANEL_MIN =
|
|
4
|
+
export const PANEL_MIN = 20;
|
|
5
5
|
export const PANEL_MAX = 100;
|
|
6
|
-
export const viewMode = ref("default");
|
|
7
6
|
export const state = useObjectStorage("nuxt-devtools-frame-state", {
|
|
8
7
|
width: 80,
|
|
9
8
|
height: 60,
|
|
10
|
-
|
|
11
|
-
left:
|
|
9
|
+
top: 0,
|
|
10
|
+
left: 50,
|
|
12
11
|
open: false,
|
|
13
12
|
route: "/",
|
|
14
13
|
position: "bottom",
|
|
15
14
|
closeOnOutsideClick: false
|
|
16
15
|
});
|
|
16
|
+
export const isInitialized = ref(state.value.open);
|
|
17
|
+
if (!isInitialized.value) {
|
|
18
|
+
watch(() => state.value.open, (open) => {
|
|
19
|
+
if (open)
|
|
20
|
+
isInitialized.value = open;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
17
23
|
export function togglePanel() {
|
|
18
24
|
if (state.value.open)
|
|
19
25
|
closePanel();
|
|
@@ -21,10 +27,7 @@ export function togglePanel() {
|
|
|
21
27
|
openPanel();
|
|
22
28
|
}
|
|
23
29
|
export function closePanel() {
|
|
24
|
-
|
|
25
|
-
viewMode.value = "default";
|
|
26
|
-
else
|
|
27
|
-
state.value.open = false;
|
|
30
|
+
state.value.open = false;
|
|
28
31
|
}
|
|
29
32
|
export function openPanel() {
|
|
30
33
|
state.value.open = true;
|
|
@@ -2,3 +2,4 @@ import type { Ref } from 'vue';
|
|
|
2
2
|
export declare function useObjectStorage<T>(key: string, initial: T, readonly?: boolean): Ref<T>;
|
|
3
3
|
export declare function useTransform<F, T>(data: Ref<F>, to: (data: F) => T, from: (data: T) => F): Ref<T>;
|
|
4
4
|
export declare function useEventListener(target: EventTarget, type: string, listener: any, options?: boolean | AddEventListenerOptions): void;
|
|
5
|
+
export declare function millisecondToHumanreadable(ms: number): [number, string];
|
|
@@ -39,3 +39,12 @@ export function useEventListener(target, type, listener, options) {
|
|
|
39
39
|
target.addEventListener(type, listener, options);
|
|
40
40
|
getCurrentScope() && onScopeDispose(() => target.removeEventListener(type, listener, options));
|
|
41
41
|
}
|
|
42
|
+
export function millisecondToHumanreadable(ms) {
|
|
43
|
+
if (ms < 1e3)
|
|
44
|
+
return [+ms.toFixed(0), "ms"];
|
|
45
|
+
if (ms < 1e3 * 60)
|
|
46
|
+
return [+(ms / 1e3).toFixed(1), "s"];
|
|
47
|
+
if (ms < 1e3 * 60 * 60)
|
|
48
|
+
return [+(ms / 1e3 / 60).toFixed(1), "min"];
|
|
49
|
+
return [+(ms / 1e3 / 60 / 60).toFixed(1), "hour"];
|
|
50
|
+
}
|
|
@@ -3,6 +3,8 @@ import { isGlobalInstall } from '../dirs.mjs';
|
|
|
3
3
|
|
|
4
4
|
const ROUTE_PATH = "/__nuxt_devtools__";
|
|
5
5
|
const ROUTE_CLIENT = `${ROUTE_PATH}/client`;
|
|
6
|
+
const ROUTE_AUTH = `${ROUTE_PATH}/auth`;
|
|
7
|
+
const ROUTE_AUTH_VERIFY = `${ROUTE_PATH}/auth-verify`;
|
|
6
8
|
const ROUTE_ANALYZE = `${ROUTE_PATH}/analyze`;
|
|
7
9
|
const WS_EVENT_NAME = "nuxt:devtools:rpc";
|
|
8
10
|
const defaultOptions = {
|
|
@@ -38,4 +40,4 @@ const module = defineNuxtModule({
|
|
|
38
40
|
}
|
|
39
41
|
});
|
|
40
42
|
|
|
41
|
-
export {
|
|
43
|
+
export { ROUTE_AUTH as R, WS_EVENT_NAME as W, ROUTE_ANALYZE as a, ROUTE_CLIENT as b, ROUTE_AUTH_VERIFY as c, module as m };
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "nuxt/devtools",
|
|
7
7
|
"exports": {
|
|
@@ -30,11 +30,12 @@
|
|
|
30
30
|
"vite": "*"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@nuxt/kit": "^3.5.
|
|
34
|
-
"birpc": "^0.2.
|
|
33
|
+
"@nuxt/kit": "^3.5.3",
|
|
34
|
+
"birpc": "^0.2.12",
|
|
35
|
+
"boxen": "^7.1.0",
|
|
35
36
|
"consola": "^3.1.0",
|
|
36
37
|
"execa": "^7.1.1",
|
|
37
|
-
"fast-folder-size": "^
|
|
38
|
+
"fast-folder-size": "^2.0.0",
|
|
38
39
|
"fast-glob": "^3.2.12",
|
|
39
40
|
"get-port-please": "^3.0.1",
|
|
40
41
|
"global-dirs": "^3.0.1",
|
|
@@ -44,43 +45,42 @@
|
|
|
44
45
|
"is-installed-globally": "^0.4.0",
|
|
45
46
|
"launch-editor": "^2.6.0",
|
|
46
47
|
"local-pkg": "^0.4.3",
|
|
47
|
-
"magicast": "^0.2.
|
|
48
|
-
"nypm": "^0.2.
|
|
48
|
+
"magicast": "^0.2.9",
|
|
49
|
+
"nypm": "^0.2.1",
|
|
49
50
|
"pacote": "^15.2.0",
|
|
50
|
-
"pathe": "^1.1.
|
|
51
|
+
"pathe": "^1.1.1",
|
|
51
52
|
"perfect-debounce": "^1.0.0",
|
|
52
53
|
"picocolors": "^1.0.0",
|
|
53
54
|
"pkg-types": "^1.0.3",
|
|
54
55
|
"rc9": "^2.1.0",
|
|
55
56
|
"semver": "^7.5.1",
|
|
56
57
|
"sirv": "^2.0.3",
|
|
57
|
-
"unimport": "^3.0.
|
|
58
|
+
"unimport": "^3.0.8",
|
|
58
59
|
"vite-plugin-inspect": "^0.7.28",
|
|
59
60
|
"vite-plugin-vue-inspector": "^3.4.2",
|
|
60
61
|
"wait-on": "^7.0.1",
|
|
61
62
|
"which": "^3.0.1",
|
|
62
63
|
"ws": "^8.13.0",
|
|
63
|
-
"@nuxt/devtools-kit": "0.
|
|
64
|
-
"@nuxt/devtools-wizard": "0.
|
|
64
|
+
"@nuxt/devtools-kit": "0.6.0",
|
|
65
|
+
"@nuxt/devtools-wizard": "0.6.0"
|
|
65
66
|
},
|
|
66
67
|
"devDependencies": {
|
|
67
|
-
"@antfu/utils": "^0.7.
|
|
68
|
+
"@antfu/utils": "^0.7.4",
|
|
68
69
|
"@iconify-json/bxl": "^1.1.6",
|
|
69
|
-
"@iconify-json/carbon": "^1.1.
|
|
70
|
-
"@iconify-json/logos": "^1.1.
|
|
71
|
-
"@iconify-json/mdi": "^1.1.52",
|
|
70
|
+
"@iconify-json/carbon": "^1.1.18",
|
|
71
|
+
"@iconify-json/logos": "^1.1.32",
|
|
72
72
|
"@iconify-json/ri": "^1.1.9",
|
|
73
|
-
"@iconify-json/simple-icons": "^1.1.
|
|
74
|
-
"@iconify-json/tabler": "^1.1.
|
|
75
|
-
"@nuxt/content": "^2.
|
|
73
|
+
"@iconify-json/simple-icons": "^1.1.56",
|
|
74
|
+
"@iconify-json/tabler": "^1.1.79",
|
|
75
|
+
"@nuxt/content": "^2.7.0",
|
|
76
76
|
"@nuxtjs/color-mode": "^3.2.0",
|
|
77
77
|
"@parcel/watcher": "^2.1.0",
|
|
78
78
|
"@types/markdown-it-link-attributes": "^3.0.1",
|
|
79
|
-
"@
|
|
80
|
-
"@unocss/
|
|
81
|
-
"@unocss/preset-
|
|
82
|
-
"@unocss/
|
|
83
|
-
"@
|
|
79
|
+
"@types/ua-parser-js": "^0.7.36",
|
|
80
|
+
"@unocss/nuxt": "^0.53.1",
|
|
81
|
+
"@unocss/preset-icons": "^0.53.1",
|
|
82
|
+
"@unocss/preset-uno": "^0.53.1",
|
|
83
|
+
"@unocss/runtime": "^0.53.1",
|
|
84
84
|
"@vueuse/nuxt": "^10.1.2",
|
|
85
85
|
"esno": "^0.16.3",
|
|
86
86
|
"flatted": "^3.2.7",
|
|
@@ -90,25 +90,26 @@
|
|
|
90
90
|
"markdown-it": "^13.0.1",
|
|
91
91
|
"markdown-it-link-attributes": "^4.0.1",
|
|
92
92
|
"nanoid": "^4.0.2",
|
|
93
|
-
"nuxt": "^3.5.
|
|
94
|
-
"nuxt-vitest": "^0.
|
|
95
|
-
"ofetch": "^1.0
|
|
93
|
+
"nuxt": "^3.5.3",
|
|
94
|
+
"nuxt-vitest": "^0.8.5",
|
|
95
|
+
"ofetch": "^1.1.0",
|
|
96
96
|
"ohash": "^1.1.2",
|
|
97
97
|
"shiki": "^0.14.2",
|
|
98
98
|
"shiki-es": "^0.2.0",
|
|
99
99
|
"simple-git": "^3.19.0",
|
|
100
100
|
"splitpanes": "^3.1.5",
|
|
101
101
|
"theme-vitesse": "^0.7.2",
|
|
102
|
-
"
|
|
103
|
-
"
|
|
102
|
+
"ua-parser-js": "^1.0.35",
|
|
103
|
+
"unocss": "^0.53.1",
|
|
104
|
+
"vanilla-jsoneditor": "^0.17.6",
|
|
104
105
|
"vis-data": "^7.1.6",
|
|
105
106
|
"vis-network": "^9.1.6",
|
|
106
107
|
"vite-plugin-vue-markdown": "^0.23.5",
|
|
107
108
|
"vue-tsc": "^1.6.5",
|
|
108
109
|
"vue-virtual-scroller": "2.0.0-beta.8",
|
|
109
|
-
"xterm": "^5.1
|
|
110
|
+
"xterm": "^5.2.1",
|
|
110
111
|
"xterm-addon-fit": "^0.7.0",
|
|
111
|
-
"@nuxt/devtools": "0.
|
|
112
|
+
"@nuxt/devtools": "0.6.0"
|
|
112
113
|
},
|
|
113
114
|
"scripts": {
|
|
114
115
|
"build": "pnpm dev:prepare && pnpm build:module && pnpm build:client && esno scripts/prepare.ts",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html >
|
|
3
|
-
<head><meta charset="utf-8">
|
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.34446c1f.js"><link rel="preload" as="style" href="/__nuxt_devtools__/client/_nuxt/entry.bf8a0e33.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.a348e979.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/default.6eda7699.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/full.89a525fd.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/none.566b9a55.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.a821baa9.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-component.5479d89e.js"><link rel="stylesheet" href="/__nuxt_devtools__/client/_nuxt/entry.bf8a0e33.css"><script>"use strict";const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"system";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
|
|
5
|
-
</script></head>
|
|
6
|
-
<body ><div id="__nuxt"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4},{},false,{},{}]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"/__nuxt_devtools__/client",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.34446c1f.js" crossorigin></script></body>
|
|
7
|
-
</html>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as y}from"./NCodeBlock.vue.d5b2e85d.js";import{a as C,b0 as g,ai as h,o as n,h as a,f as s,F as p,q as x,s as u,u as o,t as S,i as f,w as _,l as m,c as w,v as r,k as B}from"./entry.34446c1f.js";import{a as N}from"./editor.4380b623.js";const V={key:0,relative:"","n-code-block":""},$={flex:"~ wrap","w-full":""},D=["onClick"],E=s("div",{border:"b base","flex-auto":""},null,-1),F={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},j=C({__name:"CodeSnippets",props:{codeSnippets:null},setup(c){const l=c,e=g(l.codeSnippets[0]),b=N();return h(()=>{l.codeSnippets.includes(e.value)||(e.value=l.codeSnippets[0])}),(q,i)=>{const k=y,d=B;return c.codeSnippets.length?(n(),a("div",V,[s("div",$,[(n(!0),a(p,null,x(c.codeSnippets,(t,v)=>(n(),a("button",{key:v,px4:"",py2:"",border:"r base",hover:"bg-active",class:u(t===o(e)?"":"border-b"),onClick:z=>e.value=t},[s("div",{class:u(t===o(e)?"":"op30"),"font-mono":""},S(t.name),3)],10,D))),128)),E]),o(e)?(n(),a(p,{key:0},[f(k,{code:o(e).code,lang:o(e).lang,lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),s("div",F,[f(d,{icon:"carbon-copy",onClick:i[0]||(i[0]=t=>o(b)(o(e).code))},{default:_(()=>[m(" Copy ")]),_:1}),o(e)?.docs?(n(),w(d,{key:0,to:o(e).docs,target:"_blank",icon:"carbon-catalog"},{default:_(()=>[m(" Docs ")]),_:1},8,["to"])):r("",!0)])],64)):r("",!0)])):r("",!0)}}});export{j as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as i}from"./NIconButton.vue.3defcade.js";import{a as u,r as m,ab as f,ac as d,c as p,w as b,ad as v,o as r,h as _,i as h,f as x,Z as g,ae as y,u as k,v as B}from"./entry.34446c1f.js";const C={relative:"","h-full":"","w-full":"","of-auto":""},V={inheritAttrs:!1},N=u({...V,__name:"DrawerRight",props:{modelValue:{type:Boolean},navbar:null,autoClose:{type:Boolean}},emits:["close"],setup(a,{emit:l}){const e=a,o=m(),{height:n}=f(()=>e.navbar,void 0,{box:"border-box"});return d(o,()=>{e.modelValue&&e.autoClose&&l("close")},{ignore:["a","button","summary"]}),(t,s)=>{const c=i;return r(),p(v,{"enter-active-class":"duration-200 ease-in","enter-from-class":"transform translate-x-1/1","enter-to-class":"opacity-100","leave-active-class":"duration-200 ease-out","leave-from-class":"opacity-100","leave-to-class":"transform translate-x-1/1"},{default:b(()=>[a.modelValue?(r(),_("div",y({key:0,ref_key:"el",ref:o,border:"l base",flex:"~ col gap-1",absolute:"","bottom-0":"","right-0":"","z-10":"","z-20":"","of-auto":"","text-sm":"","glass-effect":"",style:{top:`${k(n)}px`}},t.$attrs),[h(c,{absolute:"","right-2":"","top-2":"","z-20":"","text-xl":"",icon:"carbon-close",onClick:s[0]||(s[0]=$=>t.$emit("close"))}),x("div",C,[g(t.$slots,"default")])],16)):B("",!0)]),_:3})}}});export{N as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,o as s,h as i,l as u,t as f,s as c,f as x}from"./entry.34446c1f.js";const l=x("span",{"ml-1":"","text-xs":"",op50:""},"ms",-1),p=a({__name:"DurationDisplay",props:{duration:null,factor:{default:1}},setup(e){const r=e;function o(t){return t?(t=t*r.factor,t<.5?"text-gray:50":t>1e3?"text-red-400":t>500?"text-orange-400":t>200?"text-yellow-400":""):"text-gray-400"}function n(t){return t?t<1?"<1":t.toFixed(2):"-"}return(t,m)=>(s(),i("div",{class:c(o(e.duration))},[u(f(n(e.duration)),1),l],2))}});export{p as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as d}from"./editor.4380b623.js";import{a as h,U as f,p,ar as v,o as n,c as k,w as y,h as o,F as i,l as c,t as l,u as a,f as B,v as C,s as N,aa as g}from"./entry.34446c1f.js";const b={key:0,op50:""},F=h({__name:"FilepathItem",props:{filepath:null,lineBreak:{type:Boolean},subpath:{type:Boolean},override:null},setup(e){const s=e,m=d(),r=f(),t=p(()=>s.filepath&&r.value?v(s.filepath,r.value.rootDir):{path:s.filepath||""});return(w,u)=>(n(),k(g(e.filepath?"button":"span"),{class:N([e.filepath?"hover:underline":"",e.lineBreak?"":"ws-nowrap of-hidden truncate"]),"font-mono":"",title:e.override||e.filepath,onClick:u[0]||(u[0]=x=>e.filepath&&a(m)(e.filepath))},{default:y(()=>[e.override?(n(),o(i,{key:0},[c(l(e.override),1)],64)):a(t).moduleName?(n(),o(i,{key:1},[B("span",null,l(a(t).moduleName),1),e.subpath?(n(),o("span",b,l(a(t).path.slice(a(t).moduleName.length)),1)):C("",!0)],64)):(n(),o(i,{key:2},[c(l(a(t).path),1)],64))]),_:1},8,["class","title"]))}});export{F as _};
|