@nuxt/devtools 1.0.1 → 1.0.3

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 (98) hide show
  1. package/dist/chunks/module-main.mjs +71 -42
  2. package/dist/chunks/timeline.mjs +6 -2
  3. package/dist/chunks/vscode.mjs +4 -4
  4. package/dist/client/200.html +35 -35
  5. package/dist/client/404.html +35 -35
  6. package/dist/client/_nuxt/{CodeDiff.vue.72250861.js → CodeDiff.vue.0700b533.js} +1 -1
  7. package/dist/client/_nuxt/{ComposableItem.vue.5fcac467.js → ComposableItem.vue.869f4305.js} +1 -1
  8. package/dist/client/_nuxt/{DataSchemaButton.vue.b4fc42f9.js → DataSchemaButton.vue.72b202db.js} +1 -1
  9. package/dist/client/_nuxt/{DataSchemaDrawer.ecd92b92.js → DataSchemaDrawer.3aeebd14.js} +3 -3
  10. package/dist/client/_nuxt/{DurationDisplay.vue.7b02ae9f.js → DurationDisplay.vue.37c54f2c.js} +1 -1
  11. package/dist/client/_nuxt/{FilepathItem.vue.6cdabcd4.js → FilepathItem.vue.ca308ea2.js} +1 -1
  12. package/dist/client/_nuxt/{HelpFab.vue.31b87f2a.js → HelpFab.vue.6bf23ece.js} +1 -1
  13. package/dist/client/_nuxt/LaunchPage.vue.c8e4a567.js +1 -0
  14. package/dist/client/_nuxt/{NBadge.681f2fb6.js → NBadge.0b42c7f8.js} +1 -1
  15. package/dist/client/_nuxt/{NCheckbox.vue.23790c32.js → NCheckbox.vue.6b5ce38f.js} +1 -1
  16. package/dist/client/_nuxt/{NCodeBlock.vue.7cb5f01d.js → NCodeBlock.vue.c80c8282.js} +1 -1
  17. package/dist/client/_nuxt/{NDrawer.vue.15b4d748.js → NDrawer.vue.e2617b9c.js} +1 -1
  18. package/dist/client/_nuxt/{NDropdown.vue.54157271.js → NDropdown.vue.ff9a8df2.js} +1 -1
  19. package/dist/client/_nuxt/{NIconTitle.vue.2d1e44fb.js → NIconTitle.vue.83cd82be.js} +1 -1
  20. package/dist/client/_nuxt/{NLink.vue.e913f358.js → NLink.vue.92e49c8b.js} +1 -1
  21. package/dist/client/_nuxt/{NMarkdown.vue.20899182.js → NMarkdown.vue.07fe8875.js} +1 -1
  22. package/dist/client/_nuxt/{NNavbar.vue.c506a970.js → NNavbar.vue.823096f1.js} +1 -1
  23. package/dist/client/_nuxt/{NSectionBlock.d66bb8c4.js → NSectionBlock.c3646235.js} +1 -1
  24. package/dist/client/_nuxt/{NSelect.vue.9e5ebac9.js → NSelect.vue.c8c511ae.js} +1 -1
  25. package/dist/client/_nuxt/{NSelectTabs.vue.9bf6517b.js → NSelectTabs.vue.ec21a846.js} +1 -1
  26. package/dist/client/_nuxt/{NSwitch.vue.2e265fe1.js → NSwitch.vue.1cea2bc6.js} +1 -1
  27. package/dist/client/_nuxt/{NTip.vue.51a4b91d.js → NTip.vue.ca2f8e8a.js} +1 -1
  28. package/dist/client/_nuxt/{StateEditor.vue.420289e1.js → StateEditor.vue.2abb9bb3.js} +1 -1
  29. package/dist/client/_nuxt/{__blank.95ba7574.js → __blank.aff34a18.js} +1 -1
  30. package/dist/client/_nuxt/analyze-build.76d0de73.js +1 -0
  31. package/dist/client/_nuxt/{assets.f0ad2218.js → assets.2cb4325d.js} +3 -3
  32. package/dist/client/_nuxt/builds/latest.json +1 -1
  33. package/dist/client/_nuxt/builds/meta/c6495541-4f21-430a-9b71-cda3f41cbf03.json +1 -0
  34. package/dist/client/_nuxt/{client.b2473ec3.js → client.b8ca1554.js} +1 -1
  35. package/dist/client/_nuxt/{components.dcc368d1.js → components.f8fde87c.js} +5 -5
  36. package/dist/client/_nuxt/{custom-_name_.129bf0b8.js → custom-_name_.779ca3e5.js} +1 -1
  37. package/dist/client/_nuxt/{default.b857d80c.js → default.50175b13.js} +1 -1
  38. package/dist/client/_nuxt/{entry.7cb87d02.js → entry.9a5af3dc.js} +8 -8
  39. package/dist/client/_nuxt/{error-404.6518563d.js → error-404.0dae1ccf.js} +1 -1
  40. package/dist/client/_nuxt/{error-500.94c551da.js → error-500.0a479375.js} +1 -1
  41. package/dist/client/_nuxt/{full.169e4977.js → full.f21cfe4d.js} +1 -1
  42. package/dist/client/_nuxt/{hooks.f1018405.js → hooks.08bf14b9.js} +1 -1
  43. package/dist/client/_nuxt/{imports.dda10442.js → imports.10f1634a.js} +1 -1
  44. package/dist/client/_nuxt/{index.02ce2a44.js → index.06e4cc9c.js} +1 -1
  45. package/dist/client/_nuxt/{index.05d4e5a2.js → index.b567c37e.js} +1 -1
  46. package/dist/client/_nuxt/{json-editor-vue.b5b3ad21.js → json-editor-vue.c3cbb111.js} +1 -1
  47. package/dist/client/_nuxt/{modules.25c79d85.js → modules.63cf2a03.js} +2 -2
  48. package/dist/client/_nuxt/{none.cebdb11e.js → none.7a39bbba.js} +1 -1
  49. package/dist/client/_nuxt/{open-graph.4871f819.js → open-graph.7c382b87.js} +2 -2
  50. package/dist/client/_nuxt/overview.ea00b3f6.js +1 -0
  51. package/dist/client/_nuxt/{pages.b6c85de5.js → pages.e4e22a03.js} +1 -1
  52. package/dist/client/_nuxt/{payload.5d97df2d.js → payload.d7e93a46.js} +1 -1
  53. package/dist/client/_nuxt/{plugins.f3bd0c25.js → plugins.b2f10668.js} +1 -1
  54. package/dist/client/_nuxt/{runtime-configs.92408de9.js → runtime-configs.9fe5125f.js} +1 -1
  55. package/dist/client/_nuxt/{server-routes.90d653e7.js → server-routes.95c3caa5.js} +2 -2
  56. package/dist/client/_nuxt/{settings.9790bb1a.js → settings.78f334a8.js} +1 -1
  57. package/dist/client/_nuxt/state-components.d81178a3.js +1 -0
  58. package/dist/client/_nuxt/{state-modules.c1654bb7.js → state-modules.b9e84f85.js} +1 -1
  59. package/dist/client/_nuxt/{storage-options.035e7403.js → storage-options.2b389201.js} +1 -1
  60. package/dist/client/_nuxt/storage.44a95fac.js +1 -0
  61. package/dist/client/_nuxt/{terminals.41bf8c60.js → terminals.539d48eb.js} +1 -1
  62. package/dist/client/_nuxt/timeline.5deddf7e.js +29 -0
  63. package/dist/client/_nuxt/unocss-runtime.dfaa24d0.js +2 -0
  64. package/dist/client/_nuxt/{virtual-files.7d0bcad0.js → virtual-files.46ad04c9.js} +1 -1
  65. package/dist/client/index.html +35 -35
  66. package/dist/module.json +1 -1
  67. package/dist/module.mjs +1 -1
  68. package/dist/runtime/plugins/view/FrameBox.vue +1 -1
  69. package/dist/runtime/plugins/view/client.mjs +3 -2
  70. package/dist/shared/{devtools.ca660ec5.mjs → devtools.6f6e0f47.mjs} +3 -6
  71. package/package.json +24 -24
  72. package/dist/client/__blank/index.html +0 -42
  73. package/dist/client/_nuxt/LaunchPage.vue.06fcb257.js +0 -1
  74. package/dist/client/_nuxt/analyze-build.5b09c13b.js +0 -1
  75. package/dist/client/_nuxt/builds/meta/10bb1edc-fde3-4c52-91c9-404c411ae86d.json +0 -1
  76. package/dist/client/_nuxt/overview.a8b5c91e.js +0 -1
  77. package/dist/client/_nuxt/state-components.ca15f9b7.js +0 -1
  78. package/dist/client/_nuxt/storage.c7339fe7.js +0 -1
  79. package/dist/client/_nuxt/timeline.ed636d87.js +0 -29
  80. package/dist/client/_nuxt/unocss-runtime.16c4cc56.js +0 -2
  81. package/dist/client/modules/analyze-build/index.html +0 -42
  82. package/dist/client/modules/assets/index.html +0 -42
  83. package/dist/client/modules/components/index.html +0 -42
  84. package/dist/client/modules/hooks/index.html +0 -42
  85. package/dist/client/modules/imports/index.html +0 -42
  86. package/dist/client/modules/modules/index.html +0 -42
  87. package/dist/client/modules/open-graph/index.html +0 -42
  88. package/dist/client/modules/overview/index.html +0 -42
  89. package/dist/client/modules/pages/index.html +0 -42
  90. package/dist/client/modules/payload/index.html +0 -42
  91. package/dist/client/modules/plugins/index.html +0 -42
  92. package/dist/client/modules/runtime-configs/index.html +0 -42
  93. package/dist/client/modules/server-routes/index.html +0 -42
  94. package/dist/client/modules/storage/index.html +0 -42
  95. package/dist/client/modules/terminals/index.html +0 -42
  96. package/dist/client/modules/timeline/index.html +0 -42
  97. package/dist/client/modules/virtual-files/index.html +0 -42
  98. package/dist/client/settings/index.html +0 -42
