@nuxt/devtools 3.4.1 → 4.0.0-alpha.10

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 (229) hide show
  1. package/README.md +89 -7
  2. package/dist/chunks/analyze-build.mjs +33 -2
  3. package/dist/chunks/code-server.mjs +75 -0
  4. package/dist/chunks/module-main.mjs +1102 -737
  5. package/dist/chunks/timeline.mjs +2 -3
  6. package/dist/chunks/vite-inspect.mjs +93 -53
  7. package/dist/client/200.html +1 -1
  8. package/dist/client/404.html +1 -1
  9. package/dist/client/_nuxt/__blank-dil3nwfh.js +1 -0
  10. package/dist/client/_nuxt/analyze-build-2e03hfez.js +1 -0
  11. package/dist/client/_nuxt/assets-fyld29gf.js +6 -0
  12. package/dist/client/_nuxt/auth-required-panel-mm5lidl3.js +1 -0
  13. package/dist/client/_nuxt/builds/latest.json +1 -1
  14. package/dist/client/_nuxt/builds/meta/dbb6f1eb-fdec-4078-b409-19d1ed6035a2.json +1 -0
  15. package/dist/client/_nuxt/{client-jl5q3rle.js → client-botfq0nw.js} +1 -1
  16. package/dist/client/_nuxt/code-diff-oxve94ak.js +8 -0
  17. package/dist/client/_nuxt/code-snippets-mcrkbsd4.js +1 -0
  18. package/dist/client/_nuxt/components-k5rsm3c3.js +1 -0
  19. package/dist/client/_nuxt/composable-item-o8crh7o9.js +1 -0
  20. package/dist/client/_nuxt/composables-ml69kqh9.js +1 -0
  21. package/dist/client/_nuxt/custom-_name_-j6w4b10b.js +1 -0
  22. package/dist/client/_nuxt/data-schema-button-j2dsypzz.js +1 -0
  23. package/dist/client/_nuxt/data-schema-drawer-9s1351p5.js +2 -0
  24. package/dist/client/_nuxt/debug-muupfuzb.js +1 -0
  25. package/dist/client/_nuxt/default-k6jiq1wt.js +1 -0
  26. package/dist/client/_nuxt/dialog-c7wnj3nl.js +1 -0
  27. package/dist/client/_nuxt/{dist-ekw95yvx.js → dist-2c3gpsw0.js} +1 -1
  28. package/dist/client/_nuxt/{dist-f9baaez8.js → dist-d6zuldkp.js} +1 -1
  29. package/dist/client/_nuxt/duration-display-kup58tqe.js +1 -0
  30. package/dist/client/_nuxt/editor-bzxz1rcq.js +1 -0
  31. package/dist/client/_nuxt/entry.css-meav5jmw.css +1 -0
  32. package/dist/client/_nuxt/error-404-25vom0cq.js +1 -0
  33. package/dist/client/_nuxt/error-404.css-mpcol2vk.css +1 -0
  34. package/dist/client/_nuxt/{error-500-bu53sh58.js → error-500-htafeoa3.js} +1 -1
  35. package/dist/client/_nuxt/error-500.css-273x0c3h.css +1 -0
  36. package/dist/client/_nuxt/{error-dtx3jz5a.js → error-lj28vdr1.js} +2 -2
  37. package/dist/client/_nuxt/filepath-item-jdy5gc4m.js +1 -0
  38. package/dist/client/_nuxt/full-gpj1mlf5.js +1 -0
  39. package/dist/client/_nuxt/help-fab-ll6mbhgs.js +1 -0
  40. package/dist/client/_nuxt/hooks-hgffr865.js +1 -0
  41. package/dist/client/_nuxt/imports-i2fnwttt.js +1 -0
  42. package/dist/client/_nuxt/launch-page-ksxhzp2z.js +1 -0
  43. package/dist/client/_nuxt/modules-dae72omf.js +1 -0
  44. package/dist/client/_nuxt/nbadge-oyy0wjng.js +1 -0
  45. package/dist/client/_nuxt/nbutton-mtj8qzr9.js +1 -0
  46. package/dist/client/_nuxt/ncard-mtvdl2wf.js +1 -0
  47. package/dist/client/_nuxt/ncheckbox-mksfz5p0.js +1 -0
  48. package/dist/client/_nuxt/ncode-block-pfi5niis.js +2 -0
  49. package/dist/client/_nuxt/{ndialog-d7onas5p.js → ndialog-dj1ywkc1.js} +2 -2
  50. package/dist/client/_nuxt/ndrawer-h46qfenr.js +1 -0
  51. package/dist/client/_nuxt/ndropdown-ow0z3stn.js +1 -0
  52. package/dist/client/_nuxt/nicon-obdu3k9r.js +3 -0
  53. package/dist/client/_nuxt/nicon-title-e2gzkzl3.js +1 -0
  54. package/dist/client/_nuxt/nju74r39.js +2 -0
  55. package/dist/client/_nuxt/nlink-j55iyj5x.js +1 -0
  56. package/dist/client/_nuxt/nloading-k4sy0f8c.js +1 -0
  57. package/dist/client/_nuxt/nmarkdown-mnxob7ua.js +1 -0
  58. package/dist/client/_nuxt/nnavbar-dwxbkqvw.js +1 -0
  59. package/dist/client/_nuxt/none-md25735q.js +1 -0
  60. package/dist/client/_nuxt/npanel-grids-ga8arlvs.js +1 -0
  61. package/dist/client/_nuxt/npm-febdntx4.js +1 -0
  62. package/dist/client/_nuxt/nsection-block-cb29dqkc.js +1 -0
  63. package/dist/client/_nuxt/nselect-glgbbae4.js +1 -0
  64. package/dist/client/_nuxt/nselect-tabs-jzyd56a1.js +1 -0
  65. package/dist/client/_nuxt/nsplit-pane-b5ki4jwa.js +1 -0
  66. package/dist/client/_nuxt/{nsplit-pane.css-o64elxn9.css → nsplit-pane.css-k1gopk47.css} +1 -1
  67. package/dist/client/_nuxt/ntext-input-lzyyx3ym.js +1 -0
  68. package/dist/client/_nuxt/ntip-oohvtkqd.js +1 -0
  69. package/dist/client/_nuxt/nuxt-f4tmbbs7.js +1 -0
  70. package/dist/client/_nuxt/nuxt-link-dgri2bli.js +1 -0
  71. package/dist/client/_nuxt/{nuxt-logo-fsli1c7y.js → nuxt-logo-gzcu6lh0.js} +1 -1
  72. package/dist/client/_nuxt/open-graph-mc8dh9qn.js +3 -0
  73. package/dist/client/_nuxt/overview-lpfgamus.js +1 -0
  74. package/dist/client/_nuxt/pages-bv99uu3p.js +1 -0
  75. package/dist/client/_nuxt/payload-k2hrsm04.js +1 -0
  76. package/dist/client/_nuxt/plugins-ljid8ktq.js +1 -0
  77. package/dist/client/_nuxt/ready-h6bi8le4.js +1 -0
  78. package/dist/client/_nuxt/rolldown-runtime-ln9q81id.js +1 -0
  79. package/dist/client/_nuxt/runtime-configs-lvgzbcdu.js +1 -0
  80. package/dist/client/_nuxt/server-route-inputs-iwv9ewrw.js +1 -0
  81. package/dist/client/_nuxt/server-routes-mkqbltfh.js +7 -0
  82. package/dist/client/_nuxt/server-tasks-kbf4txeq.js +1 -0
  83. package/dist/client/_nuxt/settings-ngc5p8qn.js +1 -0
  84. package/dist/client/_nuxt/stacktrace-list-chmjyp53.js +1 -0
  85. package/dist/client/_nuxt/state-commands-f4h87cfl.js +1 -0
  86. package/dist/client/_nuxt/state-components-jymg7dj7.js +1 -0
  87. package/dist/client/_nuxt/state-editor-bg13n53w.js +1 -0
  88. package/dist/client/_nuxt/state-modules-bewlxq5o.js +1 -0
  89. package/dist/client/_nuxt/state-routes-f5cna95h.js +1 -0
  90. package/dist/client/_nuxt/state-schema-espdew31.js +1 -0
  91. package/dist/client/_nuxt/state-tabs-m7neqayd.js +1 -0
  92. package/dist/client/_nuxt/storage-cep8dxy9.js +1 -0
  93. package/dist/client/_nuxt/tab-icon-nktg799o.js +1 -0
  94. package/dist/client/_nuxt/telemetry-9f19c0i9.js +1 -0
  95. package/dist/client/_nuxt/timeline-o9hhhb94.js +31 -0
  96. package/dist/client/_nuxt/unhead.dgx-hwv-uc-gaht5h60.js +1 -0
  97. package/dist/client/_nuxt/{unocss-runtime-ys3yvxrm.js → unocss-runtime-bjggyd5e.js} +1 -1
  98. package/dist/client/_nuxt/utils-bisj7255.js +1 -0
  99. package/dist/client/_nuxt/vendor/json-editor-vue-lmhxk84q.js +3862 -0
  100. package/dist/client/_nuxt/vendor/markdown-exit-n4f1gsja.js +12 -0
  101. package/dist/client/_nuxt/vendor/quicktype-core-b6sxxdgw.js +929 -0
  102. package/dist/client/_nuxt/vendor/shiki-abzmnals.js +152 -0
  103. package/dist/client/_nuxt/vendor/unocss-hqrnsbiy.js +3 -0
  104. package/dist/client/_nuxt/vendor/{unocss.css-flyrgbwp.css → unocss.css-bhad58wt.css} +1 -1
  105. package/dist/client/_nuxt/vendor/vis-i54ppuvk.js +26 -0
  106. package/dist/client/_nuxt/virtual-files-kcs310xn.js +1 -0
  107. package/dist/client/index.html +1 -1
  108. package/dist/dirs.d.mts +1 -2
  109. package/dist/dirs.mjs +1 -21
  110. package/dist/module.d.mts +1 -1
  111. package/dist/module.json +1 -1
  112. package/dist/module.mjs +1 -5
  113. package/dist/runtime/plugins/devtools.client.js +1 -1
  114. package/dist/runtime/plugins/view/client.js +23 -74
  115. package/dist/runtime/plugins/view/state.d.ts +0 -1
  116. package/dist/runtime/plugins/view/state.js +0 -2
  117. package/dist/shared/{devtools.DFpGUHRZ.mjs → devtools.CCWq4fFE.mjs} +50 -59
  118. package/dist/shared/{devtools.C1a10l_c.d.mts → devtools.LsRDzDTD.d.mts} +0 -12
  119. package/dist/types.d.mts +2 -6
  120. package/dist/webcomponents/index.d.mts +1 -3
  121. package/dist/webcomponents/index.mjs +11 -1187
  122. package/package.json +37 -43
  123. package/.discoveryrc.cjs +0 -13
  124. package/cli.mjs +0 -2
  125. package/dist/chunks/vscode.mjs +0 -197
  126. package/dist/chunks/vue-devtools.mjs +0 -19
  127. package/dist/client/_nuxt/__blank-m8zc7gto.js +0 -1
  128. package/dist/client/_nuxt/analyze-build-jwi76dz3.js +0 -1
  129. package/dist/client/_nuxt/assets-cpph6v46.js +0 -6
  130. package/dist/client/_nuxt/auth-required-panel-pb5dyado.js +0 -1
  131. package/dist/client/_nuxt/builds/meta/58990d98-ceb3-4b7a-a3b9-ed05fcb0ebda.json +0 -1
  132. package/dist/client/_nuxt/c4noe6b7.js +0 -2
  133. package/dist/client/_nuxt/client-kw9rd8gy.js +0 -2
  134. package/dist/client/_nuxt/code-diff-icy7s1zb.js +0 -8
  135. package/dist/client/_nuxt/code-snippets-iyqjogm4.js +0 -1
  136. package/dist/client/_nuxt/components-wm13ypb1.js +0 -1
  137. package/dist/client/_nuxt/composable-item-1gg3w2nv.js +0 -1
  138. package/dist/client/_nuxt/composables-m3a2xv3m.js +0 -1
  139. package/dist/client/_nuxt/custom-_name_-yd1nhb2d.js +0 -1
  140. package/dist/client/_nuxt/data-schema-button-gmxlrj4u.js +0 -1
  141. package/dist/client/_nuxt/data-schema-drawer-htftrpm4.js +0 -2
  142. package/dist/client/_nuxt/debug-esphaczf.js +0 -1
  143. package/dist/client/_nuxt/default-l4jud1s1.js +0 -1
  144. package/dist/client/_nuxt/dist-mpe1u0aj.js +0 -1
  145. package/dist/client/_nuxt/duration-display-i95mp3xf.js +0 -1
  146. package/dist/client/_nuxt/editor-gio3gzf5.js +0 -1
  147. package/dist/client/_nuxt/entry.css-du3mqati.css +0 -1
  148. package/dist/client/_nuxt/error-404-dvx9vrvw.js +0 -1
  149. package/dist/client/_nuxt/error-404.css-ndkb77p4.css +0 -1
  150. package/dist/client/_nuxt/error-500.css-iay0iq8l.css +0 -1
  151. package/dist/client/_nuxt/filepath-item-n14cgzrq.js +0 -1
  152. package/dist/client/_nuxt/full-e41d06vk.js +0 -1
  153. package/dist/client/_nuxt/help-fab-bxbzpji6.js +0 -1
  154. package/dist/client/_nuxt/hooks-b2zozecc.js +0 -1
  155. package/dist/client/_nuxt/imports-chkhxfjf.js +0 -1
  156. package/dist/client/_nuxt/launch-page-4gmg3dre.js +0 -1
  157. package/dist/client/_nuxt/modules-d4yrgxt0.js +0 -1
  158. package/dist/client/_nuxt/nbadge-gxsw3trl.js +0 -1
  159. package/dist/client/_nuxt/nbutton-n4jak7c4.js +0 -1
  160. package/dist/client/_nuxt/ncard-nwvxjytu.js +0 -1
  161. package/dist/client/_nuxt/ncheckbox-g0h4v30t.js +0 -1
  162. package/dist/client/_nuxt/ncode-block-pepewqmk.js +0 -2
  163. package/dist/client/_nuxt/ndark-toggle-hg693j9b.js +0 -1
  164. package/dist/client/_nuxt/ndrawer-rf7qwkr7.js +0 -1
  165. package/dist/client/_nuxt/ndropdown-hei8kmpv.js +0 -1
  166. package/dist/client/_nuxt/nicon-oi9zv8qe.js +0 -1
  167. package/dist/client/_nuxt/nicon-title-ckh1far6.js +0 -1
  168. package/dist/client/_nuxt/nlink-euky3zj2.js +0 -1
  169. package/dist/client/_nuxt/nloading-cxkye5sp.js +0 -1
  170. package/dist/client/_nuxt/nmarkdown-k6ubrkxy.js +0 -1
  171. package/dist/client/_nuxt/nnavbar-dxs3xl8m.js +0 -1
  172. package/dist/client/_nuxt/none-bqbddrhm.js +0 -1
  173. package/dist/client/_nuxt/npanel-grids-l34v8x7x.js +0 -1
  174. package/dist/client/_nuxt/npm-bs3acmpx.js +0 -1
  175. package/dist/client/_nuxt/nsection-block-deo3d5ca.js +0 -1
  176. package/dist/client/_nuxt/nselect-bihfcl5d.js +0 -1
  177. package/dist/client/_nuxt/nselect-tabs-e2nrw9h1.js +0 -1
  178. package/dist/client/_nuxt/nsplit-pane-c8b9c6ro.js +0 -1
  179. package/dist/client/_nuxt/nswitch-omy4wnlb.js +0 -1
  180. package/dist/client/_nuxt/ntext-input-m2w61kr5.js +0 -1
  181. package/dist/client/_nuxt/ntip-lla1rr8h.js +0 -1
  182. package/dist/client/_nuxt/nuxt-hhee6z5x.js +0 -1
  183. package/dist/client/_nuxt/nuxt-link-k77anppn.js +0 -1
  184. package/dist/client/_nuxt/open-graph-ksgni7te.js +0 -3
  185. package/dist/client/_nuxt/overview-ly9kgbva.js +0 -1
  186. package/dist/client/_nuxt/pages-inv9i4ar.js +0 -1
  187. package/dist/client/_nuxt/pages-mgwvumc9.js +0 -1
  188. package/dist/client/_nuxt/payload-c3lf06v2.js +0 -1
  189. package/dist/client/_nuxt/pinia-pdgcbxdt.js +0 -1
  190. package/dist/client/_nuxt/plugins-kv2qt5pc.js +0 -1
  191. package/dist/client/_nuxt/ready-j6igpruf.js +0 -1
  192. package/dist/client/_nuxt/render-tree-ok5eju7s.js +0 -1
  193. package/dist/client/_nuxt/rolldown-runtime-f96lzs6p.js +0 -1
  194. package/dist/client/_nuxt/runtime-configs-nrru3mzu.js +0 -1
  195. package/dist/client/_nuxt/server-discovery-b5y0tq1d.js +0 -1
  196. package/dist/client/_nuxt/server-route-inputs-8c4zt2y4.js +0 -1
  197. package/dist/client/_nuxt/server-routes-jrdh3byh.js +0 -7
  198. package/dist/client/_nuxt/server-tasks-i1wtl0e8.js +0 -1
  199. package/dist/client/_nuxt/settings-id2aeyhn.js +0 -1
  200. package/dist/client/_nuxt/stacktrace-list-mx9jtxx1.js +0 -1
  201. package/dist/client/_nuxt/state-components-dngh0clc.js +0 -1
  202. package/dist/client/_nuxt/state-editor-kg5k3jvy.js +0 -1
  203. package/dist/client/_nuxt/state-modules-gz46qq7c.js +0 -1
  204. package/dist/client/_nuxt/state-routes-ckw7s1pq.js +0 -1
  205. package/dist/client/_nuxt/state-schema-dl4a0tzs.js +0 -1
  206. package/dist/client/_nuxt/state-subprocess-omk907f9.js +0 -1
  207. package/dist/client/_nuxt/state-tabs-fe58vmvu.js +0 -1
  208. package/dist/client/_nuxt/storage-gflmc532.js +0 -1
  209. package/dist/client/_nuxt/storage-options-h4ted7ut.js +0 -1
  210. package/dist/client/_nuxt/storage-zf5nkzhm.js +0 -1
  211. package/dist/client/_nuxt/tab-icon-errppxip.js +0 -1
  212. package/dist/client/_nuxt/telemetry-pbqlai15.js +0 -1
  213. package/dist/client/_nuxt/terminals-lx3nbgm4.js +0 -1
  214. package/dist/client/_nuxt/terminals.css-mejv43xm.css +0 -1
  215. package/dist/client/_nuxt/timeline-ozwer8h0.js +0 -31
  216. package/dist/client/_nuxt/utils-gsui1utc.js +0 -1
  217. package/dist/client/_nuxt/vendor/json-editor-vue-ajxjng9j.js +0 -3870
  218. package/dist/client/_nuxt/vendor/markdown-it-hplpr18t.js +0 -14
  219. package/dist/client/_nuxt/vendor/quicktype-core-m8x9xlg1.js +0 -929
  220. package/dist/client/_nuxt/vendor/shiki-k3jqtxcz.js +0 -293
  221. package/dist/client/_nuxt/vendor/unocss-j0l832tn.js +0 -3
  222. package/dist/client/_nuxt/vendor/vis-kujfrgx6.js +0 -26
  223. package/dist/client/_nuxt/vendor/xterm-ilcgri3k.js +0 -18
  224. package/dist/client/_nuxt/vendor/xterm.css-j9zpjwmg.css +0 -1
  225. package/dist/client/_nuxt/virtual-files-dkyeb46c.js +0 -1
  226. package/dist/client/_nuxt/vue-devtools-imrq5lm7.js +0 -4
  227. package/dist/client/discovery/index.html +0 -611
  228. package/dist/runtime/vue-devtools-client.d.ts +0 -2
  229. package/dist/runtime/vue-devtools-client.js +0 -8
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/devtools",
3
3
  "type": "module",
