@nuxt/devtools 0.5.5 → 0.6.1

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.
Files changed (148) hide show
  1. package/dist/chunks/module-main.mjs +145 -35
  2. package/dist/chunks/vscode.mjs +5 -2
  3. package/dist/client/200.html +2 -2
  4. package/dist/client/404.html +2 -2
  5. package/dist/client/__blank/index.html +7 -0
  6. package/dist/client/_nuxt/AuthRequiredPanel.vue.19da182f.js +1 -0
  7. package/dist/client/_nuxt/{Badge.e58c5f84.js → Badge.067326d6.js} +1 -1
  8. package/dist/client/_nuxt/CodeSnippets.vue.2f33c6d1.js +1 -0
  9. package/dist/client/_nuxt/DrawerRight.vue.aa1fd47b.js +1 -0
  10. package/dist/client/_nuxt/DurationDisplay.vue.4afc40a4.js +1 -0
  11. package/dist/client/_nuxt/FilepathItem.vue.3587ec1f.js +1 -0
  12. package/dist/client/_nuxt/{HelpFab.vue.044c905c.js → HelpFab.vue.dbb954dd.js} +1 -1
  13. package/dist/client/_nuxt/LaunchPage.vue.f137554e.js +1 -0
  14. package/dist/client/_nuxt/NCheckbox.vue.060051ad.js +1 -0
  15. package/dist/client/_nuxt/NCodeBlock.vue.e44529a6.js +2 -0
  16. package/dist/client/_nuxt/NIconButton.vue.ac7efd0c.js +1 -0
  17. package/dist/client/_nuxt/NIconTitle.vue.ace3a05a.js +1 -0
  18. package/dist/client/_nuxt/NLink.vue.372e1ca0.js +1 -0
  19. package/dist/client/_nuxt/NMarkdown.vue.9f252ec4.js +1 -0
  20. package/dist/client/_nuxt/{NPanelGrids.923427b0.js → NPanelGrids.54ee09bc.js} +1 -1
  21. package/dist/client/_nuxt/NSectionBlock.012f83f1.css +1 -0
  22. package/dist/client/_nuxt/NSectionBlock.9cbe0175.js +1 -0
  23. package/dist/client/_nuxt/NSelect.vue.3956d7b1.js +1 -0
  24. package/dist/client/_nuxt/NSwitch.vue.f0f70131.js +1 -0
  25. package/dist/client/_nuxt/NTip.vue.f50fcd60.js +1 -0
  26. package/dist/client/_nuxt/{Navbar.vue.1eab843e.js → Navbar.vue.bd98686f.js} +1 -1
  27. package/dist/client/_nuxt/NpmVersionCheck.vue.78bff2df.js +1 -0
  28. package/dist/client/_nuxt/{PanelLeftRight.vue.5807516f.js → PanelLeftRight.vue.8031c7d4.js} +1 -1
  29. package/dist/client/_nuxt/StateEditor.vue.4439d43c.js +1 -0
  30. package/dist/client/_nuxt/__blank.944beb26.js +1 -0
  31. package/dist/client/_nuxt/analyze-build.fd781999.js +1 -0
  32. package/dist/client/_nuxt/assets.f876e2b9.js +16 -0
  33. package/dist/client/_nuxt/{client.4ef5790f.js → client.d6464981.js} +1 -1
  34. package/dist/client/_nuxt/{components.1cc22fdb.js → components.d23cd7b8.js} +27 -27
  35. package/dist/client/_nuxt/custom-_name_.3701152b.js +1 -0
  36. package/dist/client/_nuxt/{default.2805e636.js → default.809c6e7c.js} +1 -1
  37. package/dist/client/_nuxt/editor.aee50e2c.js +1 -0
  38. package/dist/client/_nuxt/entry.717f6486.css +1 -0
  39. package/dist/client/_nuxt/entry.a0dd6aac.js +19 -0
  40. package/dist/client/_nuxt/{error-404.61da4836.js → error-404.d560629e.js} +1 -1
  41. package/dist/client/_nuxt/{error-500.68195134.js → error-500.d7ca8dd1.js} +1 -1
  42. package/dist/client/_nuxt/{error-component.db5245e7.js → error-component.15e0d602.js} +2 -2
  43. package/dist/client/_nuxt/{full.cfa15ba5.js → full.76363f3f.js} +1 -1
  44. package/dist/client/_nuxt/hooks.3a3b761d.js +1 -0
  45. package/dist/client/_nuxt/imports.e0b9437d.js +1 -0
  46. package/dist/client/_nuxt/{index.e17aa9ce.js → index.25d3cd66.js} +1 -1
  47. package/dist/client/_nuxt/{index.476fd219.js → index.d7252ef5.js} +1 -1
  48. package/dist/client/_nuxt/json-editor-vue.b8dc29b2.js +137 -0
  49. package/dist/client/_nuxt/{middleware.10bb56a6.js → middleware.cbbbe53d.js} +1 -1
  50. package/dist/client/_nuxt/modules.092674af.js +4 -0
  51. package/dist/client/_nuxt/{none.a68953c7.js → none.0a084ac9.js} +1 -1
  52. package/dist/client/_nuxt/nuxt-docs.100caa70.js +1 -0
  53. package/dist/client/_nuxt/open-graph.3563ee56.js +3 -0
  54. package/dist/client/_nuxt/overview.e4073f57.js +1 -0
  55. package/dist/client/_nuxt/pages.e4cfc065.js +1 -0
  56. package/dist/client/_nuxt/payload.0be0c356.js +1 -0
  57. package/dist/client/_nuxt/plugins.88ff2e07.js +1 -0
  58. package/dist/client/_nuxt/runtime-configs.7810c90a.js +1 -0
  59. package/dist/client/_nuxt/server-routes.911ca1ca.js +9 -0
  60. package/dist/client/_nuxt/settings.80338150.js +1 -0
  61. package/dist/client/_nuxt/state-components.3e562e84.js +1 -0
  62. package/dist/client/_nuxt/storage.4d3f94ab.js +1 -0
  63. package/dist/client/_nuxt/terminals.e433a70a.js +1 -0
  64. package/dist/client/_nuxt/{unocss-runtime.7eface6f.js → unocss-runtime.9d0d2556.js} +2 -2
  65. package/dist/client/_nuxt/{virtual-files.3e66a8af.js → virtual-files.ae241a9c.js} +1 -1
  66. package/dist/client/index.html +2 -2
  67. package/dist/client/modules/analyze-build/index.html +2 -2
  68. package/dist/client/modules/assets/index.html +2 -2
  69. package/dist/client/modules/components/index.html +2 -2
  70. package/dist/client/modules/hooks/index.html +2 -2
  71. package/dist/client/modules/imports/index.html +2 -2
  72. package/dist/client/modules/middleware/index.html +2 -2
  73. package/dist/client/modules/modules/index.html +2 -2
  74. package/dist/client/modules/open-graph/index.html +2 -2
  75. package/dist/client/modules/overview/index.html +2 -2
  76. package/dist/client/modules/pages/index.html +2 -2
  77. package/dist/client/modules/payload/index.html +2 -2
  78. package/dist/client/modules/plugins/index.html +2 -2
  79. package/dist/client/modules/runtime-configs/index.html +2 -2
  80. package/dist/client/modules/server-routes/index.html +2 -2
  81. package/dist/client/modules/storage/index.html +2 -2
  82. package/dist/client/modules/terminals/index.html +2 -2
  83. package/dist/client/modules/virtual-files/index.html +2 -2
  84. package/dist/client/settings/index.html +2 -2
  85. package/dist/module.json +1 -1
  86. package/dist/module.mjs +1 -1
  87. package/dist/runtime/auth/index.html +71 -0
  88. package/dist/runtime/nitro/inline.d.ts +3 -0
  89. package/dist/runtime/nitro/inline.mjs +6 -0
  90. package/dist/runtime/plugins/devtools.client.d.ts +8 -0
  91. package/dist/runtime/plugins/devtools.client.mjs +73 -8
  92. package/dist/runtime/plugins/devtools.server.d.ts +2 -0
  93. package/dist/runtime/plugins/devtools.server.mjs +8 -0
  94. package/dist/runtime/plugins/view/Frame.vue +31 -228
  95. package/dist/runtime/plugins/view/FrameBox.vue +167 -0
  96. package/dist/runtime/plugins/view/Main.vue +360 -0
  97. package/dist/runtime/plugins/view/client.d.ts +3 -0
  98. package/dist/runtime/plugins/view/client.mjs +45 -0
  99. package/dist/runtime/plugins/view/state.d.ts +2 -3
  100. package/dist/runtime/plugins/view/state.mjs +12 -9
  101. package/dist/runtime/plugins/view/utils.d.ts +1 -0
  102. package/dist/runtime/plugins/view/utils.mjs +9 -0
  103. package/dist/shared/{devtools.345c630c.mjs → devtools.7ab40af4.mjs} +3 -1
  104. package/dist/types.d.ts +1 -1
  105. package/package.json +30 -29
  106. package/dist/client/__inspecting/index.html +0 -7
  107. package/dist/client/_nuxt/CodeSnippets.vue.22b03a10.js +0 -1
  108. package/dist/client/_nuxt/DrawerRight.vue.58044cee.js +0 -1
  109. package/dist/client/_nuxt/DurationDisplay.vue.0d87f5bf.js +0 -1
  110. package/dist/client/_nuxt/FilepathItem.vue.063a2cdd.js +0 -1
  111. package/dist/client/_nuxt/LaunchPage.vue.59383ce6.js +0 -1
  112. package/dist/client/_nuxt/NCheckbox.vue.f53d5fde.js +0 -1
  113. package/dist/client/_nuxt/NCodeBlock.vue.e2044e41.js +0 -2
  114. package/dist/client/_nuxt/NIconButton.vue.6924c323.js +0 -1
  115. package/dist/client/_nuxt/NIconTitle.vue.19793f87.js +0 -1
  116. package/dist/client/_nuxt/NLink.vue.dddf8805.js +0 -1
  117. package/dist/client/_nuxt/NMarkdown.vue.2a7f337d.js +0 -1
  118. package/dist/client/_nuxt/NSectionBlock.2937e558.js +0 -1
  119. package/dist/client/_nuxt/NSectionBlock.63c19da9.css +0 -1
  120. package/dist/client/_nuxt/NSelect.vue.6bc1e782.js +0 -1
  121. package/dist/client/_nuxt/NSwitch.vue.e15ba847.js +0 -1
  122. package/dist/client/_nuxt/NTip.vue.16191ba5.js +0 -1
  123. package/dist/client/_nuxt/NpmVersionCheck.vue.47b612aa.js +0 -1
  124. package/dist/client/_nuxt/StateEditor.vue.d28666b8.js +0 -1
  125. package/dist/client/_nuxt/__inspecting.324d8c7c.js +0 -1
  126. package/dist/client/_nuxt/analyze-build.9257b30a.js +0 -1
  127. package/dist/client/_nuxt/assets.c3e8e0f3.js +0 -16
  128. package/dist/client/_nuxt/custom-_name_.e1ada273.js +0 -1
  129. package/dist/client/_nuxt/editor.721868d4.js +0 -1
  130. package/dist/client/_nuxt/entry.bf8a0e33.css +0 -1
  131. package/dist/client/_nuxt/entry.f02d2ccc.js +0 -19
  132. package/dist/client/_nuxt/hooks.a0b5858b.js +0 -1
  133. package/dist/client/_nuxt/imports.c13274b4.js +0 -1
  134. package/dist/client/_nuxt/json-editor-vue.3c153669.js +0 -137
  135. package/dist/client/_nuxt/modules.41d22931.js +0 -4
  136. package/dist/client/_nuxt/open-graph.87c9ce95.js +0 -3
  137. package/dist/client/_nuxt/overview.e078ddfd.js +0 -1
  138. package/dist/client/_nuxt/pages.2011bfab.js +0 -1
  139. package/dist/client/_nuxt/payload.aa12c647.js +0 -1
  140. package/dist/client/_nuxt/plugins.2722f367.js +0 -1
  141. package/dist/client/_nuxt/runtime-configs.1c597722.js +0 -1
  142. package/dist/client/_nuxt/server-routes.be515b73.js +0 -9
  143. package/dist/client/_nuxt/settings.bdc2ea51.js +0 -1
  144. package/dist/client/_nuxt/state-components.97be2043.js +0 -1
  145. package/dist/client/_nuxt/storage.b1a77fa3.js +0 -1
  146. package/dist/client/_nuxt/terminals.ce48c24d.js +0 -9
  147. package/dist/client/_nuxt/terminals.d1dcf297.css +0 -32
  148. 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="{ 'nuxt-devtools-vertical': isVertical }"