@@ -2,41 +2,41 @@
2
2
  <html >
3
3
  <head><meta charset="utf-8">
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1">
5
- <link rel="stylesheet" href="/__nuxt_devtools__/client/_nuxt/entry.aa8c94e8.css">
6
- <link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.7cb87d02.js">
7
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.02ce2a44.js">
8
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/onig.0c57a370.js">
9
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/vitesse-dark.ff0e7dcb.js">
10
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/vitesse-light.c6996724.js">
11
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/json.709f1c4d.js">
12
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/yaml.b29e536f.js">
13
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/css.f61fd02b.js">
14
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/javascript.b7d6d348.js">
15
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/typescript.24e7badf.js">
16
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/vue.7ad3b25a.js">
17
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/html.14085b69.js">
18
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/vue-html.88dda4a8.js">
19
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/diff.22e0b108.js">
20
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/shellscript.e25d1410.js">
21
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/default.b857d80c.js">
22
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/full.169e4977.js">
23
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/none.cebdb11e.js">
24
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/nuxt-docs.100caa70.js">
25
- <link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/NCodeBlock.6994516c.css">
26
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/DataSchemaDrawer.ecd92b92.js">
27
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NSelect.vue.9e5ebac9.js">
28
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NSwitch.vue.2e265fe1.js">
29
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NDropdown.vue.54157271.js">
30
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NCodeBlock.vue.7cb5f01d.js">
31
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/client.b2473ec3.js">
32
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NDrawer.vue.15b4d748.js">
33
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.16c4cc56.js">
34
- <link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/error-404.82ac0ec5.css">
35
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-404.6518563d.js">
36
- <link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/error-500.ff959f66.css">
37
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-500.94c551da.js">
38
- <script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.7cb87d02.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?f():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:f,addColorScheme:i,removeColorScheme:d};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function d(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function f(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
5
+ <link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.aa8c94e8.css">
6
+ <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.9a5af3dc.js">
7
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/index.06e4cc9c.js">
8
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/onig.0c57a370.js">
9
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vitesse-dark.ff0e7dcb.js">
10
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vitesse-light.c6996724.js">
11
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/json.709f1c4d.js">
12
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/yaml.b29e536f.js">
13
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/css.f61fd02b.js">
14
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/javascript.b7d6d348.js">
15
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/typescript.24e7badf.js">
16
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vue.7ad3b25a.js">
17
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/html.14085b69.js">
18
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vue-html.88dda4a8.js">
19
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/diff.22e0b108.js">
20
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/shellscript.e25d1410.js">
21
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default.50175b13.js">
22
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full.f21cfe4d.js">
23
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none.7a39bbba.js">
24
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-docs.100caa70.js">
25
+ <link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NCodeBlock.6994516c.css">
26
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/DataSchemaDrawer.3aeebd14.js">
27
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NSelect.vue.c8c511ae.js">
28
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NSwitch.vue.1cea2bc6.js">
29
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NDropdown.vue.ff9a8df2.js">
30
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NCodeBlock.vue.c80c8282.js">
31
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client.b8ca1554.js">
32
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NDrawer.vue.e2617b9c.js">
33
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime.dfaa24d0.js">
34
+ <link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.82ac0ec5.css">
35
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.0dae1ccf.js">
36
+ <link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.ff959f66.css">
37
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.0a479375.js">
38
+ <script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.9a5af3dc.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window&&window.localStorage&&window.localStorage.getItem&&window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?d():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:d,addColorScheme:i,removeColorScheme:f};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function f(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function d(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
39
39
  </script></head>
40
40
  <body ><div id="__nuxt"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4},{},false,{},{}]</script>
41
- <script>window.__NUXT__={};window.__NUXT__.config={public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"/__nuxt_devtools__/client",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body>
41
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body>
42
42
  </html>
package/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@nuxt/devtools",
3
3
  "configKey": "devtools",
4
- "version": "1.0.1"
4
+ "version": "1.0.3"
5
5
  }
package/dist/module.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import '@nuxt/kit';
2
- export { m as default } from './shared/devtools.ca660ec5.mjs';
2
+ export { m as default } from './shared/devtools.6f6e0f47.mjs';
3
3
  import './dirs.mjs';
4
4
  import 'node:path';
5
5
  import 'node:url';
@@ -10,7 +10,7 @@ const props = defineProps<{
10
10
  }>()
11
11
 
12
12
  const container = ref<HTMLElement>()
13
- const isResizing = ref<false | { top?: boolean; left?: boolean; right?: boolean; bottom?: boolean }>(false)
13
+ const isResizing = ref<false | { top?: boolean, left?: boolean, right?: boolean, bottom?: boolean }>(false)
14
14
 
15
15
  watchEffect(() => {
16
16
  if (!container.value)
@@ -4,7 +4,7 @@ import { debounce } from "perfect-debounce";
4
4
  import { initTimelineMetrics } from "../../function-metrics-helpers.mjs";
5
5
  import Main from "./Main.vue";
6
6
  import { popupWindow, state } from "./state.mjs";
7
- import { useAppConfig } from "#imports";
7
+ import { useAppConfig, useRuntimeConfig } from "#imports";
8
8
  const clientRef = shallowRef();
9
9
  export { clientRef as client };
10
10
  export async function setupDevToolsClient({
@@ -93,7 +93,8 @@ export async function setupDevToolsClient({
93
93
  }
94
94
  function getIframe() {
95
95
  if (!iframe) {
96
- const CLIENT_PATH = "/__nuxt_devtools__/client";
96
+ const runtimeConfig = useRuntimeConfig();
97
+ const CLIENT_PATH = `${runtimeConfig.app.baseURL}/__nuxt_devtools__/client`.replace(/\/+/g, "/");
97
98
  const initialUrl = CLIENT_PATH + state.value.route;
98
99
  try {
99
100
  iframe = document.createElement("iframe");
@@ -3,11 +3,6 @@ import { isGlobalInstall } from '../dirs.mjs';
3
3
 
4
4
  const r=Object.create(null),t=e=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?r:globalThis),s=new Proxy(r,{get(e,o){return t()[o]??r[o]},has(e,o){const i=t();return o in i||o in r},set(e,o,i){const p=t(!0);return p[o]=i,!0},deleteProperty(e,o){if(!o)return !1;const i=t(!0);return delete i[o],!0},ownKeys(){const e=t(!0);return Object.keys(e)}}),E=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",d=[["APPVEYOR"],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"]];function B(){if(globalThis.process?.env)for(const e of d){const o=e[1]||e[0];if(globalThis.process?.env[o])return {name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}const I=B(),U=I.name;function n(e){return e?e!=="false":!1}const l=globalThis.process?.platform||"",T=n(s.CI)||I.ci!==!1,a=n(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);n(s.DEBUG);const c=E==="test"||n(s.TEST);n(s.MINIMAL)||T||c||!a;const C=/^win/i.test(l);!n(s.NO_COLOR)&&(n(s.FORCE_COLOR)||C&&s.TERM!=="dumb"||a&&s.TERM&&s.TERM==="dumb"||T);const R=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(R?.split(".")[0])||null;const Y=globalThis.process||Object.create(null),L={versions:{}};new Proxy(Y,{get(e,o){if(o==="env")return s;if(o in e)return e[o];if(o in L)return L[o]}});const _=!!globalThis.Netlify,O=!!globalThis.EdgeRuntime,D=globalThis.navigator?.userAgent==="Cloudflare-Workers",A=!!globalThis.Deno,u=!!globalThis.__lagon__,N=globalThis.process?.release?.name==="node",S=!!globalThis.Bun||!!globalThis.process?.versions?.bun,b=!!globalThis.fastly,K=[[_,"netlify"],[O,"edge-light"],[D,"workerd"],[A,"deno"],[u,"lagon"],[N,"node"],[S,"bun"],[b,"fastly"]];function F(){const e=K.find(o=>o[0]);if(e)return {name:e[1]}}const g=F();g?.name||"";
5
5
 
6
- const ROUTE_PATH = "/__nuxt_devtools__";
7
- const ROUTE_CLIENT = `${ROUTE_PATH}/client`;
8
- const ROUTE_AUTH = `${ROUTE_PATH}/auth`;
9
- const ROUTE_AUTH_VERIFY = `${ROUTE_PATH}/auth-verify`;
10
- const ROUTE_ANALYZE = `${ROUTE_PATH}/analyze`;
11
6
  const WS_EVENT_NAME = "nuxt:devtools:rpc";
12
7
  const isSandboxed = U === "stackblitz" || U === "codesandbox";
13
8
  const defaultOptions = {
@@ -98,6 +93,8 @@ const module = defineNuxtModule({
98
93
  },
99
94
  defaults: defaultOptions,
100
95
  setup(options, nuxt) {
96
+ if (process.env.VITEST || process.env.TEST)
97
+ return;
101
98
  if (typeof options === "boolean")
102
99
  options = { enabled: options };
103
100
  if (options.enabled === false)
@@ -111,4 +108,4 @@ const module = defineNuxtModule({
111
108
  }
112
109
  });
113
110
 
114
- export { ROUTE_AUTH as R, WS_EVENT_NAME as W, defaultTabOptions as a, ROUTE_ANALYZE as b, ROUTE_CLIENT as c, defaultAllowedExtensions as d, ROUTE_AUTH_VERIFY as e, module as m };
111
+ export { WS_EVENT_NAME as W, defaultTabOptions as a, defaultAllowedExtensions as d, module as m };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/devtools",
3
3
  "type": "module",
4
- "version": "1.0.1",
4
+ "version": "1.0.3",
5
5
  "license": "MIT",
6
6
  "homepage": "https://devtools.nuxt.com",
7
7
  "repository": {
@@ -30,7 +30,7 @@
30
30
  "dist"
31
31
  ],
32
32
  "peerDependencies": {
33
- "nuxt": "^3.7.4",
33
+ "nuxt": "^3.8.1",
34
34
  "vite": "*"
35
35
  },
36
36
  "dependencies": {
@@ -44,13 +44,13 @@
44
44
  "fast-glob": "^3.3.2",
45
45
  "flatted": "^3.2.9",
46
46
  "get-port-please": "^3.1.1",
47
- "h3": "^1.8.2",
47
+ "h3": "^1.9.0",
48
48
  "hookable": "^5.5.3",
49
49
  "image-meta": "^0.2.0",
50
50
  "is-installed-globally": "^1.0.0",
51
51
  "launch-editor": "^2.6.1",
52
52
  "local-pkg": "^0.5.0",
53
- "magicast": "^0.3.1",
53
+ "magicast": "^0.3.2",
54
54
  "nitropack": "^2.7.2",
55
55
  "nypm": "^0.3.3",
56
56
  "ofetch": "^1.3.3",
@@ -60,36 +60,36 @@
60
60
  "perfect-debounce": "^1.0.0",
61
61
  "pkg-types": "^1.0.3",
62
62
  "rc9": "^2.1.1",
63
- "scule": "^1.0.0",
63
+ "scule": "^1.1.0",
64
64
  "semver": "^7.5.4",
65
- "simple-git": "^3.20.0",
65
+ "simple-git": "^3.21.0",
66
66
  "sirv": "^2.0.3",
67
67
  "unimport": "^3.5.0",
68
68
  "vite-plugin-inspect": "^0.7.42",
69
69
  "vite-plugin-vue-inspector": "^4.0.0",
70
70
  "which": "^3.0.1",
71
71
  "ws": "^8.14.2",
72
- "@nuxt/devtools-kit": "1.0.1",
73
- "@nuxt/devtools-wizard": "1.0.1"
72
+ "@nuxt/devtools-kit": "1.0.3",
73
+ "@nuxt/devtools-wizard": "1.0.3"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@iconify-json/bxl": "^1.1.7",
77
77
  "@iconify-json/carbon": "^1.1.21",
78
- "@iconify-json/logos": "^1.1.37",
78
+ "@iconify-json/logos": "^1.1.38",
79
79
  "@iconify-json/ri": "^1.1.12",
80
- "@iconify-json/simple-icons": "^1.1.77",
81
- "@iconify-json/tabler": "^1.1.96",
80
+ "@iconify-json/simple-icons": "^1.1.79",
81
+ "@iconify-json/tabler": "^1.1.97",
82
82
  "@nuxt/content": "^2.9.0",
83
- "@nuxtjs/color-mode": "^3.3.0",
83
+ "@nuxtjs/color-mode": "^3.3.2",
84
84
  "@parcel/watcher": "^2.3.0",
85
85
  "@types/markdown-it-link-attributes": "^3.0.4",
86
86
  "@types/ua-parser-js": "^0.7.39",
87
- "@unocss/nuxt": "^0.57.3",
88
- "@unocss/preset-icons": "^0.57.3",
89
- "@unocss/preset-uno": "^0.57.3",
90
- "@unocss/runtime": "^0.57.3",
91
- "@vueuse/nuxt": "^10.6.0",
92
- "esno": "^0.17.0",
87
+ "@unocss/nuxt": "^0.57.6",
88
+ "@unocss/preset-icons": "^0.57.6",
89
+ "@unocss/preset-uno": "^0.57.6",
90
+ "@unocss/runtime": "^0.57.6",
91
+ "@vueuse/nuxt": "^10.6.1",
92
+ "esno": "^4.0.0",
93
93
  "floating-vue": "2.0.0-beta.24",
94
94
  "fuse.js": "^7.0.0",
95
95
  "json-editor-vue": "^0.11.0",
@@ -98,20 +98,20 @@
98
98
  "nanoid": "^5.0.3",
99
99
  "nuxt": "^3.8.1",
100
100
  "nuxt-vitest": "^0.11.3",
101
- "quicktype-core": "^23.0.77",
102
- "shikiji": "^0.6.12",
101
+ "quicktype-core": "^23.0.79",
102
+ "shikiji": "^0.6.13",
103
103
  "theme-vitesse": "^0.7.3",
104
104
  "ua-parser-js": "^1.0.37",
105
- "unocss": "^0.57.3",
106
- "unplugin-vue-markdown": "^0.25.0",
107
- "vanilla-jsoneditor": "^0.18.12",
105
+ "unocss": "^0.57.6",
106
+ "unplugin-vue-markdown": "^0.25.2",
107
+ "vanilla-jsoneditor": "^0.18.13",
108
108
  "vis-data": "^7.1.8",
109
109
  "vis-network": "^9.1.9",
110
110
  "vue-tsc": "^1.8.22",
111
111
  "vue-virtual-scroller": "2.0.0-beta.8",
112
112
  "xterm": "^5.3.0",
113
113
  "xterm-addon-fit": "^0.8.0",
114
- "@nuxt/devtools": "1.0.1"
114
+ "@nuxt/devtools": "1.0.3"
115
115
  },
116
116
  "scripts": {
117
117
  "build": "pnpm dev:prepare && pnpm build:module && pnpm build:client && esno scripts/prepare.ts",
@@ -1,42 +0,0 @@
1
- <!DOCTYPE html>
2
- <html >
3
- <head><meta charset="utf-8">
4
- <meta name="viewport" content="width=device-width, initial-scale=1">
5
- <link rel="stylesheet" href="/__nuxt_devtools__/client/_nuxt/entry.aa8c94e8.css">
6
- <link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.7cb87d02.js">
7
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.02ce2a44.js">
8
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/onig.0c57a370.js">
9
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/vitesse-dark.ff0e7dcb.js">
10
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/vitesse-light.c6996724.js">
11
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/json.709f1c4d.js">
12
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/yaml.b29e536f.js">
13
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/css.f61fd02b.js">
14
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/javascript.b7d6d348.js">
15
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/typescript.24e7badf.js">
16
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/vue.7ad3b25a.js">
17
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/html.14085b69.js">
18
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/vue-html.88dda4a8.js">
19
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/diff.22e0b108.js">
20
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/shellscript.e25d1410.js">
21
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/default.b857d80c.js">
22
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/full.169e4977.js">
23
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/none.cebdb11e.js">
24
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/nuxt-docs.100caa70.js">
25
- <link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/NCodeBlock.6994516c.css">
26
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/DataSchemaDrawer.ecd92b92.js">
27
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NSelect.vue.9e5ebac9.js">
28
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NSwitch.vue.2e265fe1.js">
29
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NDropdown.vue.54157271.js">
30
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NCodeBlock.vue.7cb5f01d.js">
31
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/client.b2473ec3.js">
32
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NDrawer.vue.15b4d748.js">
33
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.16c4cc56.js">
34
- <link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/error-404.82ac0ec5.css">
35
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-404.6518563d.js">
36
- <link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/error-500.ff959f66.css">
37
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-500.94c551da.js">
38
- <script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.7cb87d02.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?f():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:f,addColorScheme:i,removeColorScheme:d};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function d(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function f(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
39
- </script></head>
40
- <body ><div id="__nuxt"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4},{},false,{},{}]</script>
41
- <script>window.__NUXT__={};window.__NUXT__.config={public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"/__nuxt_devtools__/client",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body>
42
- </html>
@@ -1 +0,0 @@
1
- import{d as w,h as a,j as o,A as y,o as t,i as r,k as i,t as m,p as l,m as C,n as B,ar as $,v,F as V,U as P,bE as E,a4 as F,_ as I,am as L}from"./entry.7cb87d02.js";import{_ as T}from"./NMarkdown.vue.20899182.js";const j={"text-xl":""},A={flex:"~ gap2 wrap"},S=w({__name:"LaunchPage",props:{name:{},icon:{},title:{},description:{},actions:{}},emits:["action"],setup(_,{emit:p}){const d=_,u=p;function f(e,s){P("launch-page",{pageName:d.name}),e.handle?.(),u("action",s)}return(e,s)=>{const k=E,g=T,h=F,b=I,N=L,x=y;return t(),a(x,null,{default:o(()=>[r(N,{flex:"~ col gap2",mxa:"","min-w-100":"","items-center":"",p6:""},{default:o(()=>[r(k,{mb2:"","text-5xl":"",icon:e.icon||e.icon,title:e.title},null,8,["icon","title"]),i("h1",j,m(e.title),1),e.description?(t(),a(g,{key:0,mb2:"","mt--1":"","text-center":"","text-base":"",op50:"",markdown:e.description},null,8,["markdown"])):l("",!0),i("div",A,[(t(!0),C(V,null,B(e.actions,(n,c)=>(t(),a(b,$({key:c,n:"solid primary",disabled:n.pending,to:n.src,target:n.src?"_blank":void 0},n.attrs,{onClick:D=>f(n,c)}),{default:o(()=>[n.pending?(t(),a(h,{key:0,icon:"carbon-circle-dash","animate-spin":""})):l("",!0),v(" "+m(n.label),1)]),_:2},1040,["disabled","to","target","onClick"]))),128))])]),_:1})]),_:1})}}});export{S as _};
@@ -1 +0,0 @@
1
- import{d as R,a as V,r as S,o,m as i,k as e,F as c,n as E,G as F,f as n,t as m,p as b,H as G,i as r,j as a,v as _,I as A,J as D,K as P,L as U,_ as L,M as q,N as ee,O as te,P as ne,Q as oe,R as le,S as ie,U as se,V as k,h as w,l as j,W as ae,X as re,A as ue}from"./entry.7cb87d02.js";import{_ as de}from"./FilepathItem.vue.6cdabcd4.js";import{_ as ce}from"./NTip.vue.51a4b91d.js";import{_ as me}from"./NCodeBlock.vue.7cb5f01d.js";import{_ as _e}from"./NCheckbox.vue.23790c32.js";import{_ as pe}from"./HelpFab.vue.31b87f2a.js";import"./client.b2473ec3.js";const fe={"h-full":"",grid:"~ rows-[max-content_1fr]"},ve={flex:"~ wrap","w-full":""},he=["onClick"],ye=e("div",{border:"b base","flex-auto":""},null,-1),be={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},$e=e("div",{"flex-auto":""},null,-1),xe={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},ge=e("div",{"i-carbon-commit":"","text-xl":""},null,-1),we=e("div",{"text-sm":"",op50:""}," Name ",-1),ze=e("div",{"i-carbon-time":"","text-xl":""},null,-1),Be=e("div",{"text-sm":"",op50:""}," Build duration ",-1),ke=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1),Ce=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1),Ne=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1),Te=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1),Ae=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1),De=e("div",{"text-sm":"",op50:""}," Built ",-1),Ie=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1),Ve=e("div",{"text-sm":"",op50:""}," Report Path ",-1),Se=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=S(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 P.clearAnalyzeBuilds(await U(),[t])}return(t,u)=>{const z=de,N=L;return o(),i("div",fe,[e("div",ve,[(o(!0),i(c,null,E(n(f),(v,T)=>(o(),i("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:F(v.id===n(l).id?"":"border-b"),onClick:d=>l.value=v},[e("div",{class:F(v.id===n(l).id?"":"op30")},m(v.name),3)],10,he))),128)),ye]),n(l).id==="overview"?(o(),i("div",be,[$e,e("div",xe,[ge,e("div",null,[we,e("div",null,m(t.current.name),1)]),ze,e("div",null,[Be,e("div",null,m(g(t.current)),1)]),t.current.size?.clientBundle?(o(),i(c,{key:0},[ke,e("div",null,[Ce,e("div",null,m($(t.current.size.clientBundle)),1)])],64)):b("",!0),t.current.size.nitroBundle?(o(),i(c,{key:1},[Ne,e("div",null,[Te,e("div",null,m($(t.current.size.nitroBundle)),1)])],64)):b("",!0),Ae,e("div",null,[De,e("div",null,m(n(G)(new Date(t.current.endTime))),1)]),Ie,e("div",null,[Ve,r(z,{filepath:t.current.analyzeDir},null,8,["filepath"])])]),Se,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)])}}}),Pe={class:"markdown-body"},je=e("h1",null,"Build Analyze",-1),Re=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),Ee=[je,Re],Ge={__name:"analyze-build",setup(C,{expose:p}){return p({frontmatter:{}}),(l,$)=>(o(),i("div",Pe,Ee))}},Ue={flex:"~ col"},Le=["onClick"],Oe={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),We={flex:"~ items-center justify-center wrap",p4:""},Je={flex:"~ col gap-1","w-250":"",p4:""},Qe=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1),Xe=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":""},at=R({__name:"analyze-build",setup(C){const p=q(),f=ee(),l=te(),$=ne("analyze-build:slug",""),g=V(()=>f.value?.builds.find(d=>d.slug===$.value)??f.value?.builds[0]),x=S(!1),t=S(""),u=V(()=>f.value?.builds.some(d=>d.name===t.value.trim()));async function z(){t.value=await P.generateAnalyzeBuildName(),await p.start()&&(se("analyze-build:start"),k.value={name:t.value,processId:await P.startAnalyzeBuild(await U(),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=L,O=Fe,H=ue,K=ie,M=ae,W=ce,J=me,Q=_e,X=re,Y=Ge,Z=pe;return o(),i(c,null,[r(K,{"left-size":30},{left:a(()=>[e("div",Ue,[(o(!0),i(c,null,E(n(f)?.builds,s=>(o(),i(c,{key:s.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:F(s.slug===n(g)?.slug?"text-primary bg-active":""),onClick:y=>$.value=s.slug},[e("code",null,m(s.name),1),e("div",Oe,[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",We,[("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(O,{key:0,current:n(g)},null,8,["current"])):(o(),w(H,{key:1}))]),_:1}),r(n(p),null,{default:a(({resolve:s})=>[r(X,{"model-value":!0,onClose:y=>s(!1)},{default:a(()=>[e("div",Je,[Qe,Xe,r(M,{modelValue:n(t),"onUpdate:modelValue":h[2]||(h[2]=y=>j(t)?t.value=y:null),placeholder:"Build name"},null,8,["modelValue"]),n(u)?(o(),w(W,{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(Q,{modelValue:n(x),"onUpdate:modelValue":h[3]||(h[3]=y=>j(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(Z,null,{default:a(()=>[r(Y)]),_:1})],64)}}});export{at as default};
@@ -1 +0,0 @@
1
- {"id":"10bb1edc-fde3-4c52-91c9-404c411ae86d","timestamp":1699561981578,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
@@ -1 +0,0 @@
1
- import{d as L,as as V,aa as R,aH as T,b3 as M,b4 as O,O as E,a as w,h as m,j as n,A as P,o as s,f as e,m as c,k as t,i,t as r,p as l,F as h,b5 as f,b6 as x,b7 as $,v as a,aC as F,D as H,L as W,E as G,x as K,_ as U}from"./entry.7cb87d02.js";import{u as q,_ as J}from"./state-modules.c1654bb7.js";import{_ as Q}from"./NTip.vue.51a4b91d.js";import{u as X}from"./state-components.ca15f9b7.js";import"./NBadge.681f2fb6.js";import"./NCodeBlock.vue.7cb5f01d.js";import"./client.b2473ec3.js";import"./NCheckbox.vue.23790c32.js";const Y="1.0.1",Z={key:0},tt={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p5:"",px5:"","md:px20":""},et=t("div",{"flex-auto":""},null,-1),ot={flex:"~ col","mt-5":"","items-center":"","md:mt-20":""},nt=t("span",{op40:""}," Nuxt DevTools ",-1),st={op40:""},at={flex:"~ gap2 wrap"},it=t("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1),lt=t("div",{"logos-vue":"","text-3xl":""},null,-1),ut=t("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1),rt=t("div",{"i-carbon-assembly-cluster":"","text-3xl":""},null,-1),dt=t("div",{"carbon-function":"","text-3xl":""},null,-1),ct=t("div",{"carbon-3d-mpr-toggle":"","text-3xl":""},null,-1),pt=t("div",{"carbon-plug":"","text-3xl":""},null,-1),_t={key:5,"pointer-events-none":"","min-w-40":"",p4:"","theme-card-lime":"",flex:"~ auto gap-6"},mt=t("div",{"i-carbon-time-plot":"","flex-none":"","text-3xl":""},null,-1),ht={grid:"~ cols-[auto_auto] gap-x-5 items-center"},ft=t("div",{"text-sm":""}," SSR to full load ",-1),xt={"text-right":""},vt=t("div",{"text-sm":""}," Page load ",-1),gt={"text-right":""},kt=t("div",{"text-sm":""}," Navigation ",-1),bt={"text-right":""},yt=t("div",{"text-sm":""}," HMR ",-1),Ct={"text-right":""},wt={flex:"~ col gap2"},Dt={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},Bt=t("a",{href:"https://github.com/nuxt/devtools",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-blue",transition:""},[t("div",{"i-carbon-star":""}),a(" Star on GitHub ")],-1),St=t("a",{href:"https://github.com/nuxt/devtools/discussions/29",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-yellow",transition:""},[t("div",{"i-carbon-data-enrichment":""}),a(" Ideas & Suggestions ")],-1),zt=t("a",{href:"https://github.com/nuxt/devtools/discussions/31",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-lime",transition:""},[t("div",{"i-carbon-plan":""}),a(" Project Roadmap ")],-1),Nt=t("a",{href:"https://github.com/nuxt/devtools/issues",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-rose",transition:""},[t("div",{"i-carbon-debug":""}),a(" Bug Reports ")],-1),At=t("div",{"i-carbon-settings-adjust":""},null,-1),jt=t("div",{"flex-auto":""},null,-1),It={flex:"col gap-2",mxa:"",hidden:"","w-100":"","text-sm":"",op50:"","md:flex":""},Lt={flex:"~ gap-1","items-center":""},Vt=t("span",null,"+",-1),Rt=t("span",null,"+",-1),Tt=t("div",{"flex-auto":""},null,-1),Mt={flex:"~ gap-1","items-center":""},Ot=t("span",null,"+",-1),Et=t("span",null,"+",-1),Pt=t("span",null,"+",-1),$t=t("span",null,"+",-1),Ft=t("div",{"flex-auto":""},null,-1),Ht=t("div",null,"Toggle DevTools",-1),te=L({__name:"overview",setup(Wt){const v=V(),p=R(),D=X(),g=T(),B=q(),S=M(),k=O(),z=E();function N(){H.value=!0,z.push("/")}const b=w(()=>v.value?.nuxt.vueApp.version),u=w(()=>v.value?.metrics.loading());function A(){W()}return(o,Gt)=>{const j=G,_=K,y=J,C=Q,d=U,I=P;return s(),m(I,{"h-screen":"","w-full":"",flex:""},{default:n(()=>[e(p)?(s(),c("div",tt,[et,t("div",ot,[i(_,{flex:"~","mt--10":"","items-center":"","justify-center":"",to:"https://devtools.nuxt.com/",target:"_blank"},{default:n(()=>[i(j,{"h-10":""})]),_:1}),t("button",{mb6:"",mt3:"","text-center":"","text-sm":"",flex:"~ gap-1 wrap",onClick:N},[nt,t("code",st,"v"+r(e(Y)),1),i(y,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),t("div",at,[i(_,{to:"https://nuxt.com",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[it,i(y,{"package-name":"nuxt",options:{dev:!0}})]),_:1}),e(b)?(s(),m(_,{key:0,to:"https://vuejs.org",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[lt,t("code",null,"v"+r(e(b)),1)]),_:1})):l("",!0),e(p)?(s(),c(h,{key:1},[e(p)&&e(p).pages&&e(v)?(s(),m(_,{key:0,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/pages"},{default:n(()=>[ut,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(S).length,"page")),1)]),_:1})):l("",!0),e(p)?(s(),m(_,{key:1,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/components"},{default:n(()=>[rt,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(D).length,"component")),1)]),_:1})):l("",!0),e(p)&&e(g)?(s(),m(_,{key:2,"min-w-40":"",p4:"","theme-card-yellow":"",flex:"~ col auto",to:"/modules/imports"},{default:n(()=>[dt,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(g).imports.length,"import")),1)]),_:1})):l("",!0),e(p)?(s(),m(_,{key:3,"min-w-40":"",p4:"","theme-card-purple":"",flex:"~ col auto",to:"/modules/modules"},{default:n(()=>[ct,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(B).length,"module")),1)]),_:1})):l("",!0),e(p)?(s(),m(_,{key:4,"min-w-40":"",p4:"","theme-card-teal":"",flex:"~ col auto",to:"/modules/plugins"},{default:n(()=>[pt,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(p).plugins.length,"plugin")),1)]),_:1})):l("",!0),e(u)?(s(),c("div",_t,[mt,t("div",ht,[e(u).ssrStart?(s(),c(h,{key:0},[ft,t("div",xt,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).appLoad-e(u).ssrStart)),1)],64)):l("",!0),vt,t("div",gt,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).appLoad-e(u).appInit)),1),kt,t("div",bt,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).pageEnd-e(u).pageStart)),1),e(u).hmrStart?(s(),c(h,{key:1},[yt,t("div",Ct,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).hmrEnd-e(u).hmrStart)),1)],64)):l("",!0)])])):l("",!0)],64)):l("",!0)]),t("div",wt,[("showConnectionWarning"in o?o.showConnectionWarning:e($))?(s(),m(C,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:n(()=>[a(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ")]),_:1})):l("",!0),t("button",{title:"Authorize",onClick:A},[("isDevAuthed"in o?o.isDevAuthed:e(F))?l("",!0):(s(),m(C,{key:0,n:"orange5",icon:"i-carbon-locked","justify-center":""},{default:n(()=>[a(" Access from an untrusted browser, some features are limited. Click to authorize now. ")]),_:1}))])]),t("div",Dt,[Bt,St,zt,Nt,i(_,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:n(()=>[At,a(" Settings ")]),_:1})]),jt,t("div",It,[t("div",Lt,[e(k)?(s(),c(h,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" ⌘ Cmd ")]),_:1}),Vt,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" K ")]),_:1})],64)):(s(),c(h,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" Ctrl ")]),_:1}),Rt,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" K ")]),_:1})],64)),Tt,a(" Open Command Palette ")]),t("div",Mt,[e(k)?(s(),c(h,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" ⇧ Shift ")]),_:1}),Ot,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" ⌥ Option ")]),_:1}),Et,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" D ")]),_:1})],64)):(s(),c(h,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" Shift ")]),_:1}),Pt,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" Alt ")]),_:1}),$t,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" D ")]),_:1})],64)),Ft,Ht])])])):(s(),c("div",Z," Loading... "))]),_:1})}}});export{te as default};
@@ -1 +0,0 @@
1
- import{as as m,b8 as n,a as s,K as o}from"./entry.7cb87d02.js";function u(){const p=m(),t=n("getComponents",()=>o.getComponents()),l=s(()=>Object.entries(p.value?.nuxt?.vueApp._context.components||{}).map(([e])=>({pascalName:e,global:!0})).filter(e=>!/^Lazy[A-Z]/.test(e.pascalName)).filter(e=>!(t.value||[]).find(a=>a.pascalName===e.pascalName)));return s(()=>[...l.value,...t.value||[]].sort((e,a)=>e.pascalName.localeCompare(a.pascalName)))}function r(){return n("getComponentsRelationships",()=>o.getComponentsRelationships())}export{r as a,u};
@@ -1 +0,0 @@
1
- import{d as G,O as ne,r as D,P as E,bx as T,ay as ae,w as oe,ax as se,Z as le,a as re,K as f,L as k,f as t,o as l,h as m,j as u,k as r,i as c,l as A,m as i,F as w,n as U,t as b,G as z,ac as L,v as d,p as F,ar as ue,I as ie,bd as de,ad as ce,by as pe,bz as R,_ as me,W as _e,a4 as fe,am as ve,A as ye,S as ge,aE as he}from"./entry.7cb87d02.js";import{_ as ke}from"./NSelect.vue.9e5ebac9.js";import{_ as be}from"./NLink.vue.e913f358.js";import{_ as xe}from"./FilepathItem.vue.6cdabcd4.js";import{t as we}from"./json-editor-vue.b5b3ad21.js";const Ce={class:"h-[48px] flex items-center justify-between gap1 px-3"},Ke={class:"w-full text-sm"},Se=["value"],Ve=["onClick"],$e=r("div",{"x-divider":""},null,-1),Ne={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Ie={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},je={class:"flex items-center gap-4"},De={key:1},Ae=["onKeyup"],Ue=r("br",null,null,-1),Le={key:0,op50:""},Me={key:1},Be=r("code",null,"nitro.storage",-1),Pe=r("br",null,null,-1),qe={"font-bold":""},Ee=r("br",null,null,-1),Te={"text-sm":""},ze=r("br",null,null,-1),Fe=G({__name:"StorageDetails",async setup(O){let p,g;const C=pe(),h=ne(),x=D(""),v=D(""),s=E("storage:current",""),e=D(),y=E("storage:file:state",""),{data:K}=([p,g]=T(()=>R("storageMounts",()=>f.getStorageMounts())),p=await p,g(),p),{data:S,refresh:M}=([p,g]=T(async()=>R("storageKeys",async()=>s.value?await f.getStorageKeys(s.value):[])),p=await p,g(),p),W=C.hook("storage:key:update",async(n,a)=>{if(!(!s.value||n.split(":")[0]!==s.value)&&(await M(),y.value===n)){if(a==="remove")return h.replace({query:{storage:s.value}});await $(y.value)}});ae(W),oe(s,()=>{M(),y.value=""}),se(async()=>{if(!y.value){e.value=null;return}$(y.value)}),le("keydown",n=>{n.key==="s"&&(n.ctrlKey||n.metaKey)&&(N(),n.preventDefault())});function V(n){return n.replace(`${s.value}:`,"")}const Z=re(()=>S.value?S.value.filter(n=>n.includes(x.value)):[]);async function $(n){const a=await f.getStorageItem(await k(),n);e.value={key:n,updatedKey:V(n),editingKey:!1,content:a,updatedContent:a}}async function H(){if(!v.value||!s.value)return;const n=`${s.value}:${v.value}`;S.value?.includes(n)||await f.setStorageItem(await k(),n,""),h.replace({query:{storage:s.value,key:n}}),v.value=""}async function N(){e.value&&(await f.setStorageItem(await k(),e.value.key,e.value.updatedContent),await $(e.value.key))}async function J(){!e.value||!s.value||(await f.removeStorageItem(await k(),e.value.key),e.value=null)}async function Q(){if(!e.value||!s.value)return;const n=`${s.value}:${e.value.updatedKey}`,a=await k();await f.setStorageItem(a,n,e.value.updatedContent),await f.removeStorageItem(a,e.value.key),h.replace({query:{storage:s.value,key:n}})}return(n,a)=>{const I=me,X=ke,j=_e,Y=fe,B=be,P=ve,q=ye,ee=ge,te=xe;return t(s)?(l(),m(ee,{key:0,"storage-key":"tab-storage"},{left:u(()=>[r("div",Ce,[c(I,{icon:"carbon-chevron-left","ml--1":"",border:!1,onClick:a[0]||(a[0]=o=>s.value="")}),r("div",Ke,[c(X,{modelValue:t(s),"onUpdate:modelValue":a[1]||(a[1]=o=>A(s)?s.value=o:null),n:"primary",icon:"carbon-data-base"},{default:u(()=>[(l(!0),i(w,null,U(t(K),(o,_)=>(l(),i("option",{key:_,value:_},b(_),9,Se))),128))]),_:1},8,["modelValue"])])]),c(j,{modelValue:t(x),"onUpdate:modelValue":a[2]||(a[2]=o=>A(x)?x.value=o:null),icon:"carbon-search",placeholder:"Search...",n:"primary sm",border:"y x-none base! rounded-0",class:"w-full py2 ring-0!"},null,8,["modelValue"]),(l(!0),i(w,null,U(t(Z),o=>(l(),i(w,{key:o},[r("button",{block:"","w-full":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:z(o===t(e)?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:_=>y.value=o},b(V(o)),11,Ve),$e],64))),128)),c(j,{modelValue:t(v),"onUpdate:modelValue":a[3]||(a[3]=o=>A(v)?v.value=o:null),icon:"carbon-add",placeholder:"key",n:"sm",border:"t-none x-none base! rounded-0",class:"w-full py2 font-mono ring-0!",onKeyup:L(H,["enter"])},null,8,["modelValue","onKeyup"])]),right:u(()=>[t(e)?.key?(l(),i("div",Ne,[r("div",Ie,[r("div",je,[t(e).editingKey?(l(),m(j,{key:0,modelValue:t(e).updatedKey,"onUpdate:modelValue":a[4]||(a[4]=o=>t(e).updatedKey=o),onKeyup:L(Q,["enter"])},null,8,["modelValue","onKeyup"])):(l(),i("code",De,[d(b(V(t(e).key))+" ",1),c(Y,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:a[5]||(a[5]=o=>t(e).editingKey=!0)})])),t(e).editingKey?F("",!0):(l(),m(I,{key:2,n:"green xs",disabled:t(e).content===t(e).updatedContent,class:z({"border-green":t(e).content!==t(e).updatedContent}),onClick:N},{default:u(()=>[d(" Save ")]),_:1},8,["disabled","class"]))]),r("div",null,[c(I,{n:"red xs",onClick:J},{default:u(()=>[d(" Delete ")]),_:1})])]),typeof t(e).content=="object"?(l(),m(t(we),ue({key:0,modelValue:t(e).updatedContent,"onUpdate:modelValue":a[6]||(a[6]=o=>t(e).updatedContent=o),class:[[n.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue h-full of-auto text-sm outline-none"]},n.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):ie((l(),i("textarea",{key:1,"onUpdate:modelValue":a[7]||(a[7]=o=>t(e).updatedContent=o),placeholder:"Item value...",class:"h-full of-auto p-4 text-sm font-mono outline-none",onKeyup:L(de(N,["ctrl"]),["enter"])},null,40,Ae)),[[ce,t(e).updatedContent]])])):(l(),m(q,{key:1},{default:u(()=>[c(P,{px6:"",py4:""},{default:u(()=>[d(" Select one key to start."),Ue,d("Learn more about "),c(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[d(" Nitro storage ")]),_:1})]),_:1})]),_:1}))]),_:1})):(l(),m(q,{key:1},{default:u(()=>[Object.keys(t(K)).length?(l(),i("p",Le," Select one storage to start: ")):(l(),i("p",Me,[d(" No custom storage defined in "),Be,d("."),Pe,d(" Learn more about "),c(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[d(" Nitro storage ")]),_:1})])),(l(!0),i(w,null,U(t(K),(o,_)=>(l(),m(P,{key:_,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:Re=>s.value=_},{default:u(()=>[r("span",qe,b(_),1),Ee,r("span",Te,b(o.driver)+" driver",1),ze,o.base?(l(),m(te,{key:0,"text-xs":"",filepath:o.base},null,8,["filepath"])):F("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}}),Je=G({__name:"storage",setup(O){return(p,g)=>{const C=Fe,h=he;return l(),m(h,null,{default:u(()=>[c(C)]),_:1})}}});export{Je as default};
@@ -1,29 +0,0 @@
1
- import{d as w,a as T,aF as M,o as t,m as c,k as e,a7 as N,f as l,t as k,ab as O,F as f,n as I,h as b,r as B,w as U,aw as Z,Z as j,bB as q,p as x,i as m,G as z,q as K,e as X,an as H,j as g,ar as Q,v as E,_ as G,aa as P,aH as ee,as as se,aZ as te,bC as ne,M as oe,a9 as ae,A as le,K as R,a3 as ie,X as re}from"./entry.7cb87d02.js";import{_ as V}from"./DurationDisplay.vue.7b02ae9f.js";import{_ as J}from"./NBadge.681f2fb6.js";import{_ as ce}from"./ComposableItem.vue.5fcac467.js";import{t as pe}from"./json-editor-vue.b5b3ad21.js";import{_ as de}from"./FilepathItem.vue.6cdabcd4.js";import{_ as ue}from"./NDrawer.vue.15b4d748.js";import{_ as me}from"./LaunchPage.vue.06fcb257.js";import{_ as ke}from"./NLink.vue.e913f358.js";import{_ as he}from"./CodeDiff.vue.72250861.js";import{_ as _e}from"./HelpFab.vue.31b87f2a.js";import"./NMarkdown.vue.20899182.js";import"./client.b2473ec3.js";import"./constants.2cc6e981.js";import"./NCodeBlock.vue.7cb5f01d.js";const fe=w({__name:"TimelineItemFunction",props:{item:{}},setup(_){const u=_,p=T(()=>M(u.item.name,50,60,"_op_")),s=T(()=>p.value.replace(/_op_/,"1")),o=T(()=>M(u.item.name,50,40)),i=T(()=>p.value.replace(/_op_/,"0.2"));return(r,a)=>(t(),c("button",{class:"group",style:N({color:l(s),borderLeft:`2px solid ${l(s)}`}),relative:"","text-sm":"",transition:"","hover:z-1000":"","bg-base":""},[e("div",{style:N({backgroundColor:l(i)}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),e("div",{style:N({color:l(o),"--c":l(s)}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},k(r.item.name),5)],4))}}),ye={relative:"","h-full":""},ve={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},be=w({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(_,{emit:u}){const p=_,s=u,o=O(()=>p.segment.start,{updateInterval:1e3,showSecond:!0,messages:{justNow:"",past:i=>i,future:i=>i,invalid:"-",second:i=>i?`${i}s`:"",minute:i=>`${i}m`,hour:i=>`${i}h`,week:i=>`${i}w`,day:i=>`${i}d`,month:i=>`${i}mo`,year:i=>`${i}y`}});return(i,r)=>{const a=fe;return t(),c("div",ye,[e("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","font-mono":"","text-green6":"",onClick:r[0]||(r[0]=n=>i.segment.route?s("select",i.segment.route):void 0)},k(i.segment.route?.event.to),1),e("div",ve,k(l(o))+" ago ",1),e("div",null,[(t(!0),c(f,null,I(i.segment.functions,(n,d)=>(t(),b(a,{key:d,item:n.event,style:N({position:"absolute",minWidth:`${n.relativeWidth*100}%`,maxWidth:`${n.relativeWidth*100}%`,top:`${4+n.layer*1.6}em`,left:`${n.relativeStart*100}%`}),onClick:h=>s("select",n)},null,8,["item","style","onClick"]))),128))])])}}}),ge=3e3,xe=50;function $e(_){const u=[];let p={start:0,end:0,events:[],functions:[],duration:0};for(const s of _){const o=s.end||s.start;(s.start-p.end>ge||s.type==="route")&&(p={start:s.start,end:o,events:[],functions:[],duration:0},u.push(p)),p.events.push(s),p.end=o+xe}return u.forEach((s,o)=>{const i=s.end-s.start,r=[];s.duration=i,s.previousGap=o>0?s.start-u[o-1].end:0,s.events.forEach(a=>{const n=a.end||a.start;let d=0;a.type!=="route"&&(d=r.findIndex(D=>D<=a.start),d===-1?(d=r.length,r.push(n+1e3)):r[d]=n+1e3);const h={event:a,segment:s,relativeStart:(a.start-s.start)/i,relativeWidth:(n-a.start)/i,layer:d};a.type==="function"?s.functions.push(h):s.route=h})}),u}const Ae={relative:""},De={key:0,border:"x base","h-full":"","flex-inline":"","bg-true-gray-1":"",py15:"","text-xs":"","write-vertical-left":"",op50:"","dark:bg-true-gray-9":""},Ce=w({__name:"TimelineTable",props:{data:{}},emits:["select"],setup(_,{emit:u}){const p=_,s=u,o=B(),i=B(),r=B(),a=B(),n=B(!0),d=B(1.5),h=T(()=>$e(p.data.events)),D=T(()=>(p.data.events.length,o.value?.scrollWidth||window.innerWidth));function C(){a.value&&(a.value.style.width=`${D.value}px`)}function S(){n.value&&o.value&&(o.value.scrollTo({left:o.value.scrollWidth-o.value.clientWidth,behavior:"smooth"}),r.value.scrollTo({left:o.value.scrollWidth-o.value.clientWidth,behavior:"smooth"}))}return U(()=>p.data.events.length,async()=>{await Z(),C(),S()},{flush:"post"}),j(o,"scroll",()=>{r.value.scrollLeft!==o.value.scrollLeft&&(C(),r.value.scrollLeft=o.value.scrollLeft,n.value=o.value.scrollLeft>=o.value.scrollWidth-o.value.clientWidth)}),j(r,"scroll",()=>{r.value.scrollLeft!==o.value.scrollLeft&&(C(),o.value.scrollLeft=r.value.scrollLeft)}),j(o,"wheel",A=>{A.altKey?(d.value=q(d.value+A.deltaY/200,.5,3),C()):o.value.scrollLeft+=A.deltaY}),(A,v)=>{const y=V,W=be;return t(),c(f,null,[e("div",Ae,[e("div",{ref_key:"minimap",ref:i,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(t(!0),c(f,null,I(l(h),($,F)=>(t(),c("div",{key:F,relative:"","h-full":"","flex-inline":"",style:N({width:`${Math.max(100,$.duration/10)/l(D)*100}%`})},[(t(!0),c(f,null,I($.functions,(L,Y)=>(t(),c("div",{key:Y,"h-3px":"",rounded:"",style:N({width:`max(${L.relativeWidth*100}%, 10px)`,position:"absolute",top:`${L.layer*4}px`,left:`${L.relativeStart*100}%`,backgroundColor:("getHashColorFromString"in A?A.getHashColorFromString:l(M))(L.event.name,50,60)})},null,4))),128)),$.route?(t(),c("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:N({left:`${$.route.relativeStart*100}%`})},null,4)):x("",!0)],4))),128))],512),e("div",{ref_key:"minimapScroller",ref:r,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[e("div",{ref_key:"minimapScrollerInner",ref:a,"h-1px":""},null,512)],512)]),e("div",{ref_key:"scroller",ref:o,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(t(!0),c(f,null,I(l(h),($,F)=>(t(),c(f,{key:F},[$.previousGap&&$.previousGap>=200?(t(),c("div",De,[m(y,{op50:"",duration:$.previousGap,color:!1},null,8,["duration"])])):x("",!0),m(W,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:z(F===l(h).length-1?"border-r border-base":""),segment:$,style:N({width:`${Math.max(50,$.duration/10)*l(d)}px`}),onSelect:v[0]||(v[0]=L=>s("select",L))},null,8,["class","segment","style"])],64))),128))],512)],64)}}});const Be=K(Ce,[["__scopeId","data-v-a2c475c0"]]),we={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},Te=["onClick"],Ne=e("div",{"i-carbon-function":"",op50:""},null,-1),Se={flex:"~","ml--1":"","font-mono":""},Fe=e("div",{op30:""}," ( ",-1),Ee={key:0,mr2:"",op30:""},Ie={op75:""},Le=e("div",{op30:""}," ) ",-1),We=e("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[e("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1),Me={flex:"~ col items-start"},Ve={"text-xs":"","font-mono":"",op30:""},je={"font-bold":"","font-mono":"","text-green":""},Oe=e("div",{"flex-auto":""},null,-1),ze=e("div",{"min-h-100":""},null,-1),Ge=w({__name:"TimelineList",props:{data:{}},emits:["select"],setup(_,{emit:u}){const p=u;return(s,o)=>{const i=V;return t(),c("div",we,[(t(!0),c(f,null,I(s.data.events,(r,a)=>(t(),c("button",{key:a,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:n=>p("select",r)},[r.type==="function"?(t(),c(f,{key:0},[Ne,e("div",{"font-mono":"",style:N({color:r.type==="function"?("getHashColorFromString"in s?s.getHashColorFromString:l(M))(r.name,50,60):""})},k(r.name),5),e("div",Se,[Fe,(t(!0),c(f,null,I(r.args,(n,d)=>(t(),c(f,{key:d},[d?(t(),c("div",Ee," , ")):x("",!0),e("div",Ie,k(n===null?"null":n===void 0?"undefined":typeof n=="function"?"[function]":Array.isArray(n)?"[Array]":typeof n=="object"?"[object]":JSON.stringify(n)),1)],64))),128)),Le])],64)):(t(),c(f,{key:1},[We,e("div",Me,[e("div",Ve,k(r.from),1),e("div",je,k(r.to),1)])],64)),Oe,r.end?(t(),b(i,{key:2,duration:r.end-r.start,color:r.type==="function"},null,8,["duration","color"])):x("",!0)],8,Te))),128)),ze])}}}),Re={key:0,"text-blue":""},He={key:1,"text-purple":""},Pe={key:2,"text-green":""},Je={key:3,"text-gray":""},Ye={key:4,"text-gray":""},Ue={key:5,"text-gray":""},Ze={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},qe={key:1},Ke={p2:"","text-sm":"",border:"t base"},Xe=w({__name:"TimelineArgumentView",props:{value:{}},setup(_){const u=_,p=B(),s=B();function o(){try{p.value=JSON.parse(JSON.stringify(u.value))}catch(a){console.error(a),s.value=a}}const i=w({emits:["setup"],setup(a,{emit:n}){return n("setup"),()=>null}}),r=X();return(a,n)=>{const d=G,h=H("VMenu");return typeof a.value=="string"?(t(),c("div",Re,k(JSON.stringify(a.value)),1)):typeof a.value=="number"?(t(),c("div",He,k(a.value),1)):typeof a.value=="boolean"?(t(),c("div",Pe,k(a.value),1)):typeof a.value>"u"?(t(),c("div",Je," undefined ")):typeof a.value=="function"?(t(),c("div",Ye," [Function"+k(a.value.name?`: ${a.value.name}`:"")+"] ",1)):a.value===null?(t(),c("div",Ue," null ")):(t(),b(h,{key:6,placement:"top"},{popper:g(()=>[m(l(i),{onSetup:o}),l(s)?(t(),c("div",Ze," Failed to display object: "+k(l(s)),1)):l(p)?(t(),c("div",qe,[m(l(pe),Q({"model-value":l(p)},a.$attrs,{class:["json-editor-vue",[a.$colorMode.value==="dark"?"jse-theme-dark":""]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":!0,indentation:2,"tab-size":2}),null,16,["model-value","class"]),e("div",Ke,[m(d,{title:"Copy to clipboard",icon:"carbon-copy",onClick:n[0]||(n[0]=D=>l(r)(JSON.stringify(l(p),null,2),"timeline-argument"))},{default:g(()=>[E(" Copy ")]),_:1})])])):x("",!0)]),default:g(()=>[e("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:z([Array.isArray(a.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},k(Array.isArray(a.value)?`[Array(${a.value.length})]`:"[Object]"),3)]),_:1}))}}}),Qe={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},es={"mx--1":""},ss={flex:"~ gap-1","font-mono":""},ts={key:1},ns=e("span",{ml1:"",op30:""},"(",-1),os={key:0,op30:""},as=e("span",{op30:""},")",-1),ls={flex:"~ gap-1","text-sm":""},is=e("span",{mx1:"",op50:""},"·",-1),rs={class:"text-sm text-gray-400"},cs={key:0,class:"text-xs text-gray-400",mt2:"",grid:"~ cols-[max-content_1fr] gap-x-4","font-mono":""},ps={"text-right":""},ds={"ws-nowrap":""},us=w({__name:"TimelineDetailsFunction",props:{record:{}},setup(_){const u=_,p=P(),s=O(()=>u.record.start,{showSecond:!0});function o(n){let d=new URL(n).pathname;return d.startsWith("/_nuxt/")&&(d=d.slice(6)),d.startsWith("/@id/virtual:nuxt:")?`#build/${d.split("/.nuxt/")[1]}`.replace(/\.m?js$/,""):d.includes("/@fs/")?`/${d.split("/@fs/")[1]}`:(p.value?.rootDir||"")+d}const i=ee(),r=T(()=>i.value?.metadata),a=T(()=>i.value?.imports.find(n=>n.as===u.record.name));return(n,d)=>{const h=J,D=ce,C=Xe,S=V,A=de;return n.record?(t(),c("div",Qe,[e("div",es,[m(h,{n:"yellow",textContent:"Function call"})]),e("div",ss,[l(a)?(t(),b(D,{key:0,item:l(a),metadata:l(r),counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(t(),c("span",ts,k(n.record.name),1)),ns,(t(!0),c(f,null,I(n.record.args,(v,y)=>(t(),c(f,{key:y},[y?(t(),c("span",os,", ")):x("",!0),m(C,{value:v},null,8,["value"])],64))),128)),as]),e("div",ls,[n.record.end?(t(),b(S,{key:0,duration:n.record.end-n.record.start},null,8,["duration"])):x("",!0),is,e("div",rs,k(l(s)),1)]),n.record.stacktrace?(t(),c("div",cs,[(t(!0),c(f,null,I(n.record.stacktrace,(v,y)=>(t(),c(f,{key:y},[e("div",ps,k(v.functionName||"(anonymous)"),1),e("div",ds,[v.fileName?(t(),b(A,{key:0,filepath:`${o(v.fileName)}:${v.lineNumber}:${v.columnNumber}`,subpath:""},null,8,["filepath"])):x("",!0)])],64))),128))])):x("",!0)])):x("",!0)}}}),ms={key:0,"p-4":"",flex:"~ col gap-2"},ks={"mx--1":""},hs={flex:"~ gap-1 items-center","font-mono":""},_s={op50:""},fs=e("span",{"i-carbon-arrow-right":"",op50:""},null,-1),ys={flex:"~ gap-1","text-sm":""},vs=e("span",{mx1:"",op50:""},"·",-1),bs={class:"text-sm text-gray-400"},gs=w({__name:"TimelineDetailsRoute",props:{record:{}},setup(_){const u=_,p=O(()=>u.record.start,{showSecond:!0});return(s,o)=>{const i=J,r=V;return s.record?(t(),c("div",ms,[e("div",ks,[m(i,{n:"green",textContent:"Route Change"})]),e("div",hs,[e("span",_s,k(s.record.from),1),fs,e("span",null,k(s.record.to),1)]),e("div",ys,[s.record.end?(t(),b(r,{key:0,duration:s.record.end-s.record.start},null,8,["duration"])):x("",!0),vs,e("div",bs,k(l(p)),1)])])):x("",!0)}}}),xs={key:0,"h-screen":"","of-hidden":""},$s={"h-screen":"","w-full":"",flex:"","flex-col":""},As={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},Ds={"text-sm":""},Cs=e("div",{"flex-auto":""},null,-1),Bs={"min-h-50":"",px3:"",py2:""},ws=w({__name:"TimelineView",setup(_){const u=se(),p=B("table"),s=B(),o=T(()=>u.value?.metrics.clientTimeline());function i(){o.value&&(o.value.events=[])}function r(){p.value=p.value==="table"?"list":"table"}return(a,n)=>{const d=H("VTooltip"),h=G,D=Be,C=Ge,S=us,A=gs,v=ue;return l(o)?(t(),c("div",xs,[e("div",$s,[e("div",As,[m(d,{flex:""},{popper:g(()=>[e("div",Ds,k(l(o).options.enabled?"Recording...":"Paused"),1)]),default:g(()=>[e("div",{"text-lg":"",class:z(l(o).options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),l(o).options.enabled?(t(),b(h,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:n[1]||(n[1]=y=>l(o).options.enabled=!1)},{default:g(()=>[E(" Stop Tracking ")]),_:1})):(t(),b(h,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:n[0]||(n[0]=y=>l(o).options.enabled=!0)},{default:g(()=>[E(" Start Tracking ")]),_:1})),Cs,m(h,{icon:l(p)==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",border:!1,onClick:r},null,8,["icon"]),m(h,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",border:!1,onClick:i})]),l(p)==="table"?(t(),b(D,{key:0,data:{...l(o)},onSelect:n[2]||(n[2]=y=>s.value=y.event)},null,8,["data"])):(t(),b(C,{key:1,data:{...l(o)},onSelect:n[3]||(n[3]=y=>s.value=y)},null,8,["data"]))]),m(v,{"model-value":!!l(s),"auto-close":"",transition:"bottom",left:"#nuxt-devtools-side-nav",onClose:n[4]||(n[4]=y=>s.value=void 0)},{default:g(()=>[e("div",Bs,[l(s)?.type==="function"?(t(),b(S,{key:0,record:l(s)},null,8,["record"])):l(s)?.type==="route"?(t(),b(A,{key:1,record:l(s)},null,8,["record"])):x("",!0)])]),_:1},8,["model-value"])])):x("",!0)}}}),Ts={class:"markdown-body"},Ns=e("h1",null,"Timeline",-1),Ss=e("p",null,[e("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ")],-1),Fs=te(`<p>Timeline tracks your route navigations and functions calls in your Nuxt application. It can be used to debug performance issues and to understand how your application works.</p><h2>Function calls</h2><p>Nuxt DevTools tracks function calls by wrapping them in the build time. It works for functions referenced by auto-imports, or explicit imports through <code>import {} from &#39;#imports&#39;</code>.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0" lang="html"><code><span class="line"><span style="color:#999999;--shiki-dark:#666666;">&lt;</span><span style="color:#1E754F;--shiki-dark:#4D9375;">script</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> setup</span><span style="color:#999999;--shiki-dark:#666666;">&gt;</span></span>
2
- <span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> &#39;</span><span style="color:#B56959;--shiki-dark:#C98A7D;">#imports</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">&#39;</span></span>
3
- <span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> &#39;</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">&#39;</span></span>
4
- <span class="line"></span>
5
- <span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> route</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useRoute</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // tracked</span></span>
6
- <span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> app</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // tracked</span></span>
7
- <span class="line"></span>
8
- <span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;">// NOT tracked because it&#39;s directly imported</span></span>
9
- <span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> mouse</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#393A34;--shiki-dark:#DBD7CAEE;"> </span></span>
10
- <span class="line"></span></code></pre><p>By default, it tracks Nuxt provided composables as well as user defined functions. You can include/exclude functions by using the <code>include</code> and <code>exclude</code> options in the <code>nuxt.config.js</code> file.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0" lang="js"><code><span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">export</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> default</span><span style="color:#59873A;--shiki-dark:#80A665;"> defineNuxtConfig</span><span style="color:#999999;--shiki-dark:#666666;">({</span></span>
11
- <span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> devtools</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
12
- <span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> timeline</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
13
- <span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> functions</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
14
- <span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> include</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> [</span></span>
15
- <span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track \`useMouse\`</span></span>
16
- <span class="line"><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> &#39;</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useMouse</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">&#39;</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
17
- <span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions starting with \`use\`</span></span>
18
- <span class="line"><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> /</span><span style="color:#1E754F;--shiki-dark:#4D9375;">^</span><span style="color:#AB5E3F;--shiki-dark:#C4704F;">use</span><span style="color:#999999;--shiki-dark:#666666;">[</span><span style="color:#A65E2B;--shiki-dark:#C99076;">A-Z</span><span style="color:#999999;--shiki-dark:#666666;">]</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">/</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
19
- <span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions from @vueuse/core</span></span>
20
- <span class="line"><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;"> =&gt;</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;">.</span><span style="color:#B07D48;--shiki-dark:#BD976A;">from</span><span style="color:#AB5959;--shiki-dark:#CB7676;"> ===</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> &#39;</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">&#39;</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
21
- <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ],</span></span>
22
- <span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> exclude</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> [</span></span>
23
- <span class="line"><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> &#39;</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useRouter</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">&#39;</span></span>
24
- <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ]</span></span>
25
- <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
26
- <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
27
- <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
28
- <span class="line"><span style="color:#999999;--shiki-dark:#666666;">})</span></span>
29
- <span class="line"></span></code></pre>`,6),Es=[Ns,Ss,Fs],Is={__name:"timeline",setup(_,{expose:u}){return u({frontmatter:{}}),(s,o)=>(t(),c("div",Ts,Es))}},Ls={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},Ws=e("h2",{"text-xl":""},[e("span",{capitalize:""},"Enable Timeline?")],-1),Ms={op50:""},Vs=e("p",null,[e("span",{op50:""},"Then Nuxt will "),e("span",{"text-orange":""},"restart automatically"),E(". ")],-1),js={flex:"~ gap-3",mt2:"","justify-end":""},st=w({__name:"timeline",setup(_){const u=ne(),p=P(),s=oe(),o=ae();async function i(){try{const[r,a]=await R.enableTimeline(!0);if(!await s.start(r,a))return;await R.enableTimeline(!1)}catch{ie({message:"Failed to enable timeline automatically. Check the terminal for more details.",icon:"i-carbon-warning",classes:"text-red"})}}return(r,a)=>{const n=ws,d=me,h=le,D=ke,C=he,S=G,A=re,v=Is,y=_e;return t(),c(f,null,[l(u)?.timeline?.enabled?(t(),b(n,{key:0})):(t(),c(f,{key:1},[m(h,null,{default:g(()=>[m(d,{icon:"i-carbon-roadmap",name:"feature-timeline",title:"Timeline",description:"Timeline enables the inspection of when composable being executed and the route changes.",actions:[{label:"Enable"}],onAction:i})]),_:1}),m(l(s),null,{default:g(({resolve:W,args:$})=>[m(A,{"model-value":!0,onClose:F=>W(!1)},{default:g(()=>[e("div",Ls,[Ws,e("p",Ms,[E(" Your "),m(D,{role:"button",n:"primary",underline:"",onClick:a[0]||(a[0]=F=>l(o)(l(p)?._nuxtConfigFile)),textContent:"Nuxt config"}),E(" will be updated as: ")]),m(C,{from:$[0],to:$[1],"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),Vs,e("div",js,[m(S,{onClick:F=>W(!1)},{default:g(()=>[E(" Cancel ")]),_:2},1032,["onClick"]),m(S,{n:"solid primary",capitalize:"",onClick:F=>W(!0)},{default:g(()=>[E(" Enable ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)),m(y,null,{default:g(()=>[m(v)]),_:1})],64)}}});export{st as default};