4
- "version": "3.4.1",
4
+ "version": "4.0.0-alpha.10",
5
5
  "description": "The Nuxt DevTools gives you insights and transparency about your Nuxt App.",
6
6
  "license": "MIT",
7
7
  "homepage": "https://devtools.nuxt.com",
@@ -32,85 +32,84 @@
32
32
  "dist"
33
33
  ],
34
34
  "peerDependencies": {
35
- "@vitejs/devtools": "*",
36
- "vite": ">=6.0"
35
+ "nitro": "^3.0.0-0",
36
+ "nitropack": "^2.0.0",
37
+ "vite": "^8.1.5",
38
+ "vite-plugin-inspect": "^12.0.2"
37
39
  },
38
40
  "peerDependenciesMeta": {
39
- "@vitejs/devtools": {
41
+ "nitro": {
42
+ "optional": true
43
+ },
44
+ "nitropack": {
45
+ "optional": true
46
+ },
47
+ "vite-plugin-inspect": {
40
48
  "optional": true
41
49
  }
42
50
  },
43
51
  "dependencies": {
44
- "@nuxt/kit": "^4.5.1",
45
- "@vue/devtools-core": "^8.2.1",
46
- "@vue/devtools-kit": "^8.2.1",
52
+ "@devframes/plugin-code-server": "^0.8.0",
53
+ "@devframes/plugin-data-inspector": "^0.8.0",
54
+ "@nuxt/kit": "npm:@nuxt/kit-nightly@5.0.0-29755283.b4586ef2",
55
+ "@vitejs/devtools": "^0.4.11",
56
+ "@vitejs/devtools-kit": "^0.4.11",
47
57
  "birpc": "^4.0.0",
48
58
  "consola": "^3.4.2",
49
59
  "destr": "^2.0.5",
60
+ "diff": "^9.0.0",
50
61
  "error-stack-parser-es": "^2.0.1",
51
- "execa": "^8.0.1",
52
62
  "fast-npm-meta": "^2.2.0",
53
- "get-port-please": "^3.2.0",
54
63
  "hookable": "^6.1.1",
55
64
  "image-meta": "^0.2.2",
56
- "is-installed-globally": "^1.0.0",
57
65
  "launch-editor": "^2.14.1",
58
66
  "local-pkg": "^1.2.1",
59
67
  "magicast": "^0.5.4",
60
- "nypm": "^0.6.9",
61
68
  "ohash": "^2.0.11",
62
69
  "pathe": "^2.0.3",
63
70
  "perfect-debounce": "^2.1.0",
64
71
  "pkg-types": "^2.3.1",
65
- "semver": "^7.8.5",
66
- "simple-git": "^3.36.0",
67
72
  "sirv": "^3.0.2",
68
73
  "structured-clone-es": "^2.0.1",
74
+ "tinyexec": "^1.3.0",
69
75
  "tinyglobby": "^0.2.17",
70
76
  "unstorage": "^1.17.5",
71
- "vite-plugin-inspect": "^11.4.1",
77
+ "verkit": "^0.3.1",
72
78
  "vite-plugin-vue-tracer": "^1.4.0",
73
- "which": "^6.0.1",
74
79
  "ws": "^8.21.1",
75
- "@nuxt/devtools-kit": "3.4.1",
76
- "@nuxt/devtools-wizard": "3.4.1"
80
+ "@nuxt/devtools-kit": "4.0.0-alpha.10"
77
81
  },
78
82
  "devDependencies": {
79
83
  "@antfu/utils": "^9.3.0",
80
- "@discoveryjs/cli": "^2.15.0",
81
- "@discoveryjs/discovery": "1.0.0-beta.92",
82
84
  "@iconify-json/bxl": "^1.2.4",
83
85
  "@iconify-json/carbon": "^1.2.25",
84
- "@iconify-json/logos": "^1.2.12",
86
+ "@iconify-json/logos": "^1.2.11",
85
87
  "@iconify-json/ph": "^1.2.2",
86
88
  "@iconify-json/ri": "^1.2.10",
87
- "@iconify-json/simple-icons": "^1.2.93",
89
+ "@iconify-json/simple-icons": "^1.2.92",
88
90
  "@iconify-json/tabler": "^1.2.38",
89
- "@nuxt/test-utils": "^4.1.0",
90
91
  "@parcel/watcher": "^2.6.0",
91
92
  "@types/markdown-it-link-attributes": "^3.0.5",
92
- "@unhead/schema": "^2.1.16",
93
+ "@unhead/schema": "^3.2.3",
93
94
  "@unocss/nuxt": "^66.7.5",
94
95
  "@unocss/preset-icons": "^66.7.5",
95
96
  "@unocss/preset-uno": "^66.7.5",
96
97
  "@unocss/runtime": "^66.7.5",
97
- "@vitejs/devtools": "^0.4.10",
98
- "@vitest/ui": "^4.1.10",
99
- "@vue/devtools-applet": "^8.2.1",
98
+ "@vitejs/devtools": "^0.4.11",
100
99
  "@vueuse/nuxt": "^14.4.0",
101
- "@xterm/addon-fit": "^0.11.0",
102
- "@xterm/xterm": "^6.0.0",
103
100
  "cronstrue": "^3.24.0",
104
101
  "exsolve": "^1.1.1",
105
102
  "floating-vue": "^5.2.2",
106
103
  "fuse.js": "^7.5.0",
107
- "json-editor-vue": "^0.18.1",
104
+ "json-editor-vue": "^0.19.1",
108
105
  "lightningcss": "^1.33.0",
109
- "markdown-it": "^14.3.0",
106
+ "markdown-exit": "^1.1.0-beta.2",
110
107
  "markdown-it-link-attributes": "^4.0.1",
108
+ "nitro": "^3.0.260610-beta",
111
109
  "nitropack": "^2.13.4",
112
- "nuxt": "^4.5.1",
110
+ "nuxt": "npm:nuxt-nightly@5.0.0-29755283.b4586ef2",
113
111
  "ofetch": "^1.5.1",
112
+ "package-manager-detector": "^1.8.0",
114
113
  "quicktype-core": "22.0.0",
115
114
  "scule": "^1.3.0",
116
115
  "shiki": "^4.4.1",
@@ -118,6 +117,7 @@
118
117
  "theme-vitesse": "^1.0.0",
119
118
  "tsx": "^4.23.5",
120
119
  "ua-parser-modern": "^0.1.1",
120
+ "unbuild": "^3.6.1",
121
121
  "unimport": "^6.4.0",
122
122
  "unocss": "^66.7.5",
123
123
  "unplugin-vue": "^7.2.0",
@@ -125,23 +125,17 @@
125
125
  "vanilla-jsoneditor": "^3.13.0",
126
126
  "vis-data": "^8.0.4",
127
127
  "vis-network": "^10.1.0",
128
- "vitest": "^4.1.10",
128
+ "vite-plugin-inspect": "^12.0.2",
129
129
  "vue-tsc": "^3.3.9",
130
- "vue-virtual-scroller": "^2.0.1"
130
+ "vue-virtual-scroller": "^3.0.4"
131
131
  },
132
132
  "scripts": {
133
- "build": "pnpm dev:prepare && pnpm build:module && pnpm build:discovery && pnpm build:client",
134
- "build:client": "nuxi generate client && cp -r client/.output/public/ dist/client/",
133
+ "build": "pnpm dev:prepare && pnpm build:module && pnpm build:client",
134
+ "build:client": "nuxi generate client && node scripts/copy-client.mjs",
135
135
  "build:module": "nuxt-build-module build",
136
- "build:discovery": "npx discovery-build -c .discoveryrc.cjs -s -o client/public/discovery",
137
- "dev:discovery": "discovery -c .discoveryrc.cjs",
138
136
  "stub": "nuxt-build-module build --stub",
139
- "dev": "pnpm build:discovery && nuxi dev client",
137
+ "dev": "nuxi dev client",
140
138
  "dev:playground": "pnpm build && nuxi dev playground",
141
- "dev:prepare": "pnpm run stub && nuxi prepare client",
142
- "test:unit": "vitest run"
143
- },
144
- "bin": {
145
- "devtools": "./cli.mjs"
139
+ "dev:prepare": "pnpm run stub && nuxi prepare client"
146
140
  }
147
141
  }