223
+ >
224
+ <div class="nuxt-devtools-glowing" :style="isDragging ? 'opacity: 0.6 !important' : ''" />
225
+ <div ref="panelEl" class="nuxt-devtools-panel" @pointerdown="onPointerDown">
226
+ <button class="nuxt-devtools-icon-button nuxt-devtools-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="nuxt-devtools-label" :title="`${time[0]} load time`">
236
+ <div class="nuxt-devtools-label-main">
237
+ {{ time[1] }}
238
+ </div>
239
+ <span class="nuxt-devtools-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="nuxt-devtools-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 .nuxt-devtools-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 .nuxt-devtools-label .nuxt-devtools-label-main {
281
+ opacity: 0.8;
282
+ }
283
+
284
+ #nuxt-devtools-anchor .nuxt-devtools-label .nuxt-devtools-label-secondary {
285
+ font-size: 0.8em;
286
+ line-height: 0.6em;
287
+ opacity: 0.5;
288
+ }
289
+
290
+ #nuxt-devtools-anchor.nuxt-devtools-vertical .nuxt-devtools-nuxt-button {
291
+ transform: rotate(-90deg);
292
+ }
293
+
294
+ #nuxt-devtools-anchor.nuxt-devtools-vertical .nuxt-devtools-label {
295
+ transform: rotate(-90deg);
296
+ flex-direction: column;
297
+ gap: 2px;
298
+ padding: 0 10px;
299
+ }
300
+
301
+ #nuxt-devtools-anchor .nuxt-devtools-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.nuxt-devtools-vertical .nuxt-devtools-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 .nuxt-devtools-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 .nuxt-devtools-icon-button:hover {
338
+ opacity: 1;
339
+ }
340
+
341
+ #nuxt-devtools-anchor:hover .nuxt-devtools-glowing {
342
+ opacity: 0.6;
343
+ }
344
+
345
+ #nuxt-devtools-anchor .nuxt-devtools-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,3 @@
1
+ import type { Ref } from 'vue';
2
+ export type ColorScheme = 'dark' | 'light';
3
+ export declare function useClientColorMode(): Ref<ColorScheme>;
@@ -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 = 15;
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 = 15;
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
- bottom: 0,
11
- left: 0,
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
- if (viewMode.value !== "default")
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 { ROUTE_ANALYZE as R, WS_EVENT_NAME as W, ROUTE_CLIENT as a, module as m };
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
@@ -4,7 +4,7 @@ export * from '@nuxt/devtools-kit/types';
4
4
  interface DevToolsFrameState {
5
5
  width: number;
6
6
  height: number;
7
- bottom: number;
7
+ top: number;
8
8
  left: number;
9
9
  open: boolean;
10
10
  route: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/devtools",
3
3
  "type": "module",
4
- "version": "0.5.5",
4
+ "version": "0.6.1",
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.1",
34
- "birpc": "^0.2.11",
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": "^1.7.1",
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.8",
48
- "nypm": "^0.2.0",
48
+ "magicast": "^0.2.9",
49
+ "nypm": "^0.2.1",
49
50
  "pacote": "^15.2.0",
50
- "pathe": "^1.1.0",
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.7",
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.5.5",
64
- "@nuxt/devtools-wizard": "0.5.5"
64
+ "@nuxt/devtools-kit": "0.6.1",
65
+ "@nuxt/devtools-wizard": "0.6.1"
65
66
  },
66
67
  "devDependencies": {
67
- "@antfu/utils": "^0.7.2",
68
+ "@antfu/utils": "^0.7.4",
68
69
  "@iconify-json/bxl": "^1.1.6",
69
- "@iconify-json/carbon": "^1.1.16",
70
- "@iconify-json/logos": "^1.1.31",
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.54",
74
- "@iconify-json/tabler": "^1.1.77",
75
- "@nuxt/content": "^2.6.0",
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
- "@unocss/nuxt": "^0.52.3",
80
- "@unocss/preset-icons": "^0.52.3",
81
- "@unocss/preset-uno": "^0.52.3",
82
- "@unocss/runtime": "^0.52.3",
83
- "@vue-macros/nuxt": "^1.3.10",
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.1",
94
- "nuxt-vitest": "^0.7.1",
95
- "ofetch": "^1.0.1",
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
- "unocss": "^0.52.3",
103
- "vanilla-jsoneditor": "^0.17.4",
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.0",
110
+ "xterm": "^5.2.1",
110
111
  "xterm-addon-fit": "^0.7.0",
111
- "@nuxt/devtools": "0.5.5"
112
+ "@nuxt/devtools": "0.6.1"
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.f02d2ccc.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.e17aa9ce.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/default.2805e636.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/full.cfa15ba5.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/none.a68953c7.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.7eface6f.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-component.db5245e7.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.f02d2ccc.js" crossorigin></script></body>
7
- </html>
@@ -1 +0,0 @@
1
- import{_ as y}from"./NCodeBlock.vue.e2044e41.js";import{a as C,a$ as g,ai as h,o as a,h as n,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.f02d2ccc.js";import{a as N}from"./editor.721868d4.js";const $={key:0,relative:"","n-code-block":""},V={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?(a(),n("div",$,[s("div",V,[(a(!0),n(p,null,x(c.codeSnippets,(t,v)=>(a(),n("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)?(a(),n(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?(a(),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.6924c323.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.f02d2ccc.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.f02d2ccc.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.721868d4.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.f02d2ccc.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 _};