@nuxt/devtools 0.7.4 → 0.7.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.
- package/dist/chunks/module-main.mjs +3 -3
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/client/200.html +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/__blank/index.html +2 -2
- package/dist/client/_nuxt/Badge.809c442f.js +1 -0
- package/dist/client/_nuxt/{CodeDiff.vue.1975732c.js → CodeDiff.vue.1cd1f35a.js} +1 -1
- package/dist/client/_nuxt/CodeSnippets.vue.e2cc365d.js +1 -0
- package/dist/client/_nuxt/ComposableItem.vue.a490c449.js +1 -0
- package/dist/client/_nuxt/DataSchemaButton.vue.31fe918d.js +1 -0
- package/dist/client/_nuxt/DataSchemaDrawer.7a8538ed.js +998 -0
- package/dist/client/_nuxt/DrawerRight.vue.3bbd0e76.js +1 -0
- package/dist/client/_nuxt/{DurationDisplay.vue.383d5eee.js → DurationDisplay.vue.1533a045.js} +1 -1
- package/dist/client/_nuxt/FilepathItem.vue.a9853d6c.js +1 -0
- package/dist/client/_nuxt/HelpFab.vue.5d67494b.js +1 -0
- package/dist/client/_nuxt/LaunchPage.vue.304a6918.js +1 -0
- package/dist/client/_nuxt/NCheckbox.vue.76b79ec0.js +1 -0
- package/dist/client/_nuxt/{NCodeBlock.cf3ce05b.css → NCodeBlock.6994516c.css} +1 -1
- package/dist/client/_nuxt/NCodeBlock.vue.a8601f10.js +2 -0
- package/dist/client/_nuxt/NDropdown.vue.c183f72d.js +1 -0
- package/dist/client/_nuxt/NIconTitle.vue.e492e44a.js +1 -0
- package/dist/client/_nuxt/NLink.vue.e00535a9.js +1 -0
- package/dist/client/_nuxt/{NMarkdown.vue.b23e4e5a.js → NMarkdown.vue.7d7a1e6e.js} +1 -1
- package/dist/client/_nuxt/NSectionBlock.6778ba18.js +1 -0
- package/dist/client/_nuxt/NSelect.vue.6e592a84.js +1 -0
- package/dist/client/_nuxt/NSwitch.vue.855c3f98.js +1 -0
- package/dist/client/_nuxt/NTip.vue.6bf7cf97.js +1 -0
- package/dist/client/_nuxt/Navbar.vue.c8f5ea35.js +1 -0
- package/dist/client/_nuxt/StateEditor.vue.082de4fa.js +1 -0
- package/dist/client/_nuxt/__blank.8beed58c.js +1 -0
- package/dist/client/_nuxt/analyze-build.88782d48.js +1 -0
- package/dist/client/_nuxt/assets.dec2c564.js +16 -0
- package/dist/client/_nuxt/{client.c408b851.js → client.fbe3eaa6.js} +1 -1
- package/dist/client/_nuxt/{components.9c49e7de.js → components.99398ea7.js} +28 -28
- package/dist/client/_nuxt/custom-_name_.53810490.js +1 -0
- package/dist/client/_nuxt/default.2ae1a40e.js +1 -0
- package/dist/client/_nuxt/entry.6293ec9a.css +1 -0
- package/dist/client/_nuxt/entry.704683a1.js +21 -0
- package/dist/client/_nuxt/{error-404.d45671ef.js → error-404.bde0cadd.js} +1 -1
- package/dist/client/_nuxt/{error-500.ea2fb4de.js → error-500.524ae368.js} +1 -1
- package/dist/client/_nuxt/full.6451054a.js +1 -0
- package/dist/client/_nuxt/hooks.d1ff16ee.js +1 -0
- package/dist/client/_nuxt/imports.9142e1cd.js +1 -0
- package/dist/client/_nuxt/index.2ab6466f.js +1 -0
- package/dist/client/_nuxt/{index.3f214d8c.js → index.ef0631d4.js} +2 -2
- package/dist/client/_nuxt/{json-editor-vue.eeb71636.js → json-editor-vue.d2d6ca22.js} +1 -1
- package/dist/client/_nuxt/middleware.c86c494b.js +1 -0
- package/dist/client/_nuxt/modules.e419f21a.js +2 -0
- package/dist/client/_nuxt/none.bdacb36e.js +1 -0
- package/dist/client/_nuxt/open-graph.ae9112ee.js +3 -0
- package/dist/client/_nuxt/overview.b36ec18b.js +1 -0
- package/dist/client/_nuxt/pages.f4173ed6.js +1 -0
- package/dist/client/_nuxt/payload.8138f0c2.js +1 -0
- package/dist/client/_nuxt/plugins.192ab129.js +1 -0
- package/dist/client/_nuxt/runtime-configs.399a5d6f.js +1 -0
- package/dist/client/_nuxt/server-routes.a3646010.js +9 -0
- package/dist/client/_nuxt/settings.2dfbccf3.js +1 -0
- package/dist/client/_nuxt/{state-components.fb35f357.js → state-components.eea2cf71.js} +1 -1
- package/dist/client/_nuxt/state-modules.8cc9b26b.js +1 -0
- package/dist/client/_nuxt/storage.7aca7890.js +1 -0
- package/dist/client/_nuxt/{terminals.38d91ba1.js → terminals.b71c30e6.js} +2 -2
- package/dist/client/_nuxt/timeline.32019995.js +57 -0
- package/dist/client/_nuxt/{unocss-runtime.6378a150.js → unocss-runtime.0935bd38.js} +1 -1
- package/dist/client/_nuxt/{virtual-files.b72a117a.js → virtual-files.2f2a88f3.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/timeline/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/plugins/view/Main.vue +107 -10
- package/dist/runtime/plugins/view/client.mjs +3 -2
- package/dist/runtime/plugins/view/state.mjs +2 -1
- package/dist/shared/{devtools.d198e7a9.mjs → devtools.c34e61ba.mjs} +1 -0
- package/dist/types.d.ts +1 -11
- package/package.json +14 -13
- package/dist/client/_nuxt/AuthRequiredPanel.vue.373351c6.js +0 -1
- package/dist/client/_nuxt/Badge.5dedc481.js +0 -1
- package/dist/client/_nuxt/CodeSnippets.vue.c208c49e.js +0 -1
- package/dist/client/_nuxt/ComposableItem.vue.3b5d164d.js +0 -1
- package/dist/client/_nuxt/DrawerRight.vue.3eebe7ce.js +0 -1
- package/dist/client/_nuxt/FilepathItem.vue.2c8f962b.js +0 -1
- package/dist/client/_nuxt/HelpFab.vue.5669a6ef.js +0 -1
- package/dist/client/_nuxt/LaunchPage.vue.8830d946.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.c7e6efe4.js +0 -1
- package/dist/client/_nuxt/NCodeBlock.vue.5349dcfa.js +0 -2
- package/dist/client/_nuxt/NIconTitle.vue.d1cbff70.js +0 -1
- package/dist/client/_nuxt/NLink.vue.97d72812.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.d7e62056.js +0 -1
- package/dist/client/_nuxt/NSelect.vue.3d6e8c84.js +0 -1
- package/dist/client/_nuxt/NSwitch.vue.998f2032.js +0 -1
- package/dist/client/_nuxt/NTip.vue.7456cfb7.js +0 -1
- package/dist/client/_nuxt/Navbar.vue.7ff60442.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.876e93dc.js +0 -1
- package/dist/client/_nuxt/__blank.09a1fa28.js +0 -1
- package/dist/client/_nuxt/analyze-build.c8285851.js +0 -1
- package/dist/client/_nuxt/assets.f1991486.js +0 -16
- package/dist/client/_nuxt/custom-_name_.d5995810.js +0 -1
- package/dist/client/_nuxt/default.baee4bce.js +0 -1
- package/dist/client/_nuxt/entry.74a1b1ba.js +0 -21
- package/dist/client/_nuxt/entry.b258ed6f.css +0 -1
- package/dist/client/_nuxt/full.cc98eb50.js +0 -1
- package/dist/client/_nuxt/hooks.07e855f0.js +0 -1
- package/dist/client/_nuxt/imports.7adc12e3.js +0 -1
- package/dist/client/_nuxt/index.449a0025.js +0 -1
- package/dist/client/_nuxt/middleware.eb2b75b5.js +0 -1
- package/dist/client/_nuxt/modules.307b3d94.js +0 -2
- package/dist/client/_nuxt/none.c4d2ccfb.js +0 -1
- package/dist/client/_nuxt/open-graph.169f1c7d.js +0 -3
- package/dist/client/_nuxt/overview.4d55b1fb.js +0 -1
- package/dist/client/_nuxt/pages.7d288900.js +0 -1
- package/dist/client/_nuxt/payload.d64a004a.js +0 -1
- package/dist/client/_nuxt/plugins.a291917b.js +0 -1
- package/dist/client/_nuxt/runtime-configs.78dcb02a.js +0 -1
- package/dist/client/_nuxt/server-routes.c8bbbccf.js +0 -9
- package/dist/client/_nuxt/settings.dd6b6fef.js +0 -1
- package/dist/client/_nuxt/state-modules.b209a976.js +0 -1
- package/dist/client/_nuxt/storage.16132b2d.js +0 -1
- package/dist/client/_nuxt/timeline.da7dc20f.js +0 -57
|
@@ -119,6 +119,7 @@ function clamp(value: number, min: number, max: number) {
|
|
|
119
119
|
return Math.min(Math.max(value, min), max)
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
const isHovering = ref(false)
|
|
122
123
|
const isVertical = computed(() => state.value.position === 'left' || state.value.position === 'right')
|
|
123
124
|
|
|
124
125
|
const anchorPos = computed(() => {
|
|
@@ -153,7 +154,61 @@ const anchorPos = computed(() => {
|
|
|
153
154
|
}
|
|
154
155
|
})
|
|
155
156
|
|
|
156
|
-
|
|
157
|
+
let _timer: ReturnType<typeof setTimeout> | null = null
|
|
158
|
+
function bringUp() {
|
|
159
|
+
isHovering.value = true
|
|
160
|
+
if (state.value.minimizePanelInactive < 0)
|
|
161
|
+
return
|
|
162
|
+
if (_timer)
|
|
163
|
+
clearTimeout(_timer)
|
|
164
|
+
_timer = setTimeout(() => {
|
|
165
|
+
isHovering.value = false
|
|
166
|
+
}, +state.value.minimizePanelInactive || 0)
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const isHidden = computed(() => {
|
|
170
|
+
if (state.value.minimizePanelInactive < 0)
|
|
171
|
+
return false
|
|
172
|
+
if (state.value.minimizePanelInactive === 0)
|
|
173
|
+
return true
|
|
174
|
+
// @ts-expect-error compatibility
|
|
175
|
+
const isTouchDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0
|
|
176
|
+
return !isDragging.value
|
|
177
|
+
&& !state.value.open
|
|
178
|
+
&& !isHovering.value
|
|
179
|
+
&& !isTouchDevice
|
|
180
|
+
&& state.value.minimizePanelInactive
|
|
181
|
+
})
|
|
182
|
+
|
|
183
|
+
const anchorStyle = computed(() => ({
|
|
184
|
+
left: `${anchorPos.value.left}px`,
|
|
185
|
+
top: `${anchorPos.value.top}px`,
|
|
186
|
+
}))
|
|
187
|
+
|
|
188
|
+
const panelStyle = computed(() => {
|
|
189
|
+
const style: any = {
|
|
190
|
+
transform: isVertical.value
|
|
191
|
+
? `translate(${isHidden.value ? `calc(-50% ${state.value.position === 'right' ? '+' : '-'} 15px)` : '-50%'}, -50%) rotate(90deg)`
|
|
192
|
+
: `translate(-50%, ${isHidden.value ? `calc(-50% ${state.value.position === 'top' ? '-' : '+'} 15px)` : '-50%'})`,
|
|
193
|
+
}
|
|
194
|
+
if (isHidden.value) {
|
|
195
|
+
switch (state.value.position) {
|
|
196
|
+
case 'top':
|
|
197
|
+
case 'right':
|
|
198
|
+
style.borderTopLeftRadius = '0'
|
|
199
|
+
style.borderTopRightRadius = '0'
|
|
200
|
+
break
|
|
201
|
+
case 'bottom':
|
|
202
|
+
case 'left':
|
|
203
|
+
style.borderBottomLeftRadius = '0'
|
|
204
|
+
style.borderBottomRightRadius = '0'
|
|
205
|
+
break
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
if (isDragging.value)
|
|
209
|
+
style.transition = 'none !important'
|
|
210
|
+
return style
|
|
211
|
+
})
|
|
157
212
|
|
|
158
213
|
const iframeStyle = computed(() => {
|
|
159
214
|
// eslint-disable-next-line no-unused-expressions, no-sequences
|
|
@@ -240,10 +295,15 @@ const time = computed(() => {
|
|
|
240
295
|
time = metric.appLoad - metric.appInit
|
|
241
296
|
type = 'App'
|
|
242
297
|
}
|
|
298
|
+
bringUp()
|
|
243
299
|
if (time < 0)
|
|
244
300
|
return [type, '', '-']
|
|
245
301
|
return [type, ...millisecondToHumanreadable(time)]
|
|
246
302
|
})
|
|
303
|
+
|
|
304
|
+
onMounted(() => {
|
|
305
|
+
bringUp()
|
|
306
|
+
})
|
|
247
307
|
</script>
|
|
248
308
|
|
|
249
309
|
<template>
|
|
@@ -251,10 +311,19 @@ const time = computed(() => {
|
|
|
251
311
|
id="nuxt-devtools-anchor"
|
|
252
312
|
ref="anchorEl"
|
|
253
313
|
:style="[anchorStyle, vars]"
|
|
254
|
-
:class="{
|
|
314
|
+
:class="{
|
|
315
|
+
'nuxt-devtools-vertical': isVertical,
|
|
316
|
+
'nuxt-devtools-hide': isHidden,
|
|
317
|
+
}"
|
|
318
|
+
@mousemove="bringUp"
|
|
255
319
|
>
|
|
256
320
|
<div v-if="!isSafari" class="nuxt-devtools-glowing" :style="isDragging ? 'opacity: 0.6 !important' : ''" />
|
|
257
|
-
<div
|
|
321
|
+
<div
|
|
322
|
+
ref="panelEl"
|
|
323
|
+
class="nuxt-devtools-panel"
|
|
324
|
+
:style="panelStyle"
|
|
325
|
+
@pointerdown="onPointerDown"
|
|
326
|
+
>
|
|
258
327
|
<button
|
|
259
328
|
class="nuxt-devtools-icon-button nuxt-devtools-nuxt-button"
|
|
260
329
|
title="Toggle Nuxt DevTools"
|
|
@@ -268,8 +337,14 @@ const time = computed(() => {
|
|
|
268
337
|
<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" />
|
|
269
338
|
</svg>
|
|
270
339
|
</button>
|
|
271
|
-
<div
|
|
272
|
-
|
|
340
|
+
<div
|
|
341
|
+
style="border-left: 1px solid #8883;width:1px;height:10px;"
|
|
342
|
+
class="nuxt-devtools-panel-content"
|
|
343
|
+
/>
|
|
344
|
+
<div
|
|
345
|
+
class="nuxt-devtools-panel-content nuxt-devtools-label"
|
|
346
|
+
:title="`${time[0]} load time`"
|
|
347
|
+
>
|
|
273
348
|
<div class="nuxt-devtools-label-main">
|
|
274
349
|
{{ time[1] }}
|
|
275
350
|
</div>
|
|
@@ -278,8 +353,11 @@ const time = computed(() => {
|
|
|
278
353
|
</span>
|
|
279
354
|
</div>
|
|
280
355
|
<template v-if="client.inspector">
|
|
281
|
-
<div
|
|
282
|
-
|
|
356
|
+
<div
|
|
357
|
+
style="border-left: 1px solid #8883;width:1px;height:10px;"
|
|
358
|
+
class="nuxt-devtools-panel-content"
|
|
359
|
+
/>
|
|
360
|
+
<button class="nuxt-devtools-icon-button nuxt-devtools-panel-content" title="Toggle Component Inspector" @click="client.inspector.toggle">
|
|
283
361
|
<svg
|
|
284
362
|
xmlns="http://www.w3.org/2000/svg"
|
|
285
363
|
style="height: 1.2em; width: 1.2em; opacity:0.5;"
|
|
@@ -341,6 +419,10 @@ const time = computed(() => {
|
|
|
341
419
|
opacity: 0.5;
|
|
342
420
|
}
|
|
343
421
|
|
|
422
|
+
#nuxt-devtools-anchor .nuxt-devtools-nuxt-button {
|
|
423
|
+
flex: none;
|
|
424
|
+
}
|
|
425
|
+
|
|
344
426
|
#nuxt-devtools-anchor.nuxt-devtools-vertical .nuxt-devtools-nuxt-button {
|
|
345
427
|
transform: rotate(-90deg);
|
|
346
428
|
}
|
|
@@ -358,7 +440,8 @@ const time = computed(() => {
|
|
|
358
440
|
top: 0;
|
|
359
441
|
transform: translate(-50%, -50%);
|
|
360
442
|
display: flex;
|
|
361
|
-
justify-content:
|
|
443
|
+
justify-content: start;
|
|
444
|
+
overflow: hidden;
|
|
362
445
|
align-items: center;
|
|
363
446
|
gap: 2px;
|
|
364
447
|
height: 30px;
|
|
@@ -369,9 +452,15 @@ const time = computed(() => {
|
|
|
369
452
|
backdrop-filter: blur(10px);
|
|
370
453
|
color: var(--nuxt-devtools-widget-fg);
|
|
371
454
|
box-shadow: 2px 2px 8px var(--nuxt-devtools-widget-shadow);
|
|
372
|
-
transition: background 0.2s ease;
|
|
373
455
|
user-select: none;
|
|
374
456
|
touch-action: none;
|
|
457
|
+
max-width: 150px;
|
|
458
|
+
transition: max-width 0.6s ease, padding 0.5s ease, transform 0.4s ease, all 0.6s ease;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
#nuxt-devtools-anchor.nuxt-devtools-hide .nuxt-devtools-panel {
|
|
462
|
+
max-width: 32px;
|
|
463
|
+
padding: 2px 0;
|
|
375
464
|
}
|
|
376
465
|
|
|
377
466
|
#nuxt-devtools-anchor.nuxt-devtools-vertical .nuxt-devtools-panel {
|
|
@@ -379,6 +468,14 @@ const time = computed(() => {
|
|
|
379
468
|
box-shadow: 2px -2px 8px var(--nuxt-devtools-widget-shadow);
|
|
380
469
|
}
|
|
381
470
|
|
|
471
|
+
#nuxt-devtools-anchor .nuxt-devtools-panel-content {
|
|
472
|
+
transition: opacity 0.4s ease;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
#nuxt-devtools-anchor.nuxt-devtools-hide .nuxt-devtools-panel-content {
|
|
476
|
+
opacity: 0;
|
|
477
|
+
}
|
|
478
|
+
|
|
382
479
|
#nuxt-devtools-anchor .nuxt-devtools-icon-button {
|
|
383
480
|
border-radius: 100%;
|
|
384
481
|
border-width: 0;
|
|
@@ -406,7 +503,7 @@ const time = computed(() => {
|
|
|
406
503
|
width: 160px;
|
|
407
504
|
height: 160px;
|
|
408
505
|
opacity: 0;
|
|
409
|
-
transition: all
|
|
506
|
+
transition: all 1s ease;
|
|
410
507
|
pointer-events: none;
|
|
411
508
|
z-index: -1;
|
|
412
509
|
border-radius: 9999px;
|
|
@@ -56,7 +56,8 @@ export async function setupDevToolsClient({
|
|
|
56
56
|
inspector: getInspectorInstance(),
|
|
57
57
|
colorMode,
|
|
58
58
|
getIframe,
|
|
59
|
-
updateClient
|
|
59
|
+
updateClient,
|
|
60
|
+
frameState: state
|
|
60
61
|
});
|
|
61
62
|
let iframe;
|
|
62
63
|
function updateClient() {
|
|
@@ -195,7 +196,7 @@ export async function setupDevToolsClient({
|
|
|
195
196
|
document.body.appendChild(holder);
|
|
196
197
|
addEventListener("keydown", (e) => {
|
|
197
198
|
if (e.code === "KeyD" && e.altKey && e.shiftKey)
|
|
198
|
-
client.
|
|
199
|
+
client.toggle();
|
|
199
200
|
});
|
|
200
201
|
const app = createApp({
|
|
201
202
|
render: () => h(Main, { client }),
|
package/dist/types.d.ts
CHANGED
|
@@ -3,16 +3,6 @@ import { ModuleStaticInfo } from '@nuxt/devtools-kit/types';
|
|
|
3
3
|
export * from '@nuxt/devtools-kit/types';
|
|
4
4
|
import 'vite-plugin-vue-inspector';
|
|
5
5
|
|
|
6
|
-
interface DevToolsFrameState {
|
|
7
|
-
width: number;
|
|
8
|
-
height: number;
|
|
9
|
-
top: number;
|
|
10
|
-
left: number;
|
|
11
|
-
open: boolean;
|
|
12
|
-
route: string;
|
|
13
|
-
position: 'left' | 'right' | 'bottom' | 'top';
|
|
14
|
-
closeOnOutsideClick: boolean;
|
|
15
|
-
}
|
|
16
6
|
interface SocialPreviewResolved {
|
|
17
7
|
url?: string;
|
|
18
8
|
title?: string;
|
|
@@ -49,4 +39,4 @@ interface AnalyzeBuildingState {
|
|
|
49
39
|
}
|
|
50
40
|
type ModuleActionType = 'install' | 'uninstall';
|
|
51
41
|
|
|
52
|
-
export { AnalyzeBuildingState,
|
|
42
|
+
export { AnalyzeBuildingState, InstallingModulestate, ModuleActionType, NormalizedHeadTag, SocialPreviewCard, SocialPreviewResolved };
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.5",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "nuxt/devtools",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
9
|
"types": "./dist/module.d.ts",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
10
|
+
"import": "./dist/module.mjs",
|
|
11
|
+
"require": "./module.cjs"
|
|
12
12
|
},
|
|
13
13
|
"./types": {
|
|
14
14
|
"types": "./dist/types.d.ts",
|
|
@@ -56,23 +56,23 @@
|
|
|
56
56
|
"rc9": "^2.1.1",
|
|
57
57
|
"semver": "^7.5.4",
|
|
58
58
|
"sirv": "^2.0.3",
|
|
59
|
-
"unimport": "^3.1.
|
|
59
|
+
"unimport": "^3.1.3",
|
|
60
60
|
"vite-plugin-inspect": "^0.7.35",
|
|
61
61
|
"vite-plugin-vue-inspector": "^3.5.0",
|
|
62
62
|
"wait-on": "^7.0.1",
|
|
63
63
|
"which": "^3.0.1",
|
|
64
64
|
"ws": "^8.13.0",
|
|
65
|
-
"@nuxt/devtools-kit": "0.7.
|
|
66
|
-
"@nuxt/devtools-wizard": "0.7.
|
|
65
|
+
"@nuxt/devtools-kit": "0.7.5",
|
|
66
|
+
"@nuxt/devtools-wizard": "0.7.5"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@antfu/utils": "^0.7.5",
|
|
70
|
-
"@iconify-json/bxl": "^1.1.
|
|
71
|
-
"@iconify-json/carbon": "^1.1.
|
|
72
|
-
"@iconify-json/logos": "^1.1.
|
|
73
|
-
"@iconify-json/ri": "^1.1.
|
|
74
|
-
"@iconify-json/simple-icons": "^1.1.
|
|
75
|
-
"@iconify-json/tabler": "^1.1.
|
|
70
|
+
"@iconify-json/bxl": "^1.1.7",
|
|
71
|
+
"@iconify-json/carbon": "^1.1.19",
|
|
72
|
+
"@iconify-json/logos": "^1.1.34",
|
|
73
|
+
"@iconify-json/ri": "^1.1.12",
|
|
74
|
+
"@iconify-json/simple-icons": "^1.1.64",
|
|
75
|
+
"@iconify-json/tabler": "^1.1.87",
|
|
76
76
|
"@nuxt/content": "^2.7.2",
|
|
77
77
|
"@nuxtjs/color-mode": "^3.3.0",
|
|
78
78
|
"@parcel/watcher": "^2.2.0",
|
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
"nuxt-vitest": "^0.10.2",
|
|
96
96
|
"ofetch": "^1.1.1",
|
|
97
97
|
"ohash": "^1.1.2",
|
|
98
|
+
"quicktype-core": "^23.0.64",
|
|
98
99
|
"shiki": "^0.14.3",
|
|
99
100
|
"shiki-es": "^0.14.0",
|
|
100
101
|
"simple-git": "^3.19.1",
|
|
@@ -110,7 +111,7 @@
|
|
|
110
111
|
"vue-virtual-scroller": "2.0.0-beta.8",
|
|
111
112
|
"xterm": "^5.2.1",
|
|
112
113
|
"xterm-addon-fit": "^0.7.0",
|
|
113
|
-
"@nuxt/devtools": "0.7.
|
|
114
|
+
"@nuxt/devtools": "0.7.5"
|
|
114
115
|
},
|
|
115
116
|
"scripts": {
|
|
116
117
|
"build": "pnpm dev:prepare && pnpm build:module && pnpm build:client && esno scripts/prepare.ts",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as y,aa as x,ar as n,bm as _,A as l,r as m,s as c,h as g,w as d,Y as A,i as w,o as N,b as s,a as e,d as i,L as T,aR as q,a$ as V,bn as B,k as $,M as C,S as D,ad as P}from"./entry.74a1b1ba.js";const S=e("h3",{class:"mb2 text-lg font-medium leading-6",flex:"~ items-center gap-1","text-orange":""},[e("span",{class:"i-carbon-information-square"}),i(" Permissions required ")],-1),I=e("p",null," This operation requires permissions for running command and access files from the browser. ",-1),K=e("p",null,[i(" A request is sent to the server."),e("br"),i(" Please check your terminal for the instructions and then come back. ")],-1),M={flex:"~ gap-3",mt2:"","justify-end":""},R=e("p",null,"Or you can manually paste the token here:",-1),F=["onSubmit"],E=y({__name:"AuthRequiredPanel",setup(j){x(async()=>{n.value||_.value&&await l.verifyAuthToken(_.value)&&(n.value=!0),n.value||l.requestForAuth()});const o=m(""),r=m(!1);async function u(){const t=o.value.trim();r.value=!1,await l.verifyAuthToken(t).then(a=>{a?(n.value=!0,B(t)):r.value=!0})}return(t,a)=>{const f=$,p=C,h=D,v=P,k=w;return("isDevAuthed"in t?t.isDevAuthed:c(n))?A(t.$slots,"default",{key:1}):(N(),g(k,{key:0},{default:d(()=>[s(v,{flex:"~ col gap-2",mxa:"","items-center":"",p6:"","text-center":""},{default:d(()=>[S,I,K,e("div",M,[s(f,{disabled:"",icon:"i-carbon-time"},{default:d(()=>[i(" Waiting for authorization... ")]),_:1})]),R,e("form",{flex:"~ inline gap-2 items-center",onSubmit:V(u,["prevent"])},[s(p,{modelValue:c(o),"onUpdate:modelValue":a[0]||(a[0]=b=>T(o)?o.value=b:null),placeholder:"Enter token here",n:c(r)?"red":void 0,onKeydown:q(u,["enter"])},null,8,["modelValue","n","onKeydown"]),s(h,{icon:"i-carbon-arrow-right",onClick:u})],40,F)]),_:1})]),_:1}))}}});export{E as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as n,o,c as s,Y as t}from"./entry.74a1b1ba.js";const c={},r={class:"mx-0.5 select-none whitespace-nowrap rounded px-1.5 py-0.5 text-xs"};function _(e,a){return o(),s("span",r,[t(e.$slots,"default")])}const l=n(c,[["render",_]]);export{l as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as y}from"./NCodeBlock.vue.5349dcfa.js";import{g as C,bf as h,a2 as S,am as w,o as s,c as n,a,F as i,n as x,q as u,s as o,t as B,b as _,w as f,d as m,h as N,v as l,k as V}from"./entry.74a1b1ba.js";const $={key:0,relative:"","n-code-block":""},D={flex:"~ wrap","w-full":""},E=["onClick"],F=a("div",{border:"b base","flex-auto":""},null,-1),q={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},T=C({__name:"CodeSnippets",props:{codeSnippets:{}},setup(b){const c=b,e=h(c.codeSnippets[0]),k=S();return w(()=>{c.codeSnippets.includes(e.value)||(e.value=c.codeSnippets[0])}),(r,p)=>{const v=y,d=V;return r.codeSnippets.length?(s(),n("div",$,[a("div",D,[(s(!0),n(i,null,x(r.codeSnippets,(t,g)=>(s(),n("button",{key:g,px4:"",py2:"",border:"r base",hover:"bg-active",class:u(t===o(e)?"":"border-b"),onClick:z=>e.value=t},[a("div",{class:u(t===o(e)?"":"op30"),"font-mono":""},B(t.name),3)],10,E))),128)),F]),o(e)?(s(),n(i,{key:0},[_(v,{code:o(e).code,lang:o(e).lang,lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),a("div",q,[_(d,{icon:"carbon-copy",onClick:p[0]||(p[0]=t=>o(k)(o(e).code))},{default:f(()=>[m(" Copy ")]),_:1}),o(e)?.docs?(s(),N(d,{key:0,to:o(e).docs,target:"_blank",icon:"carbon-catalog"},{default:f(()=>[m(" Docs ")]),_:1},8,["to"])):l("",!0)])],64)):l("",!0)])):l("",!0)}}});export{T as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as I}from"./NMarkdown.vue.b23e4e5a.js";import{g as V,a2 as D,Z as U,m as c,ae as $,o as a,h as r,w as i,a as o,v as l,b as E,s as e,d as u,c as _,F as v,t as h,n as F,q as j,k as S}from"./entry.74a1b1ba.js";import{_ as q}from"./FilepathItem.vue.2c8f962b.js";import{C as k}from"./constants.4e5eba24.js";const z={"hover:text-primary":""},L={key:0,"text-primary":""},M={"max-w-100":""},O={px4:"",py3:"","text-sm":""},T={flex:"~ gap2",n:"primary xs"},W={border:"t base","max-h-60":"","of-auto":"",px4:"",py3:""},Z={"text-sm":""},A=o("span",{op50:""},"It has been referenced ",-1),G={"text-primary":""},H=o("span",{op50:""}," times by:",-1),J={flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},K={key:1,"text-sm":"",op50:""},Y=V({__name:"ComposableItem",props:{item:{},metadata:{},filepath:{},counter:{type:Boolean,default:!0},classes:{default:"px2 py1 text-sm bg-gray:5 "}},setup(x){const t=x,b=D(),g=U(),m=c(()=>t.item.as||t.item.name),n=c(()=>t.metadata?.injectionUsage?.[m.value]?.count||0),C=c(()=>(t.metadata?.injectionUsage?.[m.value]?.moduleIds||[]).filter(s=>!s.endsWith("?macro=true"))),y=c(()=>{if(t.item.meta?.docsUrl)return t.item.meta.docsUrl;if(["nuxt","#app","nuxt3"].includes(t.item.from))return k.nuxt[t.item.name];if(t.item.from==="vue")return k.vue[t.item.name]});return(s,p)=>{const w=I,f=S,N=q,B=$("VDropdown");return a(),r(B,{disabled:!t.metadata},{popper:i(()=>[o("div",M,[o("div",O,[s.item.meta?.description?(a(),r(w,{key:0,tag:"div",pb3:"","text-sm":"",markdown:s.item.meta.description},null,8,["markdown"])):l("",!0),o("div",T,[E(f,{icon:"carbon-copy",onClick:p[0]||(p[0]=d=>e(b)(e(m)))},{default:i(()=>[u(" Copy ")]),_:1}),s.filepath?(a(),r(f,{key:0,icon:"carbon-code",onClick:p[1]||(p[1]=d=>s.filepath&&e(g)(s.filepath))},{default:i(()=>[u(" Source ")]),_:1})):l("",!0),e(y)?(a(),r(f,{key:1,icon:"carbon-catalog",to:e(y),target:"_blank"},{default:i(()=>[u(" Docs ")]),_:1},8,["to"])):l("",!0)])]),o("div",W,[e(n)?(a(),_(v,{key:0},[o("div",Z,[A,o("strong",G,h(e(n)),1),H]),o("div",J,[(a(!0),_(v,null,F(e(C),d=>(a(),r(N,{key:d,filepath:d},null,8,["filepath"]))),128))])],64)):(a(),_("div",K," Not in use via auto import. "))])])]),default:i(()=>[o("button",z,[o("code",{rounded:"","font-mono":"",class:j([s.metadata&&!e(n)?"op30 hover:op100":"",s.classes])},[u(h(e(m))+" ",1),e(n)&&s.counter?(a(),_("sup",L,"x"+h(e(n)),1)):l("",!0)],2)])]),_:1},8,["disabled"])}}});export{Y as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as i,r as u,bg as m,aw as f,h as d,w as p,aG as b,o as s,c as v,b as _,a as g,Y as h,aE as x,s as y,v as k,S as B}from"./entry.74a1b1ba.js";const C={relative:"","h-full":"","w-full":"","of-auto":""},V={inheritAttrs:!1},z=i({...V,__name:"DrawerRight",props:{modelValue:{type:Boolean},navbar:{},autoClose:{type:Boolean}},emits:["close"],setup(r,{emit:l}){const t=r,o=u(),{height:n}=m(()=>t.navbar,void 0,{box:"border-box"});return f(o,()=>{t.modelValue&&t.autoClose&&l("close")},{ignore:["a","button","summary",'[role="dialog"]']}),(e,a)=>{const c=B;return s(),d(b,{"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:p(()=>[e.modelValue?(s(),v("div",x({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:`${y(n)}px`}},e.$attrs),[_(c,{absolute:"","right-2":"","top-2":"","z-20":"","text-xl":"",icon:"carbon-close",onClick:a[0]||(a[0]=$=>e.$emit("close"))}),g("div",C,[h(e.$slots,"default")])],16)):k("",!0)]),_:3})}}});export{z as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as u,Z as f,a1 as c,m as v,a_ as k,o as t,h as y,w as B,c as s,F as l,d,t as n,s as a,a as C,v as g,q as N,ai as b}from"./entry.74a1b1ba.js";const w={key:0,op50:""},F=u({__name:"FilepathItem",props:{filepath:{},lineBreak:{type:Boolean},subpath:{type:Boolean},override:{}},setup(m){const r=m,h=f(),p=c(),o=v(()=>r.filepath&&p.value?k(r.filepath,p.value.rootDir):{path:r.filepath||""});return(e,i)=>(t(),y(b(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:i[0]||(i[0]=D=>e.filepath&&a(h)(e.filepath))},{default:B(()=>[e.override?(t(),s(l,{key:0},[d(n(e.override),1)],64)):a(o).moduleName?(t(),s(l,{key:1},[C("span",null,n(a(o).moduleName),1),e.subpath?(t(),s("span",w,n(a(o).path.slice(a(o).moduleName.length)),1)):g("",!0)],64)):(t(),s(l,{key:2},[d(n(a(o).path),1)],64))]),_:1},8,["class","title"]))}});export{F as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as f,r as _,s as o,c as s,a as d,b as a,w as i,aG as u,F as m,v as n,o as l,Y as v,ac as g,S as k}from"./entry.74a1b1ba.js";const h=d("div",{"i-ri:question-mark":""},null,-1),x=[h],w={key:0,border:"l base",class:"prose",pos:"fixed bottom-0 right-0 top-0","z-200":"","h-full":"","w-150":"","overflow-auto":"",px8:"",py4:"","bg-base":""},B=f({__name:"HelpFab",setup(y){const e=_(!1),{showHelpButtons:p}=g();return(b,t)=>{const c=k;return o(p)?(l(),s(m,{key:0},[d("button",{pos:"absolute bottom-5 right-5",border:"~ base rounded-full ",flex:"~ items-center justify-center","z-110":"","h-11":"","w-11":"","backdrop-blur-8":"",bg:"bg-base op50!","light:shadow":"",hover:"bg-active",title:"Help",onClick:t[0]||(t[0]=r=>e.value=!o(e))},x),a(u,{name:"fade-in"},{default:i(()=>[o(e)?(l(),s("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:t[1]||(t[1]=r=>e.value=!1)})):n("",!0)]),_:1}),a(u,{name:"slide-in"},{default:i(()=>[o(e)?(l(),s("div",w,[v(b.$slots,"default"),a(c,{icon:"carbon-close",pos:"absolute top-3 right-3","rounded-full":"","text-xl":"",onClick:t[2]||(t[2]=r=>e.value=!1)})])):n("",!0)]),_:3})],64)):n("",!0)}}});export{B as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as k,h as o,w as a,i as b,o as t,b as r,a as c,t as i,v as _,c as g,n as h,aE as N,d as w,F as x,br as C,T as y,k as B,ad as $}from"./entry.74a1b1ba.js";import{_ as V}from"./NMarkdown.vue.b23e4e5a.js";const v={"text-xl":""},P={flex:"~ gap2 wrap"},L=k({__name:"LaunchPage",props:{icon:{},title:{},description:{},actions:{}},emits:["action"],setup(T){return(e,E)=>{const l=C,m=V,p=y,d=B,u=$,f=b;return t(),o(f,null,{default:a(()=>[r(u,{flex:"~ col gap2",mxa:"","min-w-100":"","items-center":"",p6:""},{default:a(()=>[r(l,{mb2:"","text-5xl":"",icon:e.icon||e.icon,title:e.title},null,8,["icon","title"]),c("h1",v,i(e.title),1),e.description?(t(),o(m,{key:0,mb2:"","mt--1":"","text-center":"","text-base":"",op50:"",markdown:e.description},null,8,["markdown"])):_("",!0),c("div",P,[(t(!0),g(x,null,h(e.actions,(n,s)=>(t(),o(d,N({key:s,n:"solid primary",disabled:n.pending,to:n.src,target:n.src?"_blank":void 0},n.attrs,{onClick:()=>{n.handle?.(),e.$emit("action",s)}}),{default:a(()=>[n.pending?(t(),o(p,{key:0,icon:"carbon-circle-dash","animate-spin":""})):_("",!0),w(" "+i(n.label),1)]),_:2},1040,["disabled","to","target","onClick"]))),128))])]),_:1})]),_:1})}}});export{L as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as i,X as r,c as p,y as b,by as u,s as o,a as n,L as h,aR as k,b as f,Y as m,q as v,o as _,T as x}from"./entry.74a1b1ba.js";const y=["checked","disabled"],V=["disabled"],B={class:"n-checkbox-box n-checked:n-checkbox-box-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition"},$=i({__name:"NCheckbox",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(c,{emit:t}){const e=r(c,"modelValue",t,{passive:!0});return(a,s)=>{const d=x;return _(),p("label",{class:"n-checkbox hover:n-checkbox-hover select-none items-center n-disabled:n-disabled",checked:o(e)||null,disabled:a.disabled||null},[b(n("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>h(e)?e.value=l:null),type:"checkbox",class:"peer absolute op0",disabled:a.disabled,onKeypress:s[1]||(s[1]=k(l=>e.value=!o(e),["enter"]))},null,40,V),[[u,o(e)]]),n("span",B,[f(d,{class:"n-checkbox-icon scale-0 transform op0 n-transition n-checked:scale-100 n-checked:op100"})]),n("span",{class:v([o(e)?"":"op50","n-transition"])},[m(a.$slots,"default")],2)],8,y)}}});export{$ as _};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as u}from"./client.c408b851.js";import{g as _,m,al as k,o as n,c as s,q as r,a as t,F as d,n as f,t as g}from"./entry.74a1b1ba.js";const h=["innerHTML"],C={class:"shiki"},v=["textContent"],y=t("br",null,null,-1),H=_({__name:"NCodeBlock",props:{code:{},lang:{},lines:{type:Boolean,default:!0},transformRendered:{}},emits:["loaded"],setup(a,{emit:c}){const o=a,l=m(()=>{const e=u.value?.devtools.renderCodeHighlight(o.code,o.lang)||{code:o.code,supported:!1};return e.supported&&o.transformRendered&&(e.code=o.transformRendered(e.code)),e.supported&&k(()=>c("loaded")),e});return(e,B)=>e.lang&&l.value.supported?(n(),s("pre",{key:0,class:r(["n-code-block",e.lines?"n-code-block-lines":""]),innerHTML:l.value.code},null,10,h)):(n(),s("pre",{key:1,class:r(["n-code-block",e.lines?"n-code-block-lines":""])},[t("pre",C,[t("code",null,[(n(!0),s(d,null,f(e.code.split(`
|
|
2
|
-
`),(i,p)=>(n(),s(d,{key:p},[t("span",{class:"line",textContent:g(i)},null,8,v),y],64))),128))])])],2))}});export{H as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as t,o,c as s,q as a,v as n,Y as r,a as l,t as i}from"./entry.74a1b1ba.js";const c={flex:"~ gap-3","items-center":""},u=t({__name:"NIconTitle",props:{icon:{},text:{}},setup(p){return(e,m)=>(o(),s("div",c,[e.icon?(o(),s("div",{key:0,class:a(e.icon)},null,2)):n("",!0),r(e.$slots,"default",{},()=>[l("div",null,i(e.text),1)])]))}});export{u as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as n,o as a,h as o,w as s,Y as r,aE as t,ai as p,s as i,e as l}from"./entry.74a1b1ba.js";const c=n({__name:"NLink",props:{to:{},href:{},target:{}},setup(_){return(e,m)=>(a(),o(p(e.href||e.target?"a":i(l)),t(e.$props,{class:"n-link n-transition hover:n-link-hover n-link-base"}),{default:s(()=>[r(e.$slots,"default")]),_:3},16))}});export{c as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g,X as y,c as r,a as o,q as n,b,w,s as i,F as c,y as B,z as S,Y as s,v as d,o as l,d as u,t as v,h as $,p as C,f as N,T as k,_ as I}from"./entry.74a1b1ba.js";import{_ as x}from"./NIconTitle.vue.d1cbff70.js";const f=t=>(C("data-v-a73dbcfe"),t=t(),N(),t),V=["open"],z={"text-base":""},T={key:0,"text-sm":"",op50:""},D=f(()=>o("div",{class:"flex-auto"},null,-1)),F=f(()=>o("div",{class:"x-divider"},null,-1)),q=g({__name:"NSectionBlock",props:{icon:{},text:{},description:{},containerClass:{default:""},headerClass:{},collapse:{type:Boolean,default:!0},open:{type:Boolean,default:!0},padding:{type:[Boolean,String],default:!0}},setup(t){const a=y(t,"open",void 0,{passive:!0});function _(e){a.value=e.target.open}return(e,p)=>{const m=k,h=x;return l(),r(c,null,[o("details",{open:i(a),onToggle:_},[o("summary",{class:n(["cursor-pointer select-none hover:bg-active p4",e.collapse?"":"pointer-events-none"])},[b(h,{icon:e.icon,text:e.text,"text-xl":"",transition:"",class:n([i(a)?"op100":"op60",e.headerClass])},{default:w(()=>[o("div",null,[o("div",z,[s(e.$slots,"text",{},()=>[u(v(e.text),1)],!0)]),e.description||e.$slots.description?(l(),r("div",T,[s(e.$slots,"description",{},()=>[u(v(e.description),1)],!0)])):d("",!0)]),D,s(e.$slots,"actions",{},void 0,!0),e.collapse?(l(),$(m,{key:0,icon:"carbon-chevron-down",class:"chevron","cursor-pointer":"","place-self-start":"","text-base":"",op75:"",transition:"","duration-500":""})):d("",!0)]),_:3},8,["icon","text","class"])],2),p._lazyshow1||i(a)?(p._lazyshow1=!0,l(),r(c,null,[B(o("div",{class:n(["flex flex-col flex-gap2 pb6 pt2",typeof e.padding=="string"?e.padding:e.padding?"px4":""])},[s(e.$slots,"details",{},void 0,!0),o("div",{class:n([e.containerClass,"mt1"])},[s(e.$slots,"default",{},void 0,!0)],2),s(e.$slots,"footer",{},void 0,!0)],2),[[S,i(a)]])],64)):d("v-show-if",!0)],40,V),F],64)}}});const Y=I(q,[["__scopeId","data-v-a73dbcfe"]]);export{Y as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as u,X as p,c as t,Y as l,y as f,bz as m,s as b,a as h,t as v,v as n,L as _,o as s,h as y,T as V}from"./entry.74a1b1ba.js";const k={class:"n-text-input flex flex items-center border n-border-base rounded px-2 py-1 focus-within:n-focus-base focus-within:border-context n-bg-base"},B=["disabled"],g={key:0,value:"",disabled:"",hidden:""},S=u({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(d,{emit:i}){const o=p(d,"modelValue",i,{passive:!0});return(e,a)=>{const r=V;return s(),t("div",k,[l(e.$slots,"icon",{},()=>[e.icon?(s(),y(r,{key:0,icon:e.icon,class:"mr-0.4em text-1.1em op50"},null,8,["icon"])):n("",!0)]),f(h("select",{"onUpdate:modelValue":a[0]||(a[0]=c=>_(o)?o.value=c:null),disabled:e.disabled,class:"w-full flex-auto n-bg-base !outline-none"},[e.placeholder?(s(),t("option",g,v(e.placeholder),1)):n("",!0),l(e.$slots,"default")],8,B),[[m,b(o)]])])}}});export{S as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as i,X as c,o as r,c as u,y as h,by as p,s as l,a as t,L as b,aR as v,Y as f}from"./entry.74a1b1ba.js";const k=["checked","disabled"],m=["disabled"],w=t("div",{class:"n-switch-slider n-checked:n-switch-slider-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition"},[t("div",{class:"n-checked:n-switch-thumb-checked n-switch-thumb n-transition"})],-1),B=i({__name:"NSwitch",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(o,{emit:d}){const e=c(o,"modelValue",d,{passive:!0});return(a,s)=>(r(),u("label",{class:"n-switch n-switch-base hover:n-switch-hover n-disabled:n-disabled",checked:l(e)||null,disabled:a.disabled||null},[h(t("input",{"onUpdate:modelValue":s[0]||(s[0]=n=>b(e)?e.value=n:null),type:"checkbox",class:"peer absolute op0",disabled:a.disabled,onKeypress:s[1]||(s[1]=v(n=>e.value=!l(e),["enter"]))},null,40,m),[[p,l(e)]]),w,f(a.$slots,"default")],8,k))}});export{B as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as a,o,c,Y as n,h as t,v as i,a as r,T as l}from"./entry.74a1b1ba.js";const p={class:"n-tip n-tip-base"},u=a({__name:"NTip",props:{icon:{}},setup(_){return(e,m)=>{const s=l;return o(),c("div",p,[n(e.$slots,"icon",{},()=>[e.icon?(o(),t(s,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):i("",!0)]),r("div",null,[n(e.$slots,"default")])])}}});export{u as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as r,c,a as d,Y as s,q as n,o as i,b as p,M as u}from"./entry.74a1b1ba.js";const f={flex:"~ gap4","items-center":""},g=r({__name:"Navbar",props:{search:{type:String,default:void 0},noPadding:{type:Boolean,default:!1}},emits:["update:search"],setup(a,{emit:t}){function o(e){t("update:search",e.target.value)}return(e,m)=>{const l=u;return i(),c("div",{flex:"~ col gap2",border:"b base","flex-1":"","navbar-glass":"",class:n([{p4:!a.noPadding}])},[d("div",f,[s(e.$slots,"search",{},()=>[p(l,{placeholder:"Search...",icon:"carbon-search",n:"primary","flex-auto":"",class:n({"px-5 py-2":!a.noPadding}),value:a.search,onInput:o},null,8,["class","value"])]),s(e.$slots,"actions")]),s(e.$slots,"default")],2)}}});export{g as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as h,X as B,a7 as N,r as V,aZ as C,b1 as O,o as l,c as f,a as i,q as p,s as a,t as w,v as u,Y as $,aH as J,aI as P,h as v,aE as j,b2 as z,L as E,al as M,S as R}from"./entry.74a1b1ba.js";import{U}from"./json-editor-vue.eeb71636.js";const A=["open"],G={flex:"~ gap2","select-none":"","items-center":"",px4:""},q=h({__name:"StateEditor",props:{name:{},open:{type:Boolean},state:{},readonly:{type:Boolean}},emits:["update:open"],setup(b,{emit:g}){const t=b,n=B(t,"open",g,{passive:!0}),k=N(),r=V(),c=C(t.name,"$9Gvv2FGyYa");t.state?r.value=JSON.parse(JSON.stringify(t.state)):(typeof t.state=="number"||typeof t.state!="string")&&(r.value=t.state);const d=O(r,e=>{typeof e!="number"&&typeof e!="string"?m(e,t.state):c.value=e},{deep:!0});function m(e,o){for(const s in e)e[s]===null?o[s]=null:Array.isArray(e[s])?o[s]=e[s].slice():typeof e[s]=="object"?m(e[s],o[s]):o[s]=e[s]}async function S(){d.pause(),r.value=JSON.parse(JSON.stringify(t.state)),await M(),d.resume()}return(e,o)=>{const s=R;return l(),f("div",{class:"state-editor-details",open:e.name?a(n):!0},[i("div",G,[e.name?(l(),f("button",{key:0,flex:"~","cursor-pointer":"","items-center":"",class:p(a(n)?"":"op50"),onClick:o[0]||(o[0]=y=>n.value=!a(n))},[i("div",{"i-carbon-chevron-right":"",transition:"",class:p(a(n)?"rotate-90 op0":"")},null,2),i("code",{px3:"",py1:"","font-mono":"",class:p(a(n)?"bg-[#8881] rounded-t":"rounded hover:bg-active")},w(e.name),3)],2)):u("",!0),$(e.$slots,"actions",J(P({isOpen:a(n),name:e.name,state:a(c)}))),a(n)?(l(),v(s,{key:1,title:"Refresh View",icon:"carbon-renew",onClick:S})):u("",!0)]),a(n)||!e.name?(l(),v(a(U),j({key:0,modelValue:a(r),"onUpdate:modelValue":o[1]||(o[1]=y=>E(r)?r.value=y:null)},e.$attrs,{class:["json-editor-vue",[a(k).value==="dark"?"jse-theme-dark":"",(e.name,"")]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":"readonly"in e?e.readonly:a(z),indentation:2,"tab-size":2}),null,16,["modelValue","class","read-only"])):u("",!0)],8,A)}}});export{q as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as n,h as o,w as t,i as _,o as a,a as s}from"./entry.74a1b1ba.js";const c=s("div",null," Your App ",-1),u=n({__name:"__blank",setup(r){return(p,i)=>{const e=_;return a(),o(e,{"h-screen":"","w-screen":"",px5:""},{default:t(()=>[c]),_:1})}}});export{u as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as R,m as V,r as F,o,c as i,a as e,F as c,n as j,q as S,s as n,t as m,v as b,x as G,b as r,w as a,d as _,y as A,z as D,A as E,B as L,k as U,C as X,D as ee,E as te,G as ne,H as oe,I as le,J as ie,K as k,h as w,L as P,M as se,N as ae,i as re}from"./entry.74a1b1ba.js";import{_ as ue}from"./FilepathItem.vue.2c8f962b.js";import{_ as de}from"./NTip.vue.7456cfb7.js";import{_ as ce}from"./NCodeBlock.vue.5349dcfa.js";import{_ as me}from"./NCheckbox.vue.c7e6efe4.js";import{_ as _e}from"./HelpFab.vue.5669a6ef.js";import"./client.c408b851.js";const pe={"h-full":"",grid:"~ rows-[max-content_1fr]"},fe={flex:"~ wrap","w-full":""},ve=["onClick"],he=e("div",{border:"b base","flex-auto":""},null,-1),ye={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},be=e("div",{"flex-auto":""},null,-1),$e={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},xe=e("div",{"i-carbon-commit":"","text-xl":""},null,-1),ge=e("div",{"text-sm":"",op50:""}," Name ",-1),we=e("div",{"i-carbon-time":"","text-xl":""},null,-1),ze=e("div",{"text-sm":"",op50:""}," Build duration ",-1),Be=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1),ke=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1),Ce=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1),Ne=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1),Te=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1),Ae=e("div",{"text-sm":"",op50:""}," Built ",-1),De=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1),Ie=e("div",{"text-sm":"",op50:""}," Report Path ",-1),Ve=e("div",{"flex-auto":""},null,-1),I="/__nuxt_devtools__/analyze/",Fe=R({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(C){const p=C,f=V(()=>{const t=[{name:"Overview",id:"overview"}];return p.current.features.bundleClient&&t.push({name:"Client Bundle",id:"bundle-client"}),p.current.features.bundleNitro&&t.push({name:"Nitro Bundle",id:"bundle-nitro"}),p.current.features.viteInspect&&t.push({name:"Vite Inspect",id:"vite-inspect"}),t}),l=F(f.value[0]);function $(t){return t<1024?`${t}B`:t<1024*1024?`${(t/1024).toFixed(1)}KB`:t<1024*1024*1024?`${(t/1024/1024).toFixed(1)}MB`:`${(t/1024/1024/1024).toFixed(1)}GB`}function g(t){return`${((t.endTime-t.startTime)/1e3).toFixed(1)}s`}async function x(t){return E.clearAnalyzeBuilds(await L(),[t])}return(t,u)=>{const z=ue,N=U;return o(),i("div",pe,[e("div",fe,[(o(!0),i(c,null,j(n(f),(v,T)=>(o(),i("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:S(v.id===n(l).id?"":"border-b"),onClick:d=>l.value=v},[e("div",{class:S(v.id===n(l).id?"":"op30")},m(v.name),3)],10,ve))),128)),he]),n(l).id==="overview"?(o(),i("div",ye,[be,e("div",$e,[xe,e("div",null,[ge,e("div",null,m(t.current.name),1)]),we,e("div",null,[ze,e("div",null,m(g(t.current)),1)]),t.current.size?.clientBundle?(o(),i(c,{key:0},[Be,e("div",null,[ke,e("div",null,m($(t.current.size.clientBundle)),1)])],64)):b("",!0),t.current.size.nitroBundle?(o(),i(c,{key:1},[Ce,e("div",null,[Ne,e("div",null,m($(t.current.size.nitroBundle)),1)])],64)):b("",!0),Te,e("div",null,[Ae,e("div",null,m(n(G)(new Date(t.current.endTime))),1)]),De,e("div",null,[Ie,r(z,{filepath:t.current.analyzeDir},null,8,["filepath"])])]),Ve,r(N,{n:"rose",icon:"carbon-delete",onClick:u[0]||(u[0]=v=>x(t.current.name))},{default:a(()=>[_(" Delete this report ")]),_:1})])):b("",!0),u._lazyshow1||n(l).id==="bundle-client"?(u._lazyshow1=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="bundle-client"]])],64)):b("v-show-if",!0),u._lazyshow2||n(l).id==="bundle-nitro"?(u._lazyshow2=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="bundle-nitro"]])],64)):b("v-show-if",!0),u._lazyshow3||n(l).id==="vite-inspect"?(u._lazyshow3=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="vite-inspect"]])],64)):b("v-show-if",!0)])}}}),Se={class:"markdown-body"},Ee=e("h1",null,"Build Analyze",-1),Pe=e("p",null,[_("DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command "),e("code",null,"nuxt build --analyze"),_(" and present the output data directly in DevTools for easy browsing and comparing.")],-1),Re=[Ee,Pe],je={__name:"analyze-build",setup(C,{expose:p}){return p({frontmatter:{}}),(l,$)=>(o(),i("div",Se,Re))}},Ge={flex:"~ col"},Le=["onClick"],Ue={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},He=e("div",{"i-carbon-time":""},null,-1),Ke=e("div",{"flex-auto":""},null,-1),Me=e("div",{"x-divider":""},null,-1),Oe={flex:"~ items-center justify-center wrap",p4:""},qe={flex:"~ col gap-1","w-250":"",p4:""},Je=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1),We=e("p",{op50:""}," Enter the name of the build: ",-1),Ye=e("div",{my3:"","x-divider":""},null,-1),Ze=e("p",{op50:""}," The following command will be executed in your terminal: ",-1),Qe={flex:"~ gap-3",mt2:"","justify-end":""},st=R({__name:"analyze-build",setup(C){const p=X(),f=ee(),l=te(),$=ne("analyze-build:slug",""),g=V(()=>f.value?.builds.find(d=>d.slug===$.value)??f.value?.builds[0]),x=F(!1),t=F(""),u=V(()=>f.value?.builds.some(d=>d.name===t.value.trim()));async function z(){t.value=await E.generateAnalyzeBuildName(),await p.start()&&(k.value={name:t.value,processId:await E.startAnalyzeBuild(await L(),t.value)},x.value&&v())}const N=oe();function v(){k.value?.processId&&(N.value=k.value.processId,l.push("/modules/terminals"))}function T(d){return`${((d.endTime-d.startTime)/1e3).toFixed(1)}s`}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:z}]),(d,h)=>{const B=U,H=Fe,K=re,M=ie,O=se,q=de,J=ce,W=me,Y=ae,Z=je,Q=_e;return o(),i(c,null,[r(M,{"left-size":30},{left:a(()=>[e("div",Ge,[(o(!0),i(c,null,j(n(f)?.builds,s=>(o(),i(c,{key:s.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:S(s.slug===n(g)?.slug?"text-primary bg-active":""),onClick:y=>$.value=s.slug},[e("code",null,m(s.name),1),e("div",Ue,[He,e("span",null,m(T(s)),1),Ke,e("span",null,m(n(G)(new Date(s.endTime))),1)])],10,Le),Me],64))),128)),e("div",Oe,[("processAnalyzeBuildInfo"in d?d.processAnalyzeBuildInfo:n(k))?(o(),w(B,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:h[1]||(h[1]=s=>v())},{default:a(()=>[_(" Building... ")]),_:1})):(o(),w(B,{key:0,n:"primary",icon:"carbon-edge-node",onClick:h[0]||(h[0]=s=>z())},{default:a(()=>[_(" Start a new build ")]),_:1}))])])]),right:a(()=>[n(g)?(o(),w(H,{key:0,current:n(g)},null,8,["current"])):(o(),w(K,{key:1}))]),_:1}),r(n(p),null,{default:a(({resolve:s})=>[r(Y,{"model-value":!0,onClose:y=>s(!1)},{default:a(()=>[e("div",qe,[Je,We,r(O,{modelValue:n(t),"onUpdate:modelValue":h[2]||(h[2]=y=>P(t)?t.value=y:null),placeholder:"Build name"},null,8,["modelValue"]),n(u)?(o(),w(q,{key:0,"n-orange":""},{default:a(()=>[_(" A build with the same name already exists, continue would overrides the previous build result. ")]),_:1})):b("",!0),Ye,Ze,r(J,{code:`npx nuxi analyze --no-serve --name=${n(t)}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),r(W,{modelValue:n(x),"onUpdate:modelValue":h[3]||(h[3]=y=>P(x)?x.value=y:null),mt2:"",n:"primary"},{default:a(()=>[_(" Navigate to terminal ")]),_:1},8,["modelValue"]),e("div",Qe,[r(B,{onClick:y=>s(!1)},{default:a(()=>[_(" Cancel ")]),_:2},1032,["onClick"]),r(B,{n:"solid primary",onClick:y=>s(!0)},{default:a(()=>[_(" Start ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),r(Q,null,{default:a(()=>[r(Z)]),_:1})],64)}}});export{st as default};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{g as R,r as I,O as q,o as a,c as u,b as m,s as n,a as e,d as A,F as S,n as O,h as F,w as y,v as T,q as G,P as L,Q as le,R as ie,A as X,B as W,S as Q,T as H,M as J,k as ee,m as k,U as re,V as ce,W as te,t as P,X as ne,Y as ue,L as M,Z as de,a0 as Y,a1 as pe,a2 as me,a3 as fe,N as ve,a4 as he,a5 as _e,a6 as ge}from"./entry.74a1b1ba.js";import{_ as xe}from"./Navbar.vue.7ff60442.js";import{_ as be}from"./NSectionBlock.d7e62056.js";import{_ as we}from"./FilepathItem.vue.2c8f962b.js";import{_ as ye}from"./CodeSnippets.vue.c208c49e.js";import{_ as $e}from"./DrawerRight.vue.3eebe7ce.js";import{D as ke}from"./constants.4e5eba24.js";import"./NIconTitle.vue.d1cbff70.js";import"./NCodeBlock.vue.5349dcfa.js";import"./client.c408b851.js";const Ce={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},Pe={for:"drop-zone-input","text-3xl":""},Ae={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},De=e("div",{px6:"",py6:""},[e("h1",{"text-2xl":""}," Upload "),e("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1),Ve={grid:"~ cols-minmax-8rem","overflow-auto":"",p6:""},Ne={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},Fe=["src"],Ie={flex:"~ gap1","items-center":""},Se={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Te=R({__name:"DropZone",props:{folder:{type:String,required:!0}},setup(D){const l=D,r=I(!1),o=I(),d=I([]),f=["image","video"];function z(s){o.value=s.target,r.value=!0}function v(s){s.target===o.value&&(r.value=!1)}function C(s){s.preventDefault()}function U(s){s.preventDefault(),j(s.dataTransfer.files)}function j(s){const c=Array.from(s||[]);if(c.length){const w=[],i=d.value.map(t=>t.name);for(const t of c)if(i.includes(t.name)){let p=1;const[_,E]=t.name.split(".");for(;i.includes(`${_} (${p}).${E}`);)p++;const $=`${_}-${p}.${E}`,K=new Blob([t],{type:t.type}),Z=new File([K],$,{lastModified:Date.now()});w.push(Z),i.push($)}else t.type===""?L({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}):f.some(p=>t.type.includes(p))?w.push(t):L({message:`"${t.type}" file type is not allowed`,icon:"carbon:face-dissatisfied",classes:"text-orange"});d.value=[...d.value,...w]}}async function g(){if(le.value||ie.value)return;const s=[];for(const c of d.value){const w=new FileReader;w.readAsDataURL(c);const t=(await new Promise(p=>{w.onload=()=>p(w.result)})).split(";base64,").pop();s.push({name:c.name,data:t})}await X.writeStaticAssets(await W(),[...s],l.folder).then(()=>{V(),L({message:"Files uploaded successfully!",icon:"i-carbon:checkmark"})}).catch(c=>{console.error(c),V(),L({message:`Error uploading files: ${c}`,icon:"i-carbon-warning",classes:"text-red"})}),r.value=!1}function h(s){d.value?.splice(s,1)}function x(s){return URL.createObjectURL(s)}function B(s,c){const[w,i]=s.name.split("."),t=c.replace(/\.\w+$/,""),p=`${t}.${i}`;return t.length===0?(alert("File name must be at least 1 characters long"),w):(Object.defineProperty(s,"name",{value:p,writable:!1}),d.value.splice(d.value.indexOf(s),1,s),s)}function b(){d.value=[]}function V(){r.value=!1,b()}return q("dragenter",z),q("dragleave",v),q("dragover",C),q("drop",U),(s,c)=>{const w=Q,i=H,t=J,p=ee;return a(),u("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:G(n(r)?"opacity-100 visible":"opacity-0 invisible")},[m(w,{icon:"carbon-close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",onClick:V}),n(d)?.length?(a(),u("div",Ae,[De,e("div",Ve,[(a(!0),u(S,null,O(n(d),(_,E)=>(a(),u("div",{key:_.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[e("div",Ne,[e("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:x(_)},null,8,Fe)]),e("div",Ie,[m(t,{n:"xs","flex-auto":"","model-value":_.name,"onUpdate:modelValue":$=>B(_,$.target.value)},null,8,["model-value","onUpdate:modelValue"]),m(w,{icon:"carbon-delete","flex-none":"",title:"Remove file",onClick:$=>h(E)},null,8,["onClick"])])]))),128))]),e("div",Se,[n(d).length?(a(),F(p,{key:0,n:"red",onClick:b},{default:y(()=>[m(i,{icon:"carbon-clean"}),A(" Clear ")]),_:1})):T("",!0),m(p,{disabled:!n(d).length,n:"primary solid",onClick:g},{default:y(()=>[m(i,{icon:"carbon-cloud-upload"}),A(" Upload ")]),_:1},8,["disabled"])])])):(a(),u("div",Ce,[e("label",Pe,[m(i,{icon:"carbon-cloud-upload","mr-2":""}),A(" Drop files here or click to select ")]),e("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:c[0]||(c[0]=_=>j(_.target.files))},null,32)]))],2)}}}),je=R({__name:"AssetFontPreview",props:{asset:{}},setup(D){const l=D,r=k(()=>`devtools-assets-${re(l.asset)}`);return ce(k(()=>`
|
|
2
|
-
@font-face {
|
|
3
|
-
font-family: '${r.value}';
|
|
4
|
-
src: url('${l.asset.publicPath}');
|
|
5
|
-
}
|
|
6
|
-
`)),(o,d)=>(a(),u("div",{"of-hidden":"",style:te({fontFamily:`'${n(r)}'`})}," Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz ",4))}}),Be={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},Ee=["src"],Le={key:2,"i-carbon-document":"","text-3xl":"",op20:""},Ue={key:3,"w-full":"","self-start":"",p4:""},ze=["textContent"],Me={key:4},Re=["src","autoplay","controls"],Oe={key:5,"i-carbon-help":"","text-3xl":"",op20:""},oe=R({__name:"AssetPreview",props:{asset:{},textContent:{},detail:{type:Boolean}},setup(D){return(l,r)=>{const o=je;return a(),u("div",Be,[l.asset.type==="image"?(a(),u("img",{key:0,src:l.asset.publicPath},null,8,Ee)):l.asset.type==="font"?(a(),F(o,{key:l.asset.publicPath,asset:l.asset,"self-stretch":"",p2:"","text-2xl":""},null,8,["asset"])):l.asset.type==="text"&&!l.textContent?(a(),u("div",Le)):l.asset.type==="text"&&l.textContent?(a(),u("div",Ue,[e("pre",{"max-h-10rem":"","of-hidden":"","text-xs":"","font-mono":"",textContent:P(l.textContent)},null,8,ze)])):l.asset.type==="video"?(a(),u("div",Me,[e("video",{src:l.asset.publicPath,autoplay:l.detail,controls:l.detail},null,8,Re)])):(a(),u("div",Oe))])}}}),Xe={flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},Ze={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},qe=R({__name:"AssetGridItem",props:{asset:{},folder:{}},setup(D){const l=D,r=k(()=>l.folder&&l.asset.path.startsWith(l.folder)?l.asset.path.slice(l.folder.length):l.asset.path);return(o,d)=>{const f=oe;return a(),u("button",Xe,[m(f,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:o.asset},null,8,["asset"]),e("div",Ze,P(n(r)),1)])}}}),Ge=e("div",{"x-divider":""},null,-1),se=R({__name:"AssetListItem",props:{item:{},index:{default:0},modelValue:{}},setup(D,{emit:l}){const r=D,o=ne(r,"modelValue",l,{passive:!0}),d=k(()=>r.item?.children?.length),f=I(!0),z=k(()=>d.value?"i-carbon-folder":r.item.type==="image"?"i-carbon-image":r.item.type==="video"?"i-carbon-video":r.item.type==="audio"?"i-carbon-volume-up":r.item.type==="font"?"i-carbon-text-small-caps":r.item.type==="text"?"i-carbon-document":r.item.type==="json"?"i-carbon-json":"i-carbon-document-blank");return(v,C)=>{const U=H,j=se;return a(),u("div",null,[e("button",{flex:"~ gap-2","w-full":"","items-center":"",hover:"bg-active",px4:"",py1:"",style:te({paddingLeft:`calc(1rem + ${v.index*1.5}em)`}),class:G({"bg-active":!n(d)&&n(o)?.filePath===v.item?.filePath}),onClick:C[0]||(C[0]=g=>n(d)?f.value=!n(f):o.value=v.item)},[e("div",{class:G(n(z))},null,2),e("span",{class:G({"flex items-center":n(d)}),"flex-auto":"","text-start":"","text-sm":"","font-mono":""},P(v.item.path),3),n(d)?(a(),F(U,{key:0,icon:"carbon:chevron-right","transform-rotate":n(f)?90:0,transition:""},null,8,["transform-rotate"])):T("",!0)],6),Ge,n(f)?ue(v.$slots,"default",{key:0},()=>[(a(!0),u(S,null,O(v.item?.children,g=>(a(),F(j,{key:g.filepath,modelValue:n(o),"onUpdate:modelValue":C[1]||(C[1]=h=>M(o)?o.value=h:null),item:g,index:v.index+1},null,8,["modelValue","item","index"]))),128))]):T("",!0)])}}}),Ke={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},We=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Preview "),e("div",{"x-divider":""})],-1),Qe={flex:"~","items-center":"","justify-center":""},Ye=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Details "),e("div",{"x-divider":""})],-1),He={"max-w-full":"","w-full":"","table-fixed":""},Je=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1),et={flex:"~ gap-1","w-full":"","items-center":""},tt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1),nt={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},ot={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},st=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1),at={capitalize:""},lt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1),it={key:0},rt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1),ct=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1),ut=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1),dt={op70:""},pt=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Actions "),e("div",{"x-divider":""})],-1),mt={flex:"~ gap2 wrap"},ft=e("div",{"flex-auto":""},null,-1),vt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},ht=e("span",null," Are you sure you want to delete this asset? ",-1),_t={flex:"~ gap2 wrap justify-center"},gt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},xt={flex:"~ gap2 wrap justify-center"},bt=R({__name:"AssetDetails",props:{modelValue:{}},setup(D,{emit:l}){const o=ne(D,"modelValue",l,{passive:!0}),d=de(),f=Y(()=>{if(o.value.type==="image")return X.getImageMeta(o.value.filePath)}),z=Y(()=>{if(o.value.type==="text")return X.getTextAssetContent(o.value.filePath)}),v=pe(),C=k(()=>(v.value?._installedModules||[]).some(t=>t.meta?.name==="@nuxt/image"||t.meta?.name==="@nuxt/image-edge")),U=k(()=>{const i=[];if(o.value.type==="image"){const t=f.value?.width?`
|
|
7
|
-
width="${f.value.width}"
|
|
8
|
-
height="${f.value.height}" `:" ";return i.push({lang:"vue-html",code:`<img${t}
|
|
9
|
-
src="${o.value.publicPath}"
|
|
10
|
-
/>`,name:"Plain Image"}),C.value&&i.push({lang:"vue-html",code:`<NuxtImage${t}
|
|
11
|
-
src="${o.value.publicPath}"
|
|
12
|
-
/>`,name:"Nuxt Image",docs:"https://image.nuxtjs.org/components/nuxt-img"},{lang:"vue-html",code:`<NuxtPicture${t}
|
|
13
|
-
src="${o.value.publicPath}"
|
|
14
|
-
/>`,name:"Nuxt Picture",docs:"https://image.nuxtjs.org/components/nuxt-picture"}),i}return i.push({lang:"html",code:`<a download href="${o.value.publicPath}">
|
|
15
|
-
Download ${o.value.path.split("/").slice(-1)[0]}
|
|
16
|
-
</a>`,name:"Download link"}),i}),j=me(),g=fe(()=>o.value.mtime),h=k(()=>{const i=o.value.size;return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(2)} KB`:`${(i/1024/1024).toFixed(2)} MB`}),x=k(()=>{if(!f.value?.width||!f.value?.height)return"";const i=(p,_)=>_?i(_,p%_):p,t=i(f.value.width,f.value.height);return t>3?`${f.value.width/t}:${f.value.height/t}`:""}),B=k(()=>["image","text","video","font"].includes(o.value.type)),b=I(!1);async function V(){try{await X.deleteStaticAsset(await W(),o.value.filePath),o.value=void 0,b.value=!1,L({message:"Asset deleted",icon:"i-carbon-checkmark",classes:"text-green"})}catch{L({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const s=I(!1),c=I("");async function w(){const i=o.value.filePath.split("/"),t=i.slice(-1)[0].split(".").slice(0,-1).join(".");if(!c.value||c.value===t)return L({message:"Please enter a new name",icon:"i-carbon-warning",classes:"text-orange"});try{const p=i.slice(-1)[0].split(".").slice(-1)[0],_=`${i.slice(0,-1).join("/")}/${c.value}.${p}`;await X.renameStaticAsset(await W(),o.value.filePath,_),o.value=void 0,s.value=!1,L({message:"Asset renamed",icon:"i-carbon-checkmark",classes:"text-green"})}catch{L({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}return(i,t)=>{const p=oe,_=we,E=Q,$=ee,K=ye,Z=ve,ae=J;return a(),u(S,null,[e("div",Ke,[n(B)?(a(),u(S,{key:0},[We,e("div",Qe,[m(p,{detail:"","max-h-80":"","min-h-20":"","min-w-20":"","w-auto":"",rounded:"",border:"~ base",asset:n(o),"text-content":n(z)},null,8,["asset","text-content"])])],64)):T("",!0),Ye,e("table",He,[e("tbody",null,[e("tr",null,[Je,e("td",null,[e("div",et,[m(_,{filepath:n(o).filePath,"text-left":""},null,8,["filepath"]),m(E,{"flex-none":"",title:"Open in Editor",icon:"carbon-launch",onClick:t[0]||(t[0]=N=>n(d)(n(o).filePath))})])])]),e("tr",null,[tt,e("td",null,[e("div",nt,[e("div",ot,P(n(o).publicPath),1),m(E,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",onClick:t[1]||(t[1]=N=>n(j)(n(o).publicPath))}),m(E,{"flex-none":"",to:n(o).publicPath,icon:"carbon-launch",target:"_blank",title:"Open in browser"},null,8,["to"])])])]),e("tr",null,[st,e("td",at,P(n(o).type),1)]),n(f)?.width?(a(),u(S,{key:0},[e("tr",null,[lt,e("td",null,P(n(f).width)+" x "+P(n(f).height),1)]),n(x)?(a(),u("tr",it,[rt,e("td",null,P(n(x)),1)])):T("",!0)],64)):T("",!0),e("tr",null,[ct,e("td",null,P(n(h)),1)]),e("tr",null,[ut,e("td",null,[A(P(new Date(n(o).mtime).toLocaleString())+" ",1),e("span",dt,"("+P(n(g))+")",1)])])])]),pt,e("div",mt,[m($,{to:n(o).publicPath,download:"",target:"_blank",icon:"carbon-download",n:"green"},{default:y(()=>[A(" Download ")]),_:1},8,["to"]),m($,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:t[2]||(t[2]=N=>s.value=!n(s))},{default:y(()=>[A(" Rename ")]),_:1}),m($,{icon:"carbon-delete",n:"red",onClick:t[3]||(t[3]=N=>b.value=!n(b))},{default:y(()=>[A(" Delete ")]),_:1}),n(o).type==="image"?(a(),F($,{key:0,disabled:"",icon:"carbon-image-service"},{default:y(()=>[A(" Optimize image (Coming soon) ")]),_:1})):T("",!0)]),ft,n(U).length?(a(),F(K,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":n(U)},null,8,["code-snippets"])):T("",!0)]),m(Z,{modelValue:n(b),"onUpdate:modelValue":t[5]||(t[5]=N=>M(b)?b.value=N:null)},{default:y(()=>[e("div",vt,[ht,e("div",_t,[m($,{icon:"carbon-close",onClick:t[4]||(t[4]=N=>b.value=!1)},{default:y(()=>[A(" Cancel ")]),_:1}),m($,{icon:"carbon-delete",n:"red",onClick:V},{default:y(()=>[A(" Delete ")]),_:1})])])]),_:1},8,["modelValue"]),m(Z,{modelValue:n(s),"onUpdate:modelValue":t[8]||(t[8]=N=>M(s)?s.value=N:null)},{default:y(()=>[e("div",gt,[m(ae,{modelValue:n(c),"onUpdate:modelValue":t[6]||(t[6]=N=>M(c)?c.value=N:null),placeholder:"New name",n:"blue"},null,8,["modelValue"]),e("div",xt,[m($,{icon:"carbon-close",onClick:t[7]||(t[7]=N=>s.value=!1)},{default:y(()=>[A(" Cancel ")]),_:1}),m($,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:w},{default:y(()=>[A(" Rename ")]),_:1})])])]),_:1},8,["modelValue"])],64)}}}),wt={"h-full":"","of-auto":""},yt={"flex-none":"",flex:"~ gap2 items-center"},$t={op50:""},kt={key:0},Ct={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},Pt={key:1,p2:"",grid:"~ cols-minmax-8rem"},At={key:1},Lt=R({__name:"assets",setup(D){const l=he(),r=I(""),o=k(()=>new _e(l.value||[],{keys:["path"]})),d=k(()=>r.value?o.value.search(r.value).map(h=>h.item):l.value||[]),f=k(()=>{const g={};for(const h of d.value){const x=`${h.path.split("/").slice(0,-1).join("/")}/`;g[x]||(g[x]=[]),g[x].push(h)}return Object.entries(g).sort(([h],[x])=>h.localeCompare(x))}),z=k(()=>{const g={path:"public",children:[]},h=(x,B,b)=>{const[V,...s]=B;let c=x.children.find(w=>w.path===V);c||(c={...b,path:V,children:[]},x.children.push(c)),s.length>1?h(c,s,b):s.length===1&&c.children.push({...b,path:s[0]})};return d.value.forEach(x=>{const B=x.path.split("/").filter(b=>b!=="");h(g,B,x)}),g.children}),v=I(),C=I("grid");function U(){C.value=C.value==="list"?"grid":"list"}ge("Escape",()=>{v.value=void 0});const j=I();return(g,h)=>{const x=Q,B=xe,b=Te,V=qe,s=be,c=se,w=bt,i=$e;return a(),u("div",wt,[m(B,{ref_key:"navbar",ref:j,search:n(r),"onUpdate:search":h[0]||(h[0]=t=>M(r)?r.value=t:null),pb2:""},{actions:y(()=>[e("div",yt,[m(x,{"text-lg":"",icon:n(C)==="grid"?"i-carbon-list":"i-carbon-grid",title:"Toggle view",onClick:U},null,8,["icon"])])]),default:y(()=>[e("div",$t,[n(r)?(a(),u("span",kt,P(n(d).length)+" matched · ",1)):T("",!0),e("span",null,P(n(l)?.length)+" assets in total",1)])]),_:1},8,["search"]),m(b,{folder:"/"}),n(C)==="grid"?(a(),u(S,{key:0},[n(f).length>1?(a(!0),u(S,{key:0},O(n(f),([t,p])=>(a(),F(s,{key:t,text:t,description:`${p.length} items`,open:p.length<=("DETAILS_MAX_ITEMS"in g?g.DETAILS_MAX_ITEMS:n(ke)),padding:!1},{default:y(()=>[e("div",Ct,[(a(!0),u(S,null,O(p,_=>(a(),F(V,{key:_.path,asset:_,folder:t,onClick:E=>v.value=_},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(a(),u("div",Pt,[(a(!0),u(S,null,O(n(d),t=>(a(),F(V,{key:t.path,asset:t,onClick:p=>v.value=t},null,8,["asset","onClick"]))),128))]))],64)):(a(),u("div",At,[(a(!0),u(S,null,O(n(z),(t,p)=>(a(),F(c,{key:p,modelValue:n(v),"onUpdate:modelValue":h[1]||(h[1]=_=>M(v)?v.value=_:null),item:t},null,8,["modelValue","item"]))),128))])),m(i,{"model-value":!!n(v),"auto-close":"","w-120":"",navbar:n(j),onClose:h[3]||(h[3]=t=>v.value=void 0)},{default:y(()=>[n(v)?(a(),F(w,{key:0,modelValue:n(v),"onUpdate:modelValue":h[2]||(h[2]=t=>M(v)?v.value=t:null)},null,8,["modelValue"])):T("",!0)]),_:1},8,["model-value","navbar"])])}}});export{Lt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as j,a7 as N,r as A,m as k,aj as V,ak as $,aa as E,al as B,am as b,an as D,ao as I,c as M,o as s,ap as L,E as P,aq as W,ar as C,A as T,s as o,h as c,w as y,v as F,ai as O,F as R,i as S,a as u,d as w,t as q,b as U,ad as G}from"./entry.74a1b1ba.js";import{_ as X}from"./AuthRequiredPanel.vue.373351c6.js";import{_ as z}from"./LaunchPage.vue.8830d946.js";import"./NMarkdown.vue.b23e4e5a.js";import"./client.c408b851.js";const g=new Map,H=j({__name:"IframeView",props:{tab:{}},setup(f){const m=f,r=N(),p=A(),i=k(()=>m.tab.name),e=A(),t=V($(p));E(()=>{const n=m.tab.view,l=n.persistent!==!1,h=["clipboard-write","clipboard-read"];if(g.get(i.value)&&l)e.value=g.get(i.value),e.value.style.visibility="visible";else{e.value=document.createElement("iframe"),e.value.setAttribute("allow",h.join("; ")),l&&g.set(i.value,e.value),e.value.src=n.src;try{e.value.style.opacity="0.01",e.value.onload=()=>{d(),a(),e.value.style.opacity="1"}}catch{e.value.style.opacity="1"}document.body.appendChild(e.value),B(_)}setTimeout(a,100)}),b(_),b(a),b(d),D(()=>{e.value&&(e.value.style.visibility="hidden")});function a(){if(!(!e.value||!e.value.contentWindow))try{const n=e.value.contentWindow.document.querySelector("html");n?.classList.toggle("dark",r.value==="dark"),n?.classList.toggle("light",r.value==="dark"),new MutationObserver(()=>{r.value=e.value?.contentWindow?.document.querySelector("html")?.classList.contains("dark")?"dark":"light"}).observe(n,{attributes:!0,attributeFilter:["class"]})}catch{}}const v=I();function d(){if(!(!e.value||!e.value.contentWindow))try{e.value.contentWindow.__NUXT_DEVTOOLS__=v.value}catch{}}function _(){e.value&&Object.assign(e.value.style,{position:"fixed",left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`,outline:"none"})}return(n,l)=>(s(),M("div",{ref_key:"anchor",ref:p,"h-full":"","w-full":""},null,512))}}),J={flex:"~ col gap2",mxa:"","items-center":""},K=u("div",{"i-carbon-queued":"",mb2:"","text-5xl":"",op50:""},null,-1),Q={"text-xl":""},Y={"text-rose":""},Z=u("p",{op50:""}," It might because the module contributing this tab is not installed or enabled ",-1),ee=u("p",{mt8:"","animate-pulse":""}," Redirecting to overview page... ",-1),ie=j({__name:"custom-[name]",props:{name:{}},setup(f){const m=f,r=L(),p=P(),i=k(()=>m.name??r.params.name),e=W(),t=k(()=>e.value.find(a=>a.name===i.value));return E(()=>{t.value?t.value.requireAuth&&!C.value&&T.requestForAuth():setTimeout(()=>{t.value||p.push("/modules/overview")},2e3)}),(a,v)=>{const d=S,_=X,n=H,l=z,h=G;return s(),M(R,null,[o(t)?F("",!0):(s(),c(d,{key:0},{default:y(()=>[u("div",J,[K,u("p",Q,[w(" Tab "),u("code",Y,q(o(i)),1),w(" not found ")]),Z,ee])]),_:1})),o(t).requireAuth&&!("isDevAuthed"in a?a.isDevAuthed:o(C))?(s(),c(_,{key:1})):o(t).view.type==="iframe"?(s(),c(n,{key:2,tab:o(t)},null,8,["tab"])):o(t).view.type==="vnode"?(s(),c(O(o(t).view.vnode),{key:3})):o(t).view.type==="launch"?(s(),c(l,{key:4,icon:o(t).view.icon||o(t).icon,title:o(t).view.title||o(t).title,description:o(t).view.description,actions:o(t).view.actions,onAction:v[0]||(v[0]=x=>("rpc"in a?a.rpc:o(T)).customTabAction(o(t).name,x))},null,8,["icon","title","description","actions"])):(s(),c(d,{key:5},{default:y(()=>[U(h,{flex:"~ col","h-full":"","items-center":"","justify-center":""},{default:y(()=>[w(" Unknown tab type "+q(o(t).view),1)]),_:1})]),_:1}))],64)}}});export{ie as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as o,c as s,a as t,Y as a,o as c}from"./entry.74a1b1ba.js";const n={},r={"h-full":"","of-auto":"","n-panel-grids":""},l={"h-full":"","bg-base":""};function _(e,d){return c(),s("div",r,[t("div",l,[a(e.$slots,"default")])])}const i=o(n,[["render",_]]);export{i as default};
|