package/.discoveryrc.cjs DELETED
@@ -1,13 +0,0 @@
1
- const { join } = require('node:path')
2
-
3
- module.exports = {
4
- name: 'Nuxt Server Data',
5
- basedir: join(__dirname, 'discovery'),
6
- embed: true,
7
- // view: {
8
- // assets: [
9
- // './pages/common.css',
10
- // './pages/default.js',
11
- // ],
12
- // },
13
- }
package/cli.mjs DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import('@nuxt/devtools-wizard')
@@ -1,197 +0,0 @@
1
- import { existsSync } from 'node:fs';
2
- import fsp from 'node:fs/promises';
3
- import { hostname } from 'node:os';
4
- import { resolve } from 'node:path';
5
- import { startSubprocess } from '@nuxt/devtools-kit';
6
- import { logger } from '@nuxt/kit';
7
- import { execa } from 'execa';
8
- import { checkPort, getPort } from 'get-port-please';
9
- import which from 'which';
10
- import { L as LOG_PREFIX } from './module-main.mjs';
11
- import 'consola/utils';
12
- import 'pathe';
13
- import 'sirv';
14
- import 'vite';
15
- import '../shared/devtools.DFpGUHRZ.mjs';
16
- import '../dirs.mjs';
17
- import 'node:url';
18
- import 'is-installed-globally';
19
- import 'ohash';
20
- import 'birpc';
21
- import 'structured-clone-es';
22
- import 'simple-git';
23
- import 'tinyglobby';
24
- import 'image-meta';
25
- import 'perfect-debounce';
26
- import 'destr';
27
- import '../../dist/runtime/shared/hooks.js';
28
- import 'node:process';
29
- import 'node:module';
30
- import 'pkg-types';
31
- import 'node:assert';
32
- import 'node:v8';
33
- import 'node:util';
34
- import 'local-pkg';
35
- import 'magicast';
36
- import 'magicast/helpers';
37
- import 'nypm';
38
- import 'semver';
39
- import 'unstorage';
40
-
41
- const codeBinaryOptions = {
42
- "ms-code-cli": {
43
- codeBinary: "code",
44
- launchArg: "serve-web",
45
- licenseTermsArg: "--accept-server-license-terms",
46
- connectionTokenArg: "--without-connection-token"
47
- },
48
- "ms-code-server": {
49
- codeBinary: "code-server",
50
- launchArg: "serve-local",
51
- licenseTermsArg: "--accept-server-license-terms",
52
- connectionTokenArg: "--without-connection-token"
53
- },
54
- "coder-code-server": {
55
- codeBinary: "code-server",
56
- launchArg: "serve-local",
57
- licenseTermsArg: "",
58
- connectionTokenArg: ""
59
- }
60
- };
61
- async function setup({ nuxt, options, openInEditorHooks, rpc }) {
62
- const vsOptions = options?.vscode || {};
63
- const codeServer = vsOptions?.codeServer || "ms-code-server";
64
- const { codeBinary, launchArg, licenseTermsArg, connectionTokenArg } = codeBinaryOptions[codeServer];
65
- const installed = !!await which(codeBinary).catch(() => null);
66
- let port = vsOptions?.port || 3080;
67
- let url = `http://localhost:${port}`;
68
- const host = vsOptions?.host ? `--host=${vsOptions.host}` : "--host=127.0.0.1";
69
- let loaded = false;
70
- let promise = null;
71
- const mode = vsOptions?.mode || "local-serve";
72
- const computerHostName = vsOptions.tunnel?.name || hostname().split(".").join("");
73
- const root = nuxt.options.rootDir;
74
- const vscodeServerControllerFile = resolve(root, ".vscode", ".server-controller-port.log");
75
- openInEditorHooks.push(async (file) => {
76
- if (!existsSync(vscodeServerControllerFile))
77
- return false;
78
- try {
79
- const { port: port2 } = JSON.parse(await fsp.readFile(vscodeServerControllerFile, "utf-8"));
80
- const url2 = `http://localhost:${port2}/open?path=${encodeURIComponent(`${root}/${file}`)}`;
81
- await fetch(url2);
82
- rpc.broadcast.navigateTo("/modules/custom-builtin-vscode");
83
- return true;
84
- } catch (e) {
85
- console.debug(`Failed to open file "${file}" in VS Code Server`);
86
- console.debug(e);
87
- return false;
88
- }
89
- });
90
- async function startCodeServer() {
91
- if (existsSync(vscodeServerControllerFile))
92
- await fsp.rm(vscodeServerControllerFile, { force: true });
93
- if (vsOptions?.reuseExistingServer && !await checkPort(port)) {
94
- loaded = true;
95
- url = `http://localhost:${port}/?folder=${encodeURIComponent(root)}`;
96
- logger.info(LOG_PREFIX, `Existing VS Code Server found at port ${port}...`);
97
- return;
98
- }
99
- port = await getPort({ port });
100
- url = `http://localhost:${port}/?folder=${encodeURIComponent(root)}`;
101
- logger.info(LOG_PREFIX, `Starting VS Code Server at ${url} ...`);
102
- execa(codeBinary, [
103
- "--install-extension",
104
- "antfu.vscode-server-controller"
105
- ], { stderr: "inherit", stdout: "ignore", reject: false });
106
- startSubprocess(
107
- {
108
- command: codeBinary,
109
- args: [
110
- launchArg,
111
- licenseTermsArg,
112
- connectionTokenArg,
113
- `--port=${port}`,
114
- host
115
- ]
116
- },
117
- {
118
- id: "devtools:vscode",
119
- name: "VS Code Server",
120
- icon: "logos-visual-studio-code"
121
- },
122
- nuxt
123
- );
124
- for (let i = 0; i < 100; i++) {
125
- if (await fetch(url).then((r) => r.ok).catch(() => false))
126
- break;
127
- await new Promise((resolve2) => setTimeout(resolve2, 500));
128
- }
129
- await new Promise((resolve2) => setTimeout(resolve2, 2e3));
130
- loaded = true;
131
- }
132
- async function startCodeTunnel() {
133
- const { stdout: currentDir } = await execa("pwd");
134
- url = `https://vscode.dev/tunnel/${computerHostName}${currentDir}`;
135
- logger.info(LOG_PREFIX, `Starting VS Code tunnel at ${url} ...`);
136
- const command = execa("code", [
137
- "tunnel",
138
- "--accept-server-license-terms",
139
- "--name",
140
- `${computerHostName}`
141
- ]);
142
- command.stderr?.pipe(process.stderr);
143
- command.stdout?.pipe(process.stdout);
144
- nuxt.hook("close", () => {
145
- command.kill();
146
- });
147
- for (let i = 0; i < 100; i++) {
148
- if (await fetch(url).then((r) => r.ok).catch(() => false))
149
- break;
150
- await new Promise((resolve2) => setTimeout(resolve2, 500));
151
- }
152
- await new Promise((resolve2) => setTimeout(resolve2, 2e3));
153
- loaded = true;
154
- }
155
- async function start() {
156
- if (mode === "tunnel")
157
- await startCodeTunnel();
158
- else
159
- await startCodeServer();
160
- }
161
- nuxt.hook("devtools:customTabs", (tabs) => {
162
- tabs.push({
163
- name: "builtin-vscode",
164
- title: "VS Code",
165
- icon: "bxl-visual-studio",
166
- category: "modules",
167
- requireAuth: true,
168
- view: !installed && !(vsOptions?.mode === "tunnel") ? {
169
- type: "launch",
170
- title: "Install VS Code Server",
171
- description: `It seems you don't have code-server installed.
172
-
173
- Learn more about it with <a href="https://code.visualstudio.com/blogs/2022/07/07/vscode-server" target="_blank">this guide</a>.
174
- Once installed, restart Nuxt and visit this tab again.`,
175
- actions: []
176
- } : !loaded ? {
177
- type: "launch",
178
- description: "Launch VS Code right in the devtools!",
179
- actions: [{
180
- label: promise ? "Starting..." : "Launch",
181
- pending: !!promise,
182
- handle: () => {
183
- promise = promise || start();
184
- return promise;
185
- }
186
- }]
187
- } : {
188
- type: "iframe",
189
- src: url
190
- }
191
- });
192
- });
193
- if (vsOptions?.startOnBoot)
194
- promise = promise || start();
195
- }
196
-
197
- export { setup };
@@ -1,19 +0,0 @@
1
- import { addPluginTemplate, resolvePath } from '@nuxt/kit';
2
- import { join } from 'pathe';
3
- import { runtimeDir } from '../dirs.mjs';
4
- import 'node:path';
5
- import 'node:url';
6
- import 'is-installed-globally';
7
-
8
- async function setup({ nuxt }) {
9
- if (!nuxt.options.dev || nuxt.options.test)
10
- return;
11
- addPluginTemplate({
12
- name: "vue-devtools-client",
13
- mode: "client",
14
- order: -1e3,
15
- src: await resolvePath(join(runtimeDir, "vue-devtools-client"))
16
- });
17
- }
18
-
19
- export { setup };
@@ -1 +0,0 @@
1
- import{T as e,W as t,_ as n}from"./vendor/json-editor-vue-ajxjng9j.js";import{t as r}from"./composables-ioamscf4.js";var i={"h-screen":``,"w-screen":``,"bg-black":``},a=e({__name:`__blank`,setup(e){return r({layout:`none`}),(e,r)=>(t(),n(`div`,i))}});export{a as default};
@@ -1 +0,0 @@
1
- import{a as e}from"./nuxt-hhee6z5x.js";import{C as t,Ct as n,Mt as r,Qt as i,S as a,T as o,W as s,Y as c,_ as l,dt as u,ft as d,g as f,h as p,m,p as h,s as g,tn as _}from"./vendor/json-editor-vue-ajxjng9j.js";import{at as v,xt as y}from"./ready-j6igpruf.js";import{_ as b,g as x}from"./utils-gsui1utc.js";import{A as S,h as C,k as w,l as T}from"./client-kw9rd8gy.js";import{t as E}from"./npm-bs3acmpx.js";import{t as D}from"./_plugin-vue_export-helper-d9irwgla.js";import{t as O}from"./nbutton-n4jak7c4.js";import{t as k}from"./ntip-lla1rr8h.js";import{t as A}from"./ndialog-d7onas5p.js";import{r as j}from"./state-routes-ckw7s1pq.js";import{t as M}from"./telemetry-pbqlai15.js";import{t as N}from"./npanel-grids-l34v8x7x.js";import{t as P}from"./nsplit-pane-c8b9c6ro.js";import{t as F}from"./ntext-input-m2w61kr5.js";import{r as I,t as L}from"./state-subprocess-omk907f9.js";import{t as R}from"./ncode-block-pepewqmk.js";import{t as z}from"./composables-ioamscf4.js";import{t as B}from"./ncheckbox-g0h4v30t.js";import{t as V}from"./filepath-item-n14cgzrq.js";import{t as H}from"./help-fab-bxbzpji6.js";var U={"h-full":``,grid:`~ rows-[max-content_1fr]`},W={flex:`~ wrap`,"w-full":``},G=[`onClick`],K={key:0,flex:`~ col gap-4 items-center justify-center`,p4:``},q={grid:`~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center`,"w-100":``},J=`/__nuxt_devtools__/client`,Y=Object.assign(o({__name:`BuildAnalyzeDetails`,props:{current:{},prev:{}},setup(o){let p=o,v=`${e().app.baseURL.replace(J,`/`)}/__nuxt_devtools__/analyze/`.replace(/\/+/g,`/`),b=h(()=>{let e=[{name:`Overview`,id:`overview`}];return p.current.features.bundleClient&&e.push({name:`Client Bundle`,id:`bundle-client`}),p.current.features.bundleNitro&&e.push({name:`Nitro Bundle`,id:`bundle-nitro`}),p.current.features.viteInspect&&e.push({name:`Vite Inspect`,id:`vite-inspect`}),e}),x=n(b.value[0]);function w(e){return`${((e.endTime-e.startTime)/1e3).toFixed(1)}s`}function E(e){return e<1024?`${e}B`:e<1048576?`${(e/1024).toFixed(1)}KB`:e<1073741824?`${(e/1024/1024).toFixed(1)}MB`:`${(e/1024/1024/1024).toFixed(1)}GB`}async function D(e){return C.clearAnalyzeBuilds(await T(),[e])}return(e,n)=>{let p=V,h=O;return s(),l(`div`,U,[m(`div`,W,[(s(!0),l(g,null,c(b.value,(e,t)=>(s(),l(`button`,{key:t,px4:``,py2:``,border:`r base`,hover:`bg-active`,class:i(e.id===x.value?.id?``:`border-b`),onClick:t=>x.value=e},[m(`div`,{class:i(e.id===x.value?.id?``:`op30`)},_(e.name),3)],10,G))),128)),n[1]||=m(`div`,{border:`b base`,"flex-auto":``},null,-1)]),x.value?.id===`overview`?(s(),l(`div`,K,[n[15]||=m(`div`,{"flex-auto":``},null,-1),m(`div`,q,[n[10]||=m(`div`,{"i-carbon-commit":``,"text-xl":``},null,-1),m(`div`,null,[n[2]||=m(`div`,{"text-sm":``,op50:``},` Name `,-1),m(`div`,null,_(o.current.name),1)]),n[11]||=m(`div`,{"i-carbon-time":``,"text-xl":``},null,-1),m(`div`,null,[n[3]||=m(`div`,{"text-sm":``,op50:``},` Build duration `,-1),m(`div`,null,_(w(o.current)),1)]),o.current.size?.clientBundle?(s(),l(g,{key:0},[n[5]||=m(`div`,{"i-carbon-cics-program":``,"text-xl":``},null,-1),m(`div`,null,[n[4]||=m(`div`,{"text-sm":``,op50:``},` Client bundle size `,-1),m(`div`,null,_(E(o.current.size.clientBundle)),1)])],64)):f(``,!0),o.current.size?.nitroBundle?(s(),l(g,{key:1},[n[7]||=m(`div`,{"i-carbon-bare-metal-server":``,"text-xl":``},null,-1),m(`div`,null,[n[6]||=m(`div`,{"text-sm":``,op50:``},` Nitro bundle size `,-1),m(`div`,null,_(E(o.current.size.nitroBundle)),1)])],64)):f(``,!0),n[12]||=m(`div`,{"i-carbon-edge-node":``,"text-xl":``},null,-1),m(`div`,null,[n[8]||=m(`div`,{"text-sm":``,op50:``},` Built `,-1),m(`div`,null,_(r(S)(new Date(o.current.endTime))),1)]),n[13]||=m(`div`,{"i-carbon:folder-parent":``,"text-xl":``},null,-1),m(`div`,null,[n[9]||=m(`div`,{"text-sm":``,op50:``},` Report Path `,-1),t(p,{filepath:o.current.analyzeDir},null,8,[`filepath`])])]),n[16]||=m(`div`,{"flex-auto":``},null,-1),t(h,{n:`rose`,icon:`carbon-delete`,onClick:n[0]||=e=>D(o.current.name)},{default:u(()=>[...n[14]||=[a(` Delete this report `,-1)]]),_:1})])):f(``,!0),n._lazyshow1||x.value?.id===`bundle-client`?(n._lazyshow1=!0,s(),l(g,null,[d(m(`iframe`,{src:`${r(v)}${o.current.slug}/client.html`,"h-full":``,"w-full":``},null,8,[`src`]),[[y,x.value?.id===`bundle-client`]])],64)):f(`v-show-if`,!0),n._lazyshow2||x.value?.id===`bundle-nitro`?(n._lazyshow2=!0,s(),l(g,null,[d(m(`iframe`,{src:`${r(v)}${o.current.slug}/nitro.html`,"h-full":``,"w-full":``},null,8,[`src`]),[[y,x.value?.id===`bundle-nitro`]])],64)):f(`v-show-if`,!0),n._lazyshow3||x.value?.id===`vite-inspect`?(n._lazyshow3=!0,s(),l(g,null,[d(m(`iframe`,{src:`${r(v)}${o.current.slug}/.vite-inspect/`,"h-full":``,"w-full":``},null,8,[`src`]),[[y,x.value?.id===`vite-inspect`]])],64)):f(`v-show-if`,!0)])}}}),{__name:`BuildAnalyzeDetails`}),X={},Z={class:`markdown-body`};function Q(e,t){return s(),l(`div`,Z,[...t[0]||=[m(`template`,null,[m(`div`,{class:`markdown-body`},[m(`h1`,null,`Build Analyze`),m(`p`,null,[a(`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 `),m(`code`,{"v-pre":``},`nuxt build --analyze`),a(` and present the output data directly in DevTools for easy browsing and comparing.`)])])],-1)]])}var $=D(X,[[`render`,Q]]),ee={flex:`~ col`},te=[`onClick`],ne={flex:`~ gap-1 items-center wrap`,"w-full":``,"text-sm":``,op60:``},re={flex:`~ items-center justify-center wrap`,p4:``},ie={flex:`~ col gap-1`,"w-250":``,p4:``},ae={flex:`~ gap-3`,mt2:``,"justify-end":``},oe=o({__name:`analyze-build`,setup(e){z({icon:`carbon-edge-node`,title:`Build Analyze`,layout:`full`,category:`analyze`,show(){return E(`^3.5.0`)}});let o=w(),d=b(),y=v(),D=x(`analyze-build:slug`,``),V=h(()=>d.value?.builds.find(e=>e.slug===D.value)??d.value?.builds[0]),U=n(!1),W=n(``),G=h(()=>d.value?.builds.some(e=>e.name===W.value.trim()));async function K(){W.value=await C.generateAnalyzeBuildName(),await o.start()&&(M(`analyze-build:start`),L.value={name:W.value,processId:await C.startAnalyzeBuild(await T(),W.value)},U.value&&X())}let q=j();function J(e){return`${((e.endTime-e.startTime)/1e3).toFixed(1)}s`}function X(){L.value?.processId&&(q.value=L.value.processId,y.push(`/modules/terminals`))}return I(()=>[{id:`action:analyze-build: start`,title:`Start a new analyze build`,icon:`i-carbon-edge-node`,action:K}]),(e,n)=>{let h=O,v=Y,y=N,b=P,x=F,C=k,w=R,T=B,E=A,j=$,M=H;return s(),l(g,null,[t(b,{"left-size":30},{left:u(()=>[m(`div`,ee,[(s(!0),l(g,null,c(r(d)?.builds,e=>(s(),l(g,{key:e.slug},[m(`button`,{flex:`~ col gap1`,p3:``,"hover:bg-active":``,class:i(e.slug===V.value?.slug?`text-primary bg-active`:``),onClick:t=>D.value=e.slug},[m(`code`,null,_(e.name),1),m(`div`,ne,[n[4]||=m(`div`,{"i-carbon-time":``},null,-1),m(`span`,null,_(J(e)),1),n[5]||=m(`div`,{"flex-auto":``},null,-1),m(`span`,null,_(r(S)(new Date(e.endTime))),1)])],10,te),n[6]||=m(`div`,{"x-divider":``},null,-1)],64))),128)),m(`div`,re,[r(L)?(s(),p(h,{key:1,n:`primary`,icon:`carbon-circle-dash animate-spin`,onClick:n[1]||=e=>X()},{default:u(()=>[...n[8]||=[a(` Building... `,-1)]]),_:1})):(s(),p(h,{key:0,n:`primary`,icon:`carbon-edge-node`,onClick:n[0]||=e=>K()},{default:u(()=>[...n[7]||=[a(` Start a new build `,-1)]]),_:1}))])])]),right:u(()=>[V.value?(s(),p(v,{key:0,current:V.value},null,8,[`current`])):(s(),p(y,{key:1}))]),_:1}),t(r(o),null,{default:u(({resolve:e})=>[t(E,{"model-value":!0,onClose:t=>e(!1)},{default:u(()=>[m(`div`,ie,[n[13]||=m(`h3`,{class:`text-lg font-medium leading-6`,mb2:``},` Start analyze build? `,-1),n[14]||=m(`p`,{op50:``},` Enter the name of the build: `,-1),t(x,{modelValue:W.value,"onUpdate:modelValue":n[2]||=e=>W.value=e,placeholder:`Build name`},null,8,[`modelValue`]),G.value?(s(),p(C,{key:0,"n-orange":``},{default:u(()=>[...n[9]||=[a(` A build with the same name already exists, continue would overrides the previous build result. `,-1)]]),_:1})):f(``,!0),n[15]||=m(`div`,{my3:``,"x-divider":``},null,-1),n[16]||=m(`p`,{op50:``},` The following command will be executed in your terminal: `,-1),t(w,{code:`npx nuxi analyze --no-serve --name=${W.value}`,lang:`bash`,px4:``,py2:``,border:`~ base rounded`,lines:!1},null,8,[`code`]),t(T,{modelValue:U.value,"onUpdate:modelValue":n[3]||=e=>U.value=e,mt2:``,n:`primary`},{default:u(()=>[...n[10]||=[a(` Navigate to terminal `,-1)]]),_:1},8,[`modelValue`]),m(`div`,ae,[t(h,{onClick:t=>e(!1)},{default:u(()=>[...n[11]||=[a(` Cancel `,-1)]]),_:1},8,[`onClick`]),t(h,{n:`solid primary`,onClick:t=>e(!0)},{default:u(()=>[...n[12]||=[a(` Start `,-1)]]),_:1},8,[`onClick`])])])]),_:2},1032,[`onClose`])]),_:1}),t(M,null,{default:u(()=>[t(j)]),_:1})],64)}}});export{oe as default};
@@ -1,6 +0,0 @@
1
- import{C as e,Ct as t,Mt as n,Q as r,Qt as i,S as a,T as o,W as s,X as c,Y as l,_ as u,dt as d,en as f,ft as p,g as m,h,m as g,p as _,s as v,tn as y,vt as b}from"./vendor/json-editor-vue-ajxjng9j.js";import{St as x,bt as S}from"./ready-j6igpruf.js";import{j as C,w}from"./utils-gsui1utc.js";import{D as T,E,G as D,K as O,M as k,W as A,Y as j,g as M,h as N,l as P,v as F,z as I}from"./client-kw9rd8gy.js";import{t as L}from"./storage-options-h4ted7ut.js";import{t as R}from"./nicon-oi9zv8qe.js";import{t as z}from"./nbutton-n4jak7c4.js";import{t as B}from"./ndialog-d7onas5p.js";import{t as V}from"./telemetry-pbqlai15.js";import{n as ee,t as te}from"./editor-gio3gzf5.js";import{t as H}from"./ntext-input-m2w61kr5.js";import{t as U}from"./fuse-blwyun20.js";import{t as W}from"./ndropdown-hei8kmpv.js";import{t as G}from"./ndrawer-rf7qwkr7.js";import{t as K}from"./composables-ioamscf4.js";import{t as q}from"./ncheckbox-g0h4v30t.js";import{t as ne}from"./filepath-item-n14cgzrq.js";import{t as J}from"./nnavbar-dxs3xl8m.js";import{r as Y,t as re}from"./code-snippets-iyqjogm4.js";import{t as ie}from"./nsection-block-deo3d5ca.js";var ae={key:0,"h-full":``,"w-full":``,flex:``,"items-center":``,"justify-center":``},oe={for:`drop-zone-input`,"text-3xl":``,hover:`text-green cursor-pointer`,"transition-all":``},se={key:1,relative:``,"h-full":``,"w-full":``,grid:`~ rows-[max-content_1fr_max-content]`},ce={grid:`~ cols-minmax-8rem gap-8`,"overflow-auto":``,p6:``},le={flex:``,"items-center":``,"justify-center":``,"of-hidden":``,rounded:``,"rounded-t-lg":``,"bg-active":``,"object-cover":``,class:`aspect-1/1`,border:`~ base`},ue=[`src`],de={flex:`~ gap1`,"items-center":``},fe={flex:`~ gap-2`,"items-center":``,"justify-center":``,p8:``},pe=Object.assign(o({__name:`AssetDropZone`,props:{modelValue:{type:Boolean,required:!0},folder:{type:String,required:!0}},setup(o){let c=o,f=/\.\w+$/,_=O(c,`modelValue`),y=t(),b=t([]);function x(e){y.value=e.target,_.value=!0}function S(e){e.target===y.value&&(_.value=!1)}function C(e){e.preventDefault()}function w(e){e.preventDefault(),T(e.dataTransfer.files)}function T(e){let t=[...e||[]];if(t.length){let e=[],n=b.value.map(e=>e.name);for(let r of t)if(n.includes(r.name)){let t=1,[i,a]=r.name.split(`.`);for(;n.includes(`${i} (${t}).${a}`);)t++;let o=`${i}-${t}.${a}`,s=new Blob([r],{type:r.type}),c=new File([s],o,{lastModified:Date.now()});e.push(c),n.push(o)}else r.type===``&&E({message:`Folders are not supported yet`,icon:`carbon:face-dissatisfied`,classes:`text-orange`}),e.push(r);b.value=[...b.value,...e]}}async function D(){if(M.value||F.value)return;V(`assets:upload`);let e=[];for(let t of b.value){let n=new FileReader;n.readAsDataURL(t);let r=(await new Promise(e=>{n.onload=()=>e(n.result)})).split(`;base64,`).pop();e.push({path:t.name,encoding:`base64`,content:r})}await N.writeStaticAssets(await P(),[...e],c.folder).then(()=>{B(),E({message:`Files uploaded successfully!`,icon:`i-carbon:checkmark`})}).catch(e=>{B(),E({message:`Error uploading files: ${e?.message??`unknown`}`,icon:`i-carbon-warning`,classes:`text-red`})}),_.value=!1}function k(e){b.value?.splice(e,1)}function A(e){return URL.createObjectURL(e)}function j(e,t){let[n,r]=e.name.split(`.`),i=t.replace(f,``),a=`${i}.${r}`;return i.length===0?(alert(`File name must be at least 1 characters long`),n):(Object.defineProperty(e,"name",{value:a,writable:!1}),b.value.splice(b.value.indexOf(e),1,e),e)}function L(){b.value=[]}function B(){_.value=!1,L()}return I(`dragenter`,x),I(`dragleave`,S),I(`dragover`,C),I(`drop`,w),(t,o)=>{let c=z,f=R,y=H,x=r(`tooltip`);return s(),u(`div`,{fixed:``,"bottom-0":``,"left-13":``,"right-0":``,"top-0":``,"z-10":``,"backdrop-blur-20":``,"transition-all":``,class:i(n(_)?`opacity-100 visible`:`opacity-0 invisible`)},[p(e(c,{icon:`carbon-close`,title:`Close`,absolute:``,"right-5":``,"top-5":``,"z-20":``,"text-xl":``,border:!1,onClick:B},null,512),[[x,`Close`,void 0,{"bottom-end":!0}]]),b.value?.length?(s(),u(`div`,se,[o[4]||=g(`div`,{px6:``,py6:``},[g(`h1`,{"text-2xl":``},` Upload `),g(`p`,{"text-sm":``,op50:``},` Drag and drop files to upload `)],-1),g(`div`,ce,[(s(!0),u(v,null,l(b.value,(t,n)=>(s(),u(`div`,{key:t.name,flex:`~ col gap-2`,relative:``,"h-50":``,"w-40":``,"items-center":``},[g(`div`,le,[g(`img`,{"h-full":``,"w-full":``,"rounded-t-lg":``,"object-cover":``,src:A(t)},null,8,ue)]),g(`div`,de,[e(y,{n:`xs`,"h-full":``,"flex-auto":``,"model-value":t.name,"onUpdate:modelValue":e=>j(t,e.target.value)},null,8,[`model-value`,`onUpdate:modelValue`]),e(c,{n:`red`,icon:`carbon-trash-can`,"h-full":``,"flex-none":``,title:`Remove file`,onClick:e=>k(n)},null,8,[`onClick`])])]))),128))]),g(`div`,fe,[b.value.length?(s(),h(c,{key:0,n:`red`,onClick:L},{default:d(()=>[e(f,{icon:`carbon-clean`}),o[2]||=a(` Clear `,-1)]),_:1})):m(``,!0),e(c,{disabled:!b.value.length,n:`primary solid`,onClick:D},{default:d(()=>[e(f,{icon:`carbon-cloud-upload`}),o[3]||=a(` Upload `,-1)]),_:1},8,[`disabled`])])])):(s(),u(`div`,ae,[g(`label`,oe,[e(f,{icon:`carbon-cloud-upload`,"mr-2":``}),o[1]||=a(` Drop files here or click to select `,-1)]),g(`input`,{id:`drop-zone-input`,type:`file`,multiple:``,hidden:``,onChange:o[0]||=e=>T(e.target.files)},null,32)]))],2)}}}),{__name:`AssetDropZone`}),me=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],he=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],ge=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,X=[],_e=class{_data=new Z;_hash=new Z([...me]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7];for(let n=0;n<64;n++){if(n<16)X[n]=e[t+n]|0;else{let e=X[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=X[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;X[n]=t+X[n-7]+i+X[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+he[n]+X[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=Z.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e<r;e+=16)this._doProcessBlock(this._data.words,e);t=this._data.words.splice(0,r),this._data.sigBytes-=i}return new Z(t,i)}},Z=class e{words;sigBytes;constructor(e,t){e=this.words=e||[],this.sigBytes=t===void 0?e.length*4:t}static fromUtf8(t){let n=unescape(encodeURIComponent(t)),r=n.length,i=[];for(let e=0;e<r;e++)i[e>>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t<this.sigBytes;t+=3){let n=this.words[t>>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6<this.sigBytes*8;n++)e.push(ge.charAt(a>>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t<e.sigBytes;t++){let n=e.words[t>>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t<e.sigBytes;t+=4)this.words[this.sigBytes+t>>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function ve(e){return new _e().finalize(e).toBase64()}function ye(e){return ve(Y(e))}var be=Object.assign(o({__name:`AssetFontPreview`,props:{asset:{}},setup(e){let t=e,n=_(()=>`devtools-assets-${ye(t.asset)}`);return A(_(()=>`
2
- @font-face {
3
- font-family: '${n.value}';
4
- src: url('${t.asset.publicPath}');
5
- }
6
- `)),(e,t)=>(s(),u(`div`,{"of-hidden":``,style:f({fontFamily:`'${n.value}'`})},` 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))}}),{__name:`AssetFontPreview`}),xe={flex:``,"items-center":``,"justify-center":``,"of-hidden":``,"bg-active":``,"object-cover":``,p1:``},Se=[`src`],Ce={key:2,"i-carbon-document":``,"text-3xl":``,op20:``},we={key:3,"w-full":``,"self-start":``,p4:``},Te=[`textContent`],Ee={key:4},De=[`src`,`autoplay`,`controls`],Oe={key:5},ke={key:0,"i-carbon-volume-up":``,"text-3xl":``,op20:``},Ae=[`src`],je={key:6,"i-carbon-help":``,"text-3xl":``,op20:``},Q=Object.assign(o({__name:`AssetPreview`,props:{asset:{},textContent:{},detail:{type:Boolean}},setup(e){return(t,n)=>{let r=be;return s(),u(`div`,xe,[e.asset.type===`image`?(s(),u(`img`,{key:0,src:e.asset.publicPath},null,8,Se)):e.asset.type===`font`?(s(),h(r,{key:e.asset.publicPath,asset:e.asset,"self-stretch":``,p2:``,"text-2xl":``},null,8,[`asset`])):e.asset.type===`text`&&!e.textContent?(s(),u(`div`,Ce)):e.asset.type===`text`&&e.textContent?(s(),u(`div`,we,[g(`pre`,{"max-h-10rem":``,"of-hidden":``,"text-xs":``,"font-mono":``,textContent:y(e.textContent)},null,8,Te)])):e.asset.type===`video`?(s(),u(`div`,Ee,[g(`video`,{src:e.asset.publicPath,autoplay:e.detail,controls:e.detail},null,8,De)])):e.asset.type===`audio`?(s(),u(`div`,Oe,[e.detail?(s(),u(`audio`,{key:1,src:e.asset.publicPath,controls:``},null,8,Ae)):(s(),u(`div`,ke))])):(s(),u(`div`,je))])}}}),{__name:`AssetPreview`}),Me={relative:``,flex:`~ col gap-1`,hover:`bg-active`,"items-center":``,"of-hidden":``,rounded:``,p2:``},Ne={"w-full":``,"of-hidden":``,truncate:``,"ws-nowrap":``,"text-center":``,"text-xs":``},Pe=Object.assign(o({__name:`AssetGridItem`,props:{asset:{},folder:{}},setup(t){let n=t,r=_(()=>n.folder&&n.asset.path.startsWith(n.folder)?n.asset.path.slice(n.folder.length):n.asset.path);return(n,i)=>{let a=R,o=Q;return s(),u(`button`,Me,[t.asset.layer?(s(),h(a,{key:0,icon:`i-carbon-layers`,absolute:``,"right-4":``,"top-4":``,"bg-primary":``})):m(``,!0),e(o,{"h-30":``,"w-30":``,rounded:``,border:`~ base`,asset:t.asset},null,8,[`asset`]),g(`div`,Ne,y(r.value),1)])}}}),{__name:`AssetGridItem`}),$=Object.assign(o({__name:`AssetListItem`,props:{item:{},index:{default:0},modelValue:{}},setup(e,{emit:r}){let o=e,d=O(o,`modelValue`,r,{passive:!0}),p=_(()=>o.item?.children?.length),x=t(!0),S=_(()=>p.value?`i-carbon-folder`:o.item.type===`image`?`i-carbon-image`:o.item.type===`video`?`i-carbon-video`:o.item.type===`audio`?`i-carbon-volume-up`:o.item.type===`font`?`i-carbon-text-small-caps`:o.item.type===`text`?`i-carbon-document`:o.item.type===`json`?`i-carbon-json`:`i-carbon-document-blank`);return(t,r)=>{let o=R,_=$;return s(),u(`div`,null,[g(`button`,{flex:`~ gap-2`,"w-full":``,"items-center":``,hover:`bg-active`,px4:``,py1:``,style:f({paddingLeft:`calc(1rem + ${e.index*1.5}em)`}),class:i({"bg-active":!p.value&&n(d)?.filePath===e.item?.filePath}),border:`b base`,onClick:r[0]||=t=>p.value?x.value=!x.value:d.value=e.item},[g(`div`,{class:i(S.value)},null,2),g(`span`,{class:i({"flex items-center":p.value}),"flex-auto":``,"text-start":``,"text-sm":``,"font-mono":``},[a(y(e.item.path)+` `,1),e.item.layer?(s(),h(o,{key:0,icon:`i-carbon-layers`,"bg-primary":``})):m(``,!0)],2),p.value?(s(),h(o,{key:0,icon:`carbon:chevron-right`,"transform-rotate":x.value?90:0,transition:``},null,8,[`transform-rotate`])):m(``,!0)],6),x.value?c(t.$slots,`default`,{},()=>[(s(!0),u(v,null,l(e.item?.children,t=>(s(),h(_,{key:t.filepath,modelValue:n(d),"onUpdate:modelValue":r[1]||=e=>b(d)?d.value=e:null,item:t,index:e.index+1},null,8,[`modelValue`,`item`,`index`]))),128))],void 0,0):m(``,!0)])}}}),{__name:`AssetListItem`}),Fe={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p4:``},Ie={flex:`~`,"items-center":``,"justify-center":``},Le={"max-w-full":``,"w-full":``,"table-fixed":``},Re={flex:`~ gap-1`,"w-full":``,"items-center":``},ze={flex:`~ gap-1`,"w-full":``,"items-center":``,"of-hidden":``},Be={"flex-auto":``,"of-hidden":``,truncate:``,"ws-pre":``,"font-mono":``},Ve={capitalize:``},He={key:0},Ue={op70:``},We={flex:`~ gap2 wrap`},Ge={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p8:``},Ke={flex:`~ gap2 wrap justify-center`},qe={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p8:``},Je={flex:`~ gap2 wrap justify-center`},Ye={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p4:``},Xe={flex:``,"justify-end":``,"gap-4":``},Ze=Object.assign(o({__name:`AssetDetails`,props:{modelValue:{}},setup(i,{emit:o}){let c=O(i,`modelValue`,o,{passive:!0}),l=T(async()=>{if(c.value.type===`image`)return N.getImageMeta(await P(),c.value.filePath)}),f=t(!1),b=t(),C=t(0),k=T(async()=>{if(c.value.type!==`text`)return;C.value;let e=await N.getTextAssetContent(await P(),c.value.filePath);return b.value=e,e});async function A(){if(k.value!==b.value)try{await N.writeStaticAssets(await P(),[{path:c.value.path,content:b.value,override:!0}],``),f.value=!1,C.value++,E({message:`Updated`,icon:`i-carbon-checkmark`,classes:`text-green`})}catch(e){console.error(e),E({message:`Something went wrong!`,icon:`i-carbon-warning`,classes:`text-red`})}}let j=w(),M=_(()=>(j.value?._installedModules||[]).some(e=>e.meta?.name===`@nuxt/image`||e.meta?.name===`@nuxt/image-edge`||e.meta?.name===`@nuxt/image-nightly`)),F=_(()=>{let e=[];if(c.value.type===`image`){let t=l.value?.width?`\n width="${l.value.width}"\n height="${l.value.height}" `:` `;return e.push({lang:`vue-html`,code:`<img${t}\n src="${c.value.publicPath}"\n/>`,name:`Plain Image`}),M.value&&e.push({lang:`vue-html`,code:`<NuxtImg${t}\n src="${c.value.publicPath}"\n/>`,name:`Nuxt Img`,docs:`https://image.nuxt.com/usage/nuxt-img`},{lang:`vue-html`,code:`<NuxtPicture${t}\n src="${c.value.publicPath}"\n/>`,name:`Nuxt Picture`,docs:`https://image.nuxt.com/usage/nuxt-picture`}),e}return e.push({lang:`html`,code:`<a download href="${c.value.publicPath}">\n Download ${c.value.path.split(`/`).slice(-1)[0]}\n</a>`,name:`Download link`}),e}),I=te(),L=ee(),R=D(()=>c.value.mtime),V=_(()=>{let e=c.value.size;return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(2)} KB`:`${(e/1024/1024).toFixed(2)} MB`}),U=_(()=>{if(!l.value?.width||!l.value?.height)return``;let e=(t,n)=>n?e(n,t%n):t,t=e(l.value.width,l.value.height);return t>3?`${l.value.width/t}:${l.value.height/t}`:``}),W=_(()=>[`image`,`text`,`video`,`audio`,`font`].includes(c.value.type)),G=t(!1);async function K(){try{await N.deleteStaticAsset(await P(),c.value.filePath),c.value=void 0,G.value=!1,E({message:`Asset deleted`,icon:`i-carbon-checkmark`,classes:`text-green`})}catch(e){console.error(e),E({message:`Something went wrong!`,icon:`i-carbon-warning`,classes:`text-red`})}}let q=t(!1),J=t(``);async function Y(){let e=c.value.filePath.split(`/`),t=e.slice(-1)[0]?.split(`.`).slice(0,-1).join(`.`);if(!J.value||J.value===t)return E({message:`Please enter a new name`,icon:`i-carbon-warning`,classes:`text-orange`});try{let t=e.slice(-1)[0]?.split(`.`).slice(-1)[0],n=`${e.slice(0,-1).join(`/`)}/${J.value}.${t}`;await N.renameStaticAsset(await P(),c.value.filePath,n),c.value=void 0,q.value=!1,E({message:`Asset renamed`,icon:`i-carbon-checkmark`,classes:`text-green`})}catch(e){console.error(e),E({message:`Something went wrong!`,icon:`i-carbon-warning`,classes:`text-red`})}}return(t,i)=>{let o=Q,_=ne,C=z,w=re,T=B,E=H,D=r(`tooltip`);return s(),u(v,null,[g(`div`,Fe,[W.value?(s(),u(v,{key:0},[i[13]||=g(`div`,{flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},[g(`div`,{"x-divider":``}),g(`div`,{"flex-none":``},` Preview `),g(`div`,{"x-divider":``})],-1),g(`div`,Ie,[e(o,{detail:``,"max-h-80":``,"min-h-20":``,"min-w-20":``,"w-auto":``,rounded:``,border:`~ base`,asset:n(c),"text-content":n(k)},null,8,[`asset`,`text-content`])])],64)):m(``,!0),i[25]||=g(`div`,{flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},[g(`div`,{"x-divider":``}),g(`div`,{"flex-none":``},` Details `),g(`div`,{"x-divider":``})],-1),g(`table`,Le,[g(`tbody`,null,[g(`tr`,null,[i[14]||=g(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Filepath `,-1),g(`td`,null,[g(`div`,Re,[e(_,{filepath:n(c).filePath,"text-left":``},null,8,[`filepath`]),p(e(C,{"flex-none":``,title:`Open in Editor`,icon:`carbon-launch`,border:!1,onClick:i[0]||=e=>n(L)(n(c).filePath)},null,512),[[D,`Open in Editor`]])])])]),g(`tr`,null,[i[15]||=g(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Public Path `,-1),g(`td`,null,[g(`div`,ze,[g(`div`,Be,y(n(c).publicPath),1),p(e(C,{"flex-none":``,title:`Copy public path`,icon:`carbon-copy`,border:!1,onClick:i[1]||=e=>n(I)(n(c).publicPath,`assets-public-path`)},null,512),[[D,`Copy public path`]]),p(e(C,{"flex-none":``,to:n(c).publicPath,icon:`carbon-launch`,target:`_blank`,border:!1,title:`Open in browser`},null,8,[`to`]),[[D,`Open in browser`]])])])]),g(`tr`,null,[i[16]||=g(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Type `,-1),g(`td`,Ve,y(n(c).type),1)]),n(l)?.width?(s(),u(v,{key:0},[g(`tr`,null,[i[17]||=g(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Image Size `,-1),g(`td`,null,y(n(l).width)+` x `+y(n(l).height),1)]),U.value?(s(),u(`tr`,He,[i[18]||=g(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Aspect Ratio `,-1),g(`td`,null,y(U.value),1)])):m(``,!0)],64)):m(``,!0),g(`tr`,null,[i[19]||=g(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` File size `,-1),g(`td`,null,y(V.value),1)]),g(`tr`,null,[i[20]||=g(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Last modified `,-1),g(`td`,null,[a(y(new Date(n(c).mtime).toLocaleString())+` `,1),g(`span`,Ue,`(`+y(n(R))+`)`,1)])])])]),i[26]||=g(`div`,{flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},[g(`div`,{"x-divider":``}),g(`div`,{"flex-none":``},` Actions `),g(`div`,{"x-divider":``})],-1),g(`div`,We,[e(C,{to:n(c).publicPath,download:``,target:`_blank`,icon:`carbon-download`,n:`green`},{default:d(()=>[...i[21]||=[a(` Download `,-1)]]),_:1},8,[`to`]),n(c).type===`text`?(s(),h(C,{key:0,icon:`carbon-edit`,n:`cyan`,onClick:i[2]||=e=>f.value=!f.value},{default:d(()=>[...i[22]||=[a(` Edit `,-1)]]),_:1})):m(``,!0),e(C,{icon:`carbon-text-annotation-toggle`,n:`blue`,onClick:i[3]||=e=>q.value=!q.value},{default:d(()=>[...i[23]||=[a(` Rename `,-1)]]),_:1}),e(C,{icon:`carbon-delete`,n:`red`,onClick:i[4]||=e=>G.value=!G.value},{default:d(()=>[...i[24]||=[a(` Delete `,-1)]]),_:1})]),i[27]||=g(`div`,{"flex-auto":``},null,-1),F.value.length?(s(),h(w,{key:1,border:`t base`,"mx--4":``,"mb--4":``,"code-snippets":F.value},null,8,[`code-snippets`])):m(``,!0)]),e(T,{modelValue:G.value,"onUpdate:modelValue":i[6]||=e=>G.value=e},{default:d(()=>[g(`div`,Ge,[i[30]||=g(`span`,null,` Are you sure you want to delete this asset? `,-1),g(`div`,Ke,[e(C,{icon:`carbon-close`,onClick:i[5]||=e=>G.value=!1},{default:d(()=>[...i[28]||=[a(` Cancel `,-1)]]),_:1}),e(C,{icon:`carbon-delete`,n:`red`,onClick:K},{default:d(()=>[...i[29]||=[a(` Delete `,-1)]]),_:1})])])]),_:1},8,[`modelValue`]),e(T,{modelValue:q.value,"onUpdate:modelValue":i[9]||=e=>q.value=e},{default:d(()=>[g(`div`,qe,[e(E,{modelValue:J.value,"onUpdate:modelValue":i[7]||=e=>J.value=e,placeholder:`New name`,n:`blue`},null,8,[`modelValue`]),g(`div`,Je,[e(C,{icon:`carbon-close`,onClick:i[8]||=e=>q.value=!1},{default:d(()=>[...i[31]||=[a(` Cancel `,-1)]]),_:1}),e(C,{icon:`carbon-text-annotation-toggle`,n:`blue`,onClick:Y},{default:d(()=>[...i[32]||=[a(` Rename `,-1)]]),_:1})])])]),_:1},8,[`modelValue`]),n(c).type===`text`?(s(),h(T,{key:0,modelValue:f.value,"onUpdate:modelValue":i[12]||=e=>f.value=e},{default:d(()=>[g(`div`,Ye,[p(g(`textarea`,{"onUpdate:modelValue":i[10]||=e=>b.value=e,placeholder:`Item value...`,class:`h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none`,onKeydown:x(A,[`enter`])},null,544),[[S,b.value]]),g(`div`,Xe,[e(C,{icon:`carbon-close`,onClick:i[11]||=e=>f.value=!1},{default:d(()=>[...i[33]||=[a(` Cancel `,-1)]]),_:1}),e(C,{icon:`carbon:save`,n:`primary`,onClick:A},{default:d(()=>[...i[34]||=[a(` save `,-1)]]),_:1})])])]),_:1},8,[`modelValue`])):m(``,!0)],64)}}}),{__name:`AssetDetails`}),Qe={"h-full":``,"of-auto":``},$e={"flex-none":``,flex:`~ gap2 items-center`,"text-lg":``},et={flex:`~ items-center justify-center`,absolute:``,"bottom--1":``,"right--1":``,"h-4":``,"w-4":``,"rounded-full":``,"bg-primary:30":``,"text-8px":``},tt={flex:`~ col`,"w-30":``,"of-auto":``},nt={"text-xs":``,op75:``},rt={op50:``},it={key:0},at={"mt--4":``,px2:``,grid:`~ cols-minmax-8rem`},ot={key:1,p2:``,grid:`~ cols-minmax-8rem`},st={key:1},ct=o({__name:`assets`,setup(i){K({icon:`carbon-image-copy`,title:`Assets`,layout:`full`});let a=C(),o=t(!1),c=t(``),f=_(()=>new U(a.value||[],{keys:[`path`]})),b=j(()=>{let e=[];for(let t of a.value||[]){let n=t.path.split(`.`).pop();n&&!e.some(e=>e.name===n)&&e.push({name:n,value:!0})}return e}),x=_(()=>(c.value?f.value.search(c.value).map(e=>e.item):a.value||[]).filter(e=>{let t=e.path.split(`.`).pop();return!t||b.some(e=>e.name===t&&e.value)})),S=_(()=>{let e={};for(let t of x.value){let n=`${t.path.split(`/`).slice(0,-1).join(`/`)}/`;e[n]||(e[n]=[]),e[n].push(t)}return Object.entries(e).sort(([e],[t])=>e.localeCompare(t))}),w=_(()=>{let e={path:`public`,children:[]},t=(e,n,r)=>{let[i,...a]=n,o=e.children.find(e=>e.path===i);o||(o={...r,path:i,children:[]},e.children.push(o)),a.length>1?t(o,a,r):a.length===1&&o.children.push({...r,path:a[0]})};return x.value.forEach(n=>{let r=n.path.split(`/`).filter(e=>e!==``);t(e,r,n)}),e.children}),T=t(),{view:E}=L(`assets`);function D(){E.value=E.value===`list`?`grid`:`list`}k(`Escape`,()=>{T.value=void 0});let O=t();return(t,i)=>{let f=z,_=q,C=W,k=J,A=pe,j=Pe,M=ie,N=$,P=Ze,F=G,I=r(`tooltip`);return s(),u(`div`,Qe,[e(k,{ref_key:`navbar`,ref:O,search:c.value,"onUpdate:search":i[1]||=e=>c.value=e,pb2:``},{actions:d(()=>[g(`div`,$e,[p(e(f,{icon:`carbon:cloud-upload`,title:`File Upload`,border:!1,onClick:i[0]||=e=>o.value=!o.value},null,512),[[I,`File Upload`,void 0,{"bottom-end":!0}]]),n(b).length?(s(),h(C,{key:0,direction:`end`,n:`sm primary`},{trigger:d(({click:t})=>[p(e(f,{icon:`carbon-filter`,border:!1,title:`Filter`,p3:``,"text-lg":``,onClick:e=>t()},null,8,[`onClick`]),[[I,`Filter`,void 0,{"bottom-end":!0}]]),g(`span`,et,y(n(b).length),1)]),default:d(()=>[g(`div`,tt,[(s(!0),u(v,null,l(n(b),e=>(s(),h(_,{key:e.name,modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,flex:`~ gap-2`,rounded:``,px2:``,py2:``},{default:d(()=>[g(`span`,nt,y(e.name),1)]),_:2},1032,[`modelValue`,`onUpdate:modelValue`]))),128))])]),_:1})):m(``,!0),p(e(f,{"text-lg":``,border:!1,icon:n(E)===`grid`?`i-carbon-list`:`i-carbon-grid`,title:`Toggle view`,onClick:D},null,8,[`icon`]),[[I,`Toggle View`,void 0,{"bottom-end":!0}]])])]),default:d(()=>[g(`div`,rt,[c.value?(s(),u(`span`,it,y(x.value.length)+` matched · `,1)):m(``,!0),g(`span`,null,y(n(a)?.length)+` assets in total`,1)])]),_:1},8,[`search`]),e(A,{modelValue:o.value,"onUpdate:modelValue":i[2]||=e=>o.value=e,folder:`/`},null,8,[`modelValue`]),n(E)===`grid`?(s(),u(v,{key:0},[S.value.length>1?(s(!0),u(v,{key:0},l(S.value,([e,t])=>(s(),h(M,{key:e,text:e,description:`${t.length} items`,open:t.length<=n(50),padding:!1},{default:d(()=>[g(`div`,at,[(s(!0),u(v,null,l(t,t=>(s(),h(j,{key:t.path,asset:t,folder:e,onClick:e=>T.value=t},null,8,[`asset`,`folder`,`onClick`]))),128))])]),_:2},1032,[`text`,`description`,`open`]))),128)):(s(),u(`div`,ot,[(s(!0),u(v,null,l(x.value,e=>(s(),h(j,{key:e.path,asset:e,onClick:t=>T.value=e},null,8,[`asset`,`onClick`]))),128))]))],64)):(s(),u(`div`,st,[(s(!0),u(v,null,l(w.value,(e,t)=>(s(),h(N,{key:t,modelValue:T.value,"onUpdate:modelValue":i[3]||=e=>T.value=e,item:e},null,8,[`modelValue`,`item`]))),128))])),e(F,{"model-value":!!T.value,"auto-close":``,"w-120":``,top:O.value,onClose:i[5]||=e=>T.value=void 0},{default:d(()=>[T.value?(s(),h(P,{key:0,modelValue:T.value,"onUpdate:modelValue":i[4]||=e=>T.value=e},null,8,[`modelValue`])):m(``,!0)]),_:1},8,[`model-value`,`top`])])}}});export{ct as default};
@@ -1 +0,0 @@
1
- import{C as e,Ct as t,Mt as n,S as r,T as i,V as a,W as o,X as s,dt as c,h as l,m as u}from"./vendor/json-editor-vue-ajxjng9j.js";import{Ct as d,St as f}from"./ready-j6igpruf.js";import{c as p,d as m,f as h,h as g,u as _}from"./client-kw9rd8gy.js";import{t as v}from"./nbutton-n4jak7c4.js";import{t as y}from"./ncard-nwvxjytu.js";import{t as b}from"./npanel-grids-l34v8x7x.js";import{t as x}from"./ntext-input-m2w61kr5.js";var S={flex:`~ gap-3`,mt5:``,"justify-between":``},C={flex:`~ inline gap-2 items-center`},w={flex:`~ gap-2 items-end`},T=Object.assign(i({__name:`AuthRequiredPanel`,setup(i){a(async()=>{_.value||p.value&&await g.verifyAuthToken(p.value)&&(_.value=!0),_.value||m()});let T=t(``),E=t(!1);async function D(){let e=T.value.trim();E.value=!1,await g.verifyAuthToken(e).then(t=>{t?(_.value=!0,h(e)):E.value=!0})}return(t,i)=>{let a=x,p=v,m=y,h=b;return n(_)?s(t.$slots,`default`,{},void 0,void 0,1):(o(),l(h,{key:0},{default:c(()=>[e(m,{flex:`~ col gap-2`,mxa:``,p6:``},{default:c(()=>[i[3]||=u(`h3`,{class:`mb2 text-lg font-medium leading-6`,flex:`~ items-center gap-1`,"text-orange":``},[u(`span`,{class:`i-carbon-information-square`}),r(` Permissions required `)],-1),i[4]||=u(`p`,null,` This operation requires permissions for running command and access files from the browser. `,-1),i[5]||=u(`p`,null,[r(` A request is sent to the server.`),u(`br`),r(` Please check your terminal for the instructions and then come back. `)],-1),u(`div`,S,[u(`form`,{relative:``,flex:`~ col gap-2`,onSubmit:d(D,[`prevent`])},[i[1]||=u(`p`,{"text-xs":``,"op-50":``},` Or you can manually paste the token below: `,-1),u(`div`,C,[e(a,{modelValue:T.value,"onUpdate:modelValue":i[0]||=e=>T.value=e,placeholder:`Enter token here`,n:E.value?`red`:void 0,onKeydown:f(D,[`enter`])},null,8,[`modelValue`,`n`]),e(p,{n:`green`,"h-full":``,icon:`i-carbon-arrow-right`,onClick:D})])],32),u(`div`,w,[s(t.$slots,`actions`),e(p,{disabled:``,icon:`i-carbon-time`},{default:c(()=>[...i[2]||=[r(` Waiting for authorization... `,-1)]]),_:1})])])]),_:3})]),_:3}))}}}),{__name:`AuthRequiredPanel`});export{T as t};
@@ -1 +0,0 @@
1
- {"id":"58990d98-ceb3-4b7a-a3b9-ed05fcb0ebda","timestamp":1785826178033,"prerendered":[]}