@nuxt/devtools 2.6.4 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/dist/chunks/module-main.mjs +55 -41
  2. package/dist/client/200.html +24 -23
  3. package/dist/client/404.html +24 -23
  4. package/dist/client/_nuxt/__blank-o2e2nlba.js +1 -0
  5. package/dist/client/_nuxt/analyze-build-nz1y96gd.js +1 -0
  6. package/dist/client/_nuxt/assets-nh6uq1n5.js +16 -0
  7. package/dist/client/_nuxt/builds/latest.json +1 -1
  8. package/dist/client/_nuxt/builds/meta/d81a82cc-1641-42f4-8236-01d5f57535e9.json +1 -0
  9. package/dist/client/_nuxt/{client-hkqvtzyx.js → client-grni31iy.js} +1 -1
  10. package/dist/client/_nuxt/code-diff.vue-cickw09g.js +8 -0
  11. package/dist/client/_nuxt/code-snippets.vue-c07ituis.js +1 -0
  12. package/dist/client/_nuxt/components-cq7iswa4.js +1 -0
  13. package/dist/client/_nuxt/composable-item.vue-emog8rj6.js +1 -0
  14. package/dist/client/_nuxt/custom-_name_-fy2dzlhn.js +1 -0
  15. package/dist/client/_nuxt/data-schema-button.vue-fo5mzhk5.js +1 -0
  16. package/dist/client/_nuxt/data-schema-drawer-i7brie61.js +2 -0
  17. package/dist/client/_nuxt/debug-mfvc65ao.js +1 -0
  18. package/dist/client/_nuxt/default-f96z8sx9.js +1 -0
  19. package/dist/client/_nuxt/duration-display.vue-hc7it00w.js +1 -0
  20. package/dist/client/_nuxt/entry.css-kes83a7q.css +1 -0
  21. package/dist/client/_nuxt/error-404-fsmcgc81.js +1 -0
  22. package/dist/client/_nuxt/error-404.css-f2r0whq7.css +1 -0
  23. package/dist/client/_nuxt/error-500-ggd23rlw.js +1 -0
  24. package/dist/client/_nuxt/error-500.css-m0gu28nc.css +1 -0
  25. package/dist/client/_nuxt/{error-h42e43my.js → error-bdtzadbh.js} +6 -6
  26. package/dist/client/_nuxt/filepath-item.vue-neqjm2ct.js +1 -0
  27. package/dist/client/_nuxt/full-hh85jtzl.js +1 -0
  28. package/dist/client/_nuxt/help-fab.vue-lyrsxykz.js +1 -0
  29. package/dist/client/_nuxt/hooks-isq60ffg.js +1 -0
  30. package/dist/client/_nuxt/hs1vn89w.js +19 -0
  31. package/dist/client/_nuxt/imports-i1bdmxvv.js +1 -0
  32. package/dist/client/_nuxt/index-elnpw1x4.js +1 -0
  33. package/dist/client/_nuxt/launch-page.vue-b5jz6435.js +1 -0
  34. package/dist/client/_nuxt/modules-hxuay0ud.js +1 -0
  35. package/dist/client/_nuxt/nbadge-h7alls7b.js +1 -0
  36. package/dist/client/_nuxt/ncheckbox.vue-bh13p6qy.js +1 -0
  37. package/dist/client/_nuxt/ncode-block.vue-fnl81rsp.js +2 -0
  38. package/dist/client/_nuxt/ndrawer.vue-hcqgn10u.js +1 -0
  39. package/dist/client/_nuxt/ndropdown.vue-cclblmxb.js +1 -0
  40. package/dist/client/_nuxt/nicon-title.vue-c7m4gyag.js +1 -0
  41. package/dist/client/_nuxt/nlink.vue-hu4nnvo7.js +1 -0
  42. package/dist/client/_nuxt/nmarkdown.vue-benph8ez.js +1 -0
  43. package/dist/client/_nuxt/nnavbar.vue-nldppm6i.js +1 -0
  44. package/dist/client/_nuxt/none-c4q49gb7.js +1 -0
  45. package/dist/client/_nuxt/nsection-block-ld7dxama.js +1 -0
  46. package/dist/client/_nuxt/nselect-tabs.vue-g78ecijz.js +1 -0
  47. package/dist/client/_nuxt/nselect.vue-ikkkj1tq.js +1 -0
  48. package/dist/client/_nuxt/nswitch.vue-gb2x6p6j.js +1 -0
  49. package/dist/client/_nuxt/open-graph-ut0bupqh.js +3 -0
  50. package/dist/client/_nuxt/overview-o50tzp8d.js +1 -0
  51. package/dist/client/_nuxt/pages-hi719vyc.js +1 -0
  52. package/dist/client/_nuxt/payload-dprej8cs.js +1 -0
  53. package/dist/client/_nuxt/pinia-ghxvse5l.js +1 -0
  54. package/dist/client/_nuxt/plugins-g5ehm351.js +1 -0
  55. package/dist/client/_nuxt/render-tree-nko8dely.js +1 -0
  56. package/dist/client/_nuxt/runtime-configs-m1mfkc7h.js +1 -0
  57. package/dist/client/_nuxt/server-discovery-onsh2smk.js +1 -0
  58. package/dist/client/_nuxt/server-route-inputs.vue-e944cjqy.js +1 -0
  59. package/dist/client/_nuxt/server-routes-ia6aa4ou.js +9 -0
  60. package/dist/client/_nuxt/server-tasks-i6584keu.js +1 -0
  61. package/dist/client/_nuxt/settings-dumbcp6e.js +1 -0
  62. package/dist/client/_nuxt/stacktrace-list.vue-gtf32k2z.js +1 -0
  63. package/dist/client/_nuxt/state-components-k1rzq61q.js +1 -0
  64. package/dist/client/_nuxt/state-editor.vue-bv2vsi3e.js +1 -0
  65. package/dist/client/_nuxt/state-modules-caoe1wdh.js +1 -0
  66. package/dist/client/_nuxt/storage-f7vi2lpi.js +1 -0
  67. package/dist/client/_nuxt/terminals-ey2y919c.js +1 -0
  68. package/dist/client/_nuxt/timeline-ngc4nnxj.js +31 -0
  69. package/dist/client/_nuxt/{unocss-runtime-ctfd2wr7.js → unocss-runtime-e6p7e9vg.js} +1 -1
  70. package/dist/client/_nuxt/vendor/json-editor-vue-linwxbdb.js +3902 -0
  71. package/dist/client/_nuxt/vendor/{quicktype-core-o057hwfl.js → quicktype-core-i7mnewyz.js} +1 -1
  72. package/dist/client/_nuxt/vendor/{shiki-jxvjmls6.js → shiki-hpfujfi3.js} +1 -1
  73. package/dist/client/_nuxt/vendor/unocss-c1ookmgn.js +3 -0
  74. package/dist/client/_nuxt/vendor/vis-bs03k74b.js +84 -0
  75. package/dist/client/_nuxt/virtual-files-nhnn9uqz.js +1 -0
  76. package/dist/client/_nuxt/vue-devtools-eqaeie6v.js +2 -0
  77. package/dist/client/_nuxt/{vue-virtual-scroller.esm-kqx3l34g.js → vue-virtual-scroller.esm-ma3b9hj8.js} +2 -2
  78. package/dist/client/discovery/index.html +1 -1
  79. package/dist/client/index.html +24 -23
  80. package/dist/module.json +1 -1
  81. package/dist/webcomponents/index.mjs +612 -586
  82. package/package.json +42 -42
  83. package/dist/client/_nuxt/__blank-h7gh4972.js +0 -1
  84. package/dist/client/_nuxt/analyze-build-e7zhvr63.js +0 -1
  85. package/dist/client/_nuxt/assets-egppkejv.js +0 -16
  86. package/dist/client/_nuxt/builds/meta/66686ce5-d9fb-4644-8217-9527ecb94af7.json +0 -1
  87. package/dist/client/_nuxt/code-diff.vue-mrrhkj4u.js +0 -8
  88. package/dist/client/_nuxt/code-snippets.vue-kjfj8pkz.js +0 -1
  89. package/dist/client/_nuxt/components-olvjx4l1.js +0 -1
  90. package/dist/client/_nuxt/composable-item.vue-dg5j2bbt.js +0 -1
  91. package/dist/client/_nuxt/custom-_name_-m96w5ufd.js +0 -1
  92. package/dist/client/_nuxt/data-schema-button.vue-ngku3aqi.js +0 -1
  93. package/dist/client/_nuxt/data-schema-drawer-f1uukq9f.js +0 -2
  94. package/dist/client/_nuxt/debug-bggs2zr7.js +0 -1
  95. package/dist/client/_nuxt/default-enx8qz4g.js +0 -1
  96. package/dist/client/_nuxt/duration-display.vue-l0zz5iex.js +0 -1
  97. package/dist/client/_nuxt/entry.css-ojy5yvlc.css +0 -1
  98. package/dist/client/_nuxt/error-404-euhjla4o.js +0 -1
  99. package/dist/client/_nuxt/error-404.css-z2gtwy9t.css +0 -1
  100. package/dist/client/_nuxt/error-500-funftb8x.js +0 -1
  101. package/dist/client/_nuxt/error-500.css-liy0brxy.css +0 -1
  102. package/dist/client/_nuxt/filepath-item.vue-hz4h7grs.js +0 -1
  103. package/dist/client/_nuxt/full-itbtxw66.js +0 -1
  104. package/dist/client/_nuxt/help-fab.vue-ko0lbcr6.js +0 -1
  105. package/dist/client/_nuxt/hooks-jxyux8ne.js +0 -1
  106. package/dist/client/_nuxt/imports-gin72a2j.js +0 -1
  107. package/dist/client/_nuxt/index-m0xin2zq.js +0 -1
  108. package/dist/client/_nuxt/launch-page.vue-isddstgq.js +0 -1
  109. package/dist/client/_nuxt/modules-nfedz9ca.js +0 -1
  110. package/dist/client/_nuxt/nbadge-hm1tfsag.js +0 -1
  111. package/dist/client/_nuxt/ncheckbox.vue-ckmbtyon.js +0 -1
  112. package/dist/client/_nuxt/ncode-block.vue-j1bpwykw.js +0 -2
  113. package/dist/client/_nuxt/ndrawer.vue-n0qiddb9.js +0 -1
  114. package/dist/client/_nuxt/ndropdown.vue-bciozye8.js +0 -1
  115. package/dist/client/_nuxt/nicon-title.vue-mr03t3pg.js +0 -1
  116. package/dist/client/_nuxt/nlink.vue-hcnisvaw.js +0 -1
  117. package/dist/client/_nuxt/nmarkdown.vue-n5lhcplj.js +0 -1
  118. package/dist/client/_nuxt/nnavbar.vue-ovfxvhly.js +0 -1
  119. package/dist/client/_nuxt/none-dl7on04j.js +0 -1
  120. package/dist/client/_nuxt/nsection-block-jp9uafej.js +0 -1
  121. package/dist/client/_nuxt/nselect-tabs.vue-kuhdv26r.js +0 -1
  122. package/dist/client/_nuxt/nselect.vue-jacce7s8.js +0 -1
  123. package/dist/client/_nuxt/nswitch.vue-ihk2zmam.js +0 -1
  124. package/dist/client/_nuxt/open-graph-7rb6ewih.js +0 -3
  125. package/dist/client/_nuxt/overview-i13poe3o.js +0 -1
  126. package/dist/client/_nuxt/pages-iliwmgeq.js +0 -1
  127. package/dist/client/_nuxt/payload-j70lwykx.js +0 -1
  128. package/dist/client/_nuxt/pinia-d7s5sxl6.js +0 -1
  129. package/dist/client/_nuxt/plugins-lxqz66oy.js +0 -1
  130. package/dist/client/_nuxt/render-tree-m28exffx.js +0 -1
  131. package/dist/client/_nuxt/runtime-configs-d0lvzq6c.js +0 -1
  132. package/dist/client/_nuxt/server-discovery-fwbv9ddk.js +0 -1
  133. package/dist/client/_nuxt/server-route-inputs.vue-n83bsqfu.js +0 -1
  134. package/dist/client/_nuxt/server-routes-ctkf4xaa.js +0 -9
  135. package/dist/client/_nuxt/server-tasks-nmhr91av.js +0 -1
  136. package/dist/client/_nuxt/settings-h4wldlz5.js +0 -1
  137. package/dist/client/_nuxt/ssp5uswy.js +0 -15
  138. package/dist/client/_nuxt/stacktrace-list.vue-owmr9xsb.js +0 -1
  139. package/dist/client/_nuxt/state-components-eqhp1mgy.js +0 -1
  140. package/dist/client/_nuxt/state-editor.vue-nqq246ty.js +0 -1
  141. package/dist/client/_nuxt/state-modules-k8lb4wfx.js +0 -1
  142. package/dist/client/_nuxt/storage-nn39z2mt.js +0 -1
  143. package/dist/client/_nuxt/terminals-e0hhqqpd.js +0 -1
  144. package/dist/client/_nuxt/timeline-oycsww96.js +0 -31
  145. package/dist/client/_nuxt/vendor/json-editor-vue-nstwj98r.js +0 -3857
  146. package/dist/client/_nuxt/vendor/unocss-kkb86zbm.js +0 -3
  147. package/dist/client/_nuxt/vendor/vis-je6lvt05.js +0 -132
  148. package/dist/client/_nuxt/virtual-files-d64aqsh3.js +0 -1
  149. package/dist/client/_nuxt/vue-devtools-k2g24qpq.js +0 -2
@@ -1,7 +1,7 @@
1
1
  import fs, { existsSync, promises, statSync, realpathSync, readFileSync, accessSync, constants } from 'node:fs';
2
2
  import fsp from 'node:fs/promises';
3
3
  import os, { homedir } from 'node:os';
4
- import { logger, useNuxt, addPlugin, addTemplate, addVitePlugin } from '@nuxt/kit';
4
+ import { logger, useNuxt, addVitePlugin, addPlugin, addTemplate, extendViteConfig, addImports } from '@nuxt/kit';
5
5
  import { colors } from 'consola/utils';
6
6
  import { join, dirname as dirname$1, resolve, isAbsolute } from 'pathe';
7
7
  import sirv from 'sirv';
@@ -33,7 +33,7 @@ import { getDefaultExportOptions, addNuxtModule } from 'magicast/helpers';
33
33
  import { detectPackageManager } from 'nypm';
34
34
  import semver from 'semver';
35
35
 
36
- const version$1 = "2.6.4";
36
+ const version$1 = "2.7.0";
37
37
 
38
38
  const urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
39
39
  function randomStr(size = 16, dict = urlAlphabet) {
@@ -126,7 +126,7 @@ function setupAnalyzeBuildRPC({ nuxt, refresh, ensureDevAuthToken }) {
126
126
  const devtoolsAnalyzeDir = join(nuxt.options.rootDir, "node_modules/.cache/nuxt-devtools/analyze");
127
127
  async function startAnalyzeBuild(name) {
128
128
  if (promise)
129
- throw new Error("Already building");
129
+ throw new Error("[Nuxt DevTools] A building process is already running");
130
130
  const result = startSubprocess({
131
131
  command: "npx",
132
132
  args: ["nuxi", "analyze", "--no-serve", "--name", name],
@@ -260,6 +260,8 @@ function setupAssetsRPC({ nuxt, ensureDevAuthToken, refresh, options }) {
260
260
  for (const { layerDir, files } of dirs) {
261
261
  for (const path of files) {
262
262
  const filePath = resolve(layerDir, path);
263
+ if (!filePath.startsWith(layerDir))
264
+ continue;
263
265
  const stat = await fsp.lstat(filePath);
264
266
  const fullPath = join(baseURL, path);
265
267
  if (!uniquePaths.has(fullPath)) {
@@ -312,10 +314,12 @@ function setupAssetsRPC({ nuxt, ensureDevAuthToken, refresh, options }) {
312
314
  return await Promise.all(
313
315
  files.map(async ({ path, content, encoding, override }) => {
314
316
  let finalPath = resolve(baseDir, path);
317
+ if (!finalPath.startsWith(baseDir))
318
+ throw new Error(`[Nuxt DevTools] File ${path} is not allowed to upload, it's outside of the public directory`);
315
319
  const { ext } = parse(finalPath);
316
320
  if (extensions !== "*") {
317
321
  if (!extensions.includes(ext.toLowerCase().slice(1)))
318
- throw new Error(`File extension ${ext} is not allowed to upload, allowed extensions are: ${extensions.join(", ")}
322
+ throw new Error(`[Nuxt DevTools] File extension ${ext} is not allowed to upload, allowed extensions are: ${extensions.join(", ")}
319
323
  You can configure it in Nuxt config at \`devtools.assets.uploadExtensions\`.`);
320
324
  }
321
325
  if (!override) {
@@ -344,7 +348,7 @@ You can configure it in Nuxt config at \`devtools.assets.uploadExtensions\`.`);
344
348
  await ensureDevAuthToken(token);
345
349
  const exist = cache?.find((asset) => asset.filePath === newPath);
346
350
  if (exist)
347
- throw new Error(`File ${newPath} already exists`);
351
+ throw new Error(`[Nuxt DevTools] File ${newPath} already exists, failed to rename`);
348
352
  return await fsp.rename(oldPath, newPath);
349
353
  }
350
354
  };
@@ -8829,7 +8833,7 @@ function normalizeid(id) {
8829
8833
  if (typeof id !== "string") {
8830
8834
  id = id.toString();
8831
8835
  }
8832
- if (/(node|data|http|https|file):/.test(id)) {
8836
+ if (/(?:node|data|http|https|file):/.test(id)) {
8833
8837
  return id;
8834
8838
  }
8835
8839
  if (BUILTIN_MODULES.has(id)) {
@@ -8867,7 +8871,7 @@ function _resolve(id, options = {}) {
8867
8871
  throw new TypeError("input must be a `string` or `URL`");
8868
8872
  }
8869
8873
  }
8870
- if (/(node|data|http|https):/.test(id)) {
8874
+ if (/(?:node|data|http|https):/.test(id)) {
8871
8875
  return id;
8872
8876
  }
8873
8877
  if (BUILTIN_MODULES.has(id)) {
@@ -8952,17 +8956,21 @@ function resolvePath(id, options) {
8952
8956
  return Promise.reject(error);
8953
8957
  }
8954
8958
  }
8955
- const EXPORT_DECAL_RE = /\bexport\s+(?<declaration>(async function\s*\*?|function\s*\*?|let|const enum|const|enum|var|class))\s+\*?(?<name>[\w$]+)(?<extraNames>.*,\s*[\s\w:[\]{}]*[\w$\]}]+)*/g;
8956
- const EXPORT_NAMED_RE = /\bexport\s*{(?<exports>[^}]+?)[\s,]*}(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][^\n;]*)?/g;
8957
- const EXPORT_NAMED_DESTRUCT = /\bexport\s+(let|var|const)\s+(?:{(?<exports1>[^}]+?)[\s,]*}|\[(?<exports2>[^\]]+?)[\s,]*])\s+=/gm;
8958
- const EXPORT_STAR_RE = /\bexport\s*(\*)(\s*as\s+(?<name>[\w$]+)\s+)?\s*(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][^\n;]*)?/g;
8959
+ const EXPORT_DECAL_RE = /\bexport\s+(?<declaration>(?:async function\s*\*?|function\s*\*?|let|const enum|const|enum|var|class))\s+\*?(?<name>[\w$]+)(?<extraNames>.*,\s*[\s\w:[\]{}]*[\w$\]}]+)*/g;
8960
+ const EXPORT_NAMED_RE = /\bexport\s*{(?<exports>[^}]+?)[\s,]*}(?:\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][^\n;]*)?/g;
8961
+ const EXPORT_NAMED_DESTRUCT = /\bexport\s+(?:let|var|const)\s+(?:{(?<exports1>[^}]+?)[\s,]*}|\[(?<exports2>[^\]]+?)[\s,]*])\s+=/gm;
8962
+ const EXPORT_STAR_RE = /\bexport\s*\*(?:\s*as\s+(?<name>[\w$]+)\s+)?\s*(?:\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][^\n;]*)?/g;
8959
8963
  const EXPORT_DEFAULT_RE = /\bexport\s+default\s+(async function|function|class|true|false|\W|\d)|\bexport\s+default\s+(?<defaultName>.*)/g;
8964
+ const EXPORT_DEFAULT_CLASS_RE = /\bexport\s+default\s+(?<declaration>class)\s+(?<name>[\w$]+)/g;
8960
8965
  const TYPE_RE = /^\s*?type\s/;
8961
8966
  function findExports(code) {
8962
8967
  const declaredExports = matchAll(EXPORT_DECAL_RE, code, {
8963
8968
  type: "declaration"
8964
8969
  });
8965
8970
  for (const declaredExport of declaredExports) {
8971
+ if (/^export\s+(?:async\s+)?function/.test(declaredExport.code)) {
8972
+ continue;
8973
+ }
8966
8974
  const extraNamesStr = declaredExport.extraNames;
8967
8975
  if (extraNamesStr) {
8968
8976
  const extraNames = matchAll(
@@ -8994,6 +9002,9 @@ function findExports(code) {
8994
9002
  type: "default",
8995
9003
  name: "default"
8996
9004
  });
9005
+ const defaultClassExports = matchAll(EXPORT_DEFAULT_CLASS_RE, code, {
9006
+ type: "declaration"
9007
+ });
8997
9008
  const starExports = matchAll(EXPORT_STAR_RE, code, {
8998
9009
  type: "star"
8999
9010
  });
@@ -9002,6 +9013,7 @@ function findExports(code) {
9002
9013
  ...namedExports,
9003
9014
  ...destructuredExports,
9004
9015
  ...defaultExport,
9016
+ ...defaultClassExports,
9005
9017
  ...starExports
9006
9018
  ]);
9007
9019
  if (exports.length === 0) {
@@ -10030,8 +10042,10 @@ const commonProps = [
10030
10042
  "priority",
10031
10043
  "disabled",
10032
10044
  "dtsDisabled",
10045
+ "declarationType",
10033
10046
  "meta",
10034
- "type"
10047
+ "type",
10048
+ "typeFrom"
10035
10049
  ];
10036
10050
  async function resolvePreset(preset) {
10037
10051
  const imports = [];
@@ -10781,7 +10795,7 @@ async function magicastGuard(fn, message = "") {
10781
10795
  generated = await fn();
10782
10796
  } catch (e) {
10783
10797
  logger.error(e);
10784
- throw new Error(`Magicast failed to modify Nuxt config automatically. Maybe the config are composed too dynamically that we failed to statically analyze it. ${message}`);
10798
+ throw new Error(`[Nuxt DevTools] Magicast failed to modify Nuxt config automatically. Maybe the config are composed too dynamically that we failed to statically analyze it. ${message}`);
10785
10799
  }
10786
10800
  return generated;
10787
10801
  }
@@ -10883,7 +10897,7 @@ function setupNpmRPC({ nuxt, ensureDevAuthToken }) {
10883
10897
  const code = result.exitCode;
10884
10898
  if (code !== 0) {
10885
10899
  console.error(result.stderr);
10886
- throw new Error(`Failed to install module, process exited with ${code}`);
10900
+ throw new Error(`[Nuxt DevTools] Failed to install module, process exited with ${code}`);
10887
10901
  }
10888
10902
  if (installSet.size === 0) {
10889
10903
  latestGenerated = null;
@@ -10931,7 +10945,7 @@ function setupNpmRPC({ nuxt, ensureDevAuthToken }) {
10931
10945
  const code = result.exitCode;
10932
10946
  if (code !== 0) {
10933
10947
  console.error(result.stderr);
10934
- throw new Error(`Failed to uninstall module', process exited with ${code}`);
10948
+ throw new Error(`[Nuxt DevTools] Failed to uninstall module, process exited with ${code}`);
10935
10949
  }
10936
10950
  await fsp.writeFile(filepath, generated, "utf-8");
10937
10951
  }
@@ -10971,25 +10985,27 @@ function setupServerDataRPC({
10971
10985
  nuxt.hook("nitro:build:before", (_nitro) => {
10972
10986
  nitro = _nitro;
10973
10987
  });
10974
- nuxt.hook("vite:extendConfig", (vite, options) => {
10975
- if (options.isServer) {
10976
- vite.plugins ||= [];
10977
- vite.plugins.push({
10978
- name: "nuxt:devtools:config-retriever",
10979
- enforce: "post",
10980
- configResolved(config) {
10981
- viteServer = normalizeViteConfig(config);
10982
- }
10983
- });
10984
- } else if (options.isClient) {
10985
- vite.plugins ||= [];
10986
- vite.plugins.push({
10987
- name: "nuxt:devtools:config-retriever",
10988
- enforce: "post",
10989
- configResolved(config) {
10990
- viteClient = normalizeViteConfig(config);
10991
- }
10992
- });
10988
+ addVitePlugin({
10989
+ name: "nuxt:devtools:config",
10990
+ applyToEnvironment(environment) {
10991
+ if (environment.name === "ssr") {
10992
+ return {
10993
+ name: "nuxt:devtools:config-retriever",
10994
+ enforce: "post",
10995
+ configResolved(config) {
10996
+ viteServer = normalizeViteConfig(config);
10997
+ }
10998
+ };
10999
+ }
11000
+ if (environment.name === "client") {
11001
+ return {
11002
+ name: "nuxt:devtools:config-retriever",
11003
+ enforce: "post",
11004
+ configResolved(config) {
11005
+ viteClient = normalizeViteConfig(config);
11006
+ }
11007
+ };
11008
+ }
10993
11009
  }
10994
11010
  });
10995
11011
  return {
@@ -11420,7 +11436,7 @@ function setupRPC(nuxt, options) {
11420
11436
  if (options.disableAuthorization)
11421
11437
  return;
11422
11438
  if (token !== await getDevAuthToken())
11423
- throw new Error("Invalid dev auth token.");
11439
+ throw new Error("[Nuxt DevTools] Invalid dev auth token.");
11424
11440
  }
11425
11441
  };
11426
11442
  nuxt.devtools = ctx;
@@ -11555,7 +11571,7 @@ window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
11555
11571
  } = setupRPC(nuxt, options);
11556
11572
  addVitePlugin(vitePlugin);
11557
11573
  const clientDirExists = existsSync(clientDir);
11558
- nuxt.hook("vite:extendConfig", (config) => {
11574
+ extendViteConfig((config) => {
11559
11575
  config.server ||= {};
11560
11576
  config.server.fs ||= {};
11561
11577
  config.server.fs.allow ||= [
@@ -11569,11 +11585,9 @@ window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
11569
11585
  config.server.watch.ignored.push("**/.nuxt/analyze/**");
11570
11586
  config.server.watch.ignored.push("**/.cache/nuxt-devtools/**");
11571
11587
  });
11572
- nuxt.hook("imports:extend", (imports) => {
11573
- imports.push({
11574
- name: "useNuxtDevTools",
11575
- from: join(runtimeDir, "use-nuxt-devtools")
11576
- });
11588
+ addImports({
11589
+ name: "useNuxtDevTools",
11590
+ from: join(runtimeDir, "use-nuxt-devtools")
11577
11591
  });
11578
11592
  const ROUTE_PATH = `${nuxt.options.app.baseURL || "/"}/__nuxt_devtools__`.replace(/\/+/g, "/");
11579
11593
  const ROUTE_CLIENT = `${ROUTE_PATH}/client`;
@@ -1,29 +1,30 @@
1
1
  <!DOCTYPE html><html><head><meta charset="utf-8">
2
2
  <meta name="viewport" content="width=device-width, initial-scale=1">
3
- <link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-ojy5yvlc.css" crossorigin>
3
+ <script type="importmap">{"imports":{"#entry":"/__NUXT_DEVTOOLS_BASE__/_nuxt/hs1vn89w.js"}}</script>
4
+ <link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-kes83a7q.css" crossorigin>
4
5
  <link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-mqq5uooj.css" crossorigin>
5
6
  <link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-mhvipxpl.css" crossorigin>
6
- <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ssp5uswy.js">
7
- <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-nstwj98r.js">
8
- <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-jxvjmls6.js">
9
- <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-kkb86zbm.js">
7
+ <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/hs1vn89w.js">
8
+ <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-linwxbdb.js">
9
+ <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-hpfujfi3.js">
10
+ <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-c1ookmgn.js">
10
11
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/markdown-it-fvu08dbs.js">
11
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-enx8qz4g.js">
12
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-itbtxw66.js">
13
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-dl7on04j.js">
12
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-f96z8sx9.js">
13
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-hh85jtzl.js">
14
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-c4q49gb7.js">
14
15
  <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.css-lvdc77tw.css">
15
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-f1uukq9f.js">
16
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-jacce7s8.js">
17
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch.vue-ihk2zmam.js">
18
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-bciozye8.js">
19
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.vue-j1bpwykw.js">
20
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-hkqvtzyx.js">
21
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-n0qiddb9.js">
22
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-o057hwfl.js">
23
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-ctfd2wr7.js">
24
- <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-z2gtwy9t.css">
25
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-euhjla4o.js">
26
- <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-liy0brxy.css">
27
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-funftb8x.js">
28
- <script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/ssp5uswy.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1758311785443,false]</script>
29
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"66686ce5-d9fb-4644-8217-9527ecb94af7",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
16
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-i7brie61.js">
17
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-ikkkj1tq.js">
18
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch.vue-gb2x6p6j.js">
19
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-cclblmxb.js">
20
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.vue-fnl81rsp.js">
21
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-grni31iy.js">
22
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-hcqgn10u.js">
23
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-i7mnewyz.js">
24
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-e6p7e9vg.js">
25
+ <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-f2r0whq7.css">
26
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-fsmcgc81.js">
27
+ <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-m0gu28nc.css">
28
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-ggd23rlw.js">
29
+ <script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/hs1vn89w.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1761515310657,false]</script>
30
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"d81a82cc-1641-42f4-8236-01d5f57535e9",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
@@ -1,29 +1,30 @@
1
1
  <!DOCTYPE html><html><head><meta charset="utf-8">
2
2
  <meta name="viewport" content="width=device-width, initial-scale=1">
3
- <link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-ojy5yvlc.css" crossorigin>
3
+ <script type="importmap">{"imports":{"#entry":"/__NUXT_DEVTOOLS_BASE__/_nuxt/hs1vn89w.js"}}</script>
4
+ <link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-kes83a7q.css" crossorigin>
4
5
  <link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-mqq5uooj.css" crossorigin>
5
6
  <link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-mhvipxpl.css" crossorigin>
6
- <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ssp5uswy.js">
7
- <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-nstwj98r.js">
8
- <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-jxvjmls6.js">
9
- <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-kkb86zbm.js">
7
+ <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/hs1vn89w.js">
8
+ <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-linwxbdb.js">
9
+ <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-hpfujfi3.js">
10
+ <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-c1ookmgn.js">
10
11
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/markdown-it-fvu08dbs.js">
11
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-enx8qz4g.js">
12
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-itbtxw66.js">
13
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-dl7on04j.js">
12
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-f96z8sx9.js">
13
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-hh85jtzl.js">
14
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-c4q49gb7.js">
14
15
  <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.css-lvdc77tw.css">
15
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-f1uukq9f.js">
16
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-jacce7s8.js">
17
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch.vue-ihk2zmam.js">
18
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-bciozye8.js">
19
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.vue-j1bpwykw.js">
20
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-hkqvtzyx.js">
21
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-n0qiddb9.js">
22
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-o057hwfl.js">
23
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-ctfd2wr7.js">
24
- <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-z2gtwy9t.css">
25
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-euhjla4o.js">
26
- <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-liy0brxy.css">
27
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-funftb8x.js">
28
- <script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/ssp5uswy.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1758311785443,false]</script>
29
- <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"66686ce5-d9fb-4644-8217-9527ecb94af7",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
16
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-i7brie61.js">
17
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect.vue-ikkkj1tq.js">
18
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch.vue-gb2x6p6j.js">
19
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown.vue-cclblmxb.js">
20
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.vue-fnl81rsp.js">
21
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-grni31iy.js">
22
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer.vue-hcqgn10u.js">
23
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-i7mnewyz.js">
24
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-e6p7e9vg.js">
25
+ <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.css-f2r0whq7.css">
26
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404-fsmcgc81.js">
27
+ <link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-m0gu28nc.css">
28
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-ggd23rlw.js">
29
+ <script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/hs1vn89w.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1761515310658,false]</script>
30
+ <script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"d81a82cc-1641-42f4-8236-01d5f57535e9",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
@@ -0,0 +1 @@
1
+ import{p as e,J as n,a0 as t}from"./vendor/json-editor-vue-linwxbdb.js";const a={"h-screen":"","w-screen":"","bg-black":""},r=e({__name:"__blank",setup(c){return(o,s)=>(t(),n("div",a))}});export{r as default};
@@ -0,0 +1 @@
1
+ import{b6 as Q,b7 as j,_ as P,r as V,E as R,b8 as X,a6 as h,a7 as ee,Z as ne,a1 as te,j as le,b9 as N,a8 as ie,Q as oe,v as ue,q as re,aj as ae,M as se}from"#entry";import{_ as de}from"./filepath-item.vue-neqjm2ct.js";import{p as L,q as S,k as F,J as a,a0 as i,a1 as e,a2 as w,F as f,ah as U,Y as m,a9 as p,u as b,W as d,ac as c,ad as D,ae as I,a5 as E,V as C}from"./vendor/json-editor-vue-linwxbdb.js";import{_ as me}from"./ncode-block.vue-fnl81rsp.js";import{_ as ve}from"./ncheckbox.vue-bh13p6qy.js";import{_ as fe}from"./help-fab.vue-lyrsxykz.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-c1ookmgn.js";import"./client-grni31iy.js";const pe={"h-full":"",grid:"~ rows-[max-content_1fr]"},ce={flex:"~ wrap","w-full":""},xe=["onClick"],ye={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},be={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},ge="/__nuxt_devtools__/client",we=L({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(o){const x=o,z=`${Q().app.baseURL.replace(ge,"/")}/__nuxt_devtools__/analyze/`.replace(/\/+/g,"/"),y=S(()=>{const l=[{name:"Overview",id:"overview"}];return x.current.features.bundleClient&&l.push({name:"Client Bundle",id:"bundle-client"}),x.current.features.bundleNitro&&l.push({name:"Nitro Bundle",id:"bundle-nitro"}),x.current.features.viteInspect&&l.push({name:"Vite Inspect",id:"vite-inspect"}),l}),u=F(y.value[0]);function _(l){return`${((l.endTime-l.startTime)/1e3).toFixed(1)}s`}function v(l){return l<1024?`${l}B`:l<1024*1024?`${(l/1024).toFixed(1)}KB`:l<1024*1024*1024?`${(l/1024/1024).toFixed(1)}MB`:`${(l/1024/1024/1024).toFixed(1)}GB`}async function T(l){return V.clearAnalyzeBuilds(await R(),[l])}return(l,n)=>{const A=de,k=P;return i(),a("div",pe,[e("div",ce,[(i(!0),a(f,null,U(y.value,(r,t)=>(i(),a("button",{key:t,px4:"",py2:"",border:"r base",hover:"bg-active",class:E(r.id===u.value?.id?"":"border-b"),onClick:B=>u.value=r},[e("div",{class:E(r.id===u.value?.id?"":"op30")},p(r.name),3)],10,xe))),128)),n[1]||(n[1]=e("div",{border:"b base","flex-auto":""},null,-1))]),u.value?.id==="overview"?(i(),a("div",ye,[n[15]||(n[15]=e("div",{"flex-auto":""},null,-1)),e("div",be,[n[10]||(n[10]=e("div",{"i-carbon-commit":"","text-xl":""},null,-1)),e("div",null,[n[2]||(n[2]=e("div",{"text-sm":"",op50:""}," Name ",-1)),e("div",null,p(o.current.name),1)]),n[11]||(n[11]=e("div",{"i-carbon-time":"","text-xl":""},null,-1)),e("div",null,[n[3]||(n[3]=e("div",{"text-sm":"",op50:""}," Build duration ",-1)),e("div",null,p(_(o.current)),1)]),o.current.size?.clientBundle?(i(),a(f,{key:0},[n[5]||(n[5]=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1)),e("div",null,[n[4]||(n[4]=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1)),e("div",null,p(v(o.current.size.clientBundle)),1)])],64)):w("",!0),o.current.size?.nitroBundle?(i(),a(f,{key:1},[n[7]||(n[7]=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1)),e("div",null,[n[6]||(n[6]=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1)),e("div",null,p(v(o.current.size.nitroBundle)),1)])],64)):w("",!0),n[12]||(n[12]=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1)),e("div",null,[n[8]||(n[8]=e("div",{"text-sm":"",op50:""}," Built ",-1)),e("div",null,p(b(j)(new Date(o.current.endTime))),1)]),n[13]||(n[13]=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1)),e("div",null,[n[9]||(n[9]=e("div",{"text-sm":"",op50:""}," Report Path ",-1)),m(A,{filepath:o.current.analyzeDir},null,8,["filepath"])])]),n[16]||(n[16]=e("div",{"flex-auto":""},null,-1)),m(k,{n:"rose",icon:"carbon-delete",onClick:n[0]||(n[0]=r=>T(o.current.name))},{default:d(()=>[...n[14]||(n[14]=[c(" Delete this report ",-1)])]),_:1})])):w("",!0),n._lazyshow1||u.value?.id==="bundle-client"?(n._lazyshow1=!0,i(),a(f,null,[D(e("iframe",{src:`${b(z)}${o.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[I,u.value?.id==="bundle-client"]])],64)):w("v-show-if",!0),n._lazyshow2||u.value?.id==="bundle-nitro"?(n._lazyshow2=!0,i(),a(f,null,[D(e("iframe",{src:`${b(z)}${o.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[I,u.value?.id==="bundle-nitro"]])],64)):w("v-show-if",!0),n._lazyshow3||u.value?.id==="vite-inspect"?(n._lazyshow3=!0,i(),a(f,null,[D(e("iframe",{src:`${b(z)}${o.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[I,u.value?.id==="vite-inspect"]])],64)):w("v-show-if",!0)])}}}),$e={class:"markdown-body"},ze={__name:"analyze-build",setup(o,{expose:x}){return x({frontmatter:{}}),(z,y)=>(i(),a("div",$e,[...y[0]||(y[0]=[e("h1",null,"Build Analyze",-1),e("p",null,[c("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"),c(" and present the output data directly in DevTools for easy browsing and comparing.")],-1)])]))}},_e={flex:"~ col"},Be=["onClick"],Ce={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},ke={flex:"~ items-center justify-center wrap",p4:""},Ne={flex:"~ col gap-1","w-250":"",p4:""},Te={flex:"~ gap-3",mt2:"","justify-end":""},Re=L({__name:"analyze-build",setup(o){const x=ae(),$=X(),z=h(),y=ee("analyze-build:slug",""),u=S(()=>$.value?.builds.find(r=>r.slug===y.value)??$.value?.builds[0]),_=F(!1),v=F(""),T=S(()=>$.value?.builds.some(r=>r.name===v.value.trim()));async function l(){v.value=await V.generateAnalyzeBuildName(),await x.start()&&(se("analyze-build:start"),N.value={name:v.value,processId:await V.startAnalyzeBuild(await R(),v.value)},_.value&&k())}const n=ne();function A(r){return`${((r.endTime-r.startTime)/1e3).toFixed(1)}s`}function k(){N.value?.processId&&(n.value=N.value.processId,z.push("/modules/terminals"))}return te(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:l}]),(r,t)=>{const B=P,G=we,q=le,M=ie,O=ue,W=re,Y=me,Z=ve,H=oe,J=ze,K=fe;return i(),a(f,null,[m(M,{"left-size":30},{left:d(()=>[e("div",_e,[(i(!0),a(f,null,U(b($)?.builds,s=>(i(),a(f,{key:s.slug},[e("button",{flex:"~ col gap1",p3:"","hover:bg-active":"",class:E(s.slug===u.value?.slug?"text-primary bg-active":""),onClick:g=>y.value=s.slug},[e("code",null,p(s.name),1),e("div",Ce,[t[4]||(t[4]=e("div",{"i-carbon-time":""},null,-1)),e("span",null,p(A(s)),1),t[5]||(t[5]=e("div",{"flex-auto":""},null,-1)),e("span",null,p(b(j)(new Date(s.endTime))),1)])],10,Be),t[6]||(t[6]=e("div",{"x-divider":""},null,-1))],64))),128)),e("div",ke,[b(N)?(i(),C(B,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:t[1]||(t[1]=s=>k())},{default:d(()=>[...t[8]||(t[8]=[c(" Building... ",-1)])]),_:1})):(i(),C(B,{key:0,n:"primary",icon:"carbon-edge-node",onClick:t[0]||(t[0]=s=>l())},{default:d(()=>[...t[7]||(t[7]=[c(" Start a new build ",-1)])]),_:1}))])])]),right:d(()=>[u.value?(i(),C(G,{key:0,current:u.value},null,8,["current"])):(i(),C(q,{key:1}))]),_:1}),m(b(x),null,{default:d(({resolve:s})=>[m(H,{"model-value":!0,onClose:g=>s(!1)},{default:d(()=>[e("div",Ne,[t[13]||(t[13]=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1)),t[14]||(t[14]=e("p",{op50:""}," Enter the name of the build: ",-1)),m(O,{modelValue:v.value,"onUpdate:modelValue":t[2]||(t[2]=g=>v.value=g),placeholder:"Build name"},null,8,["modelValue"]),T.value?(i(),C(W,{key:0,"n-orange":""},{default:d(()=>[...t[9]||(t[9]=[c(" A build with the same name already exists, continue would overrides the previous build result. ",-1)])]),_:1})):w("",!0),t[15]||(t[15]=e("div",{my3:"","x-divider":""},null,-1)),t[16]||(t[16]=e("p",{op50:""}," The following command will be executed in your terminal: ",-1)),m(Y,{code:`npx nuxi analyze --no-serve --name=${v.value}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),m(Z,{modelValue:_.value,"onUpdate:modelValue":t[3]||(t[3]=g=>_.value=g),mt2:"",n:"primary"},{default:d(()=>[...t[10]||(t[10]=[c(" Navigate to terminal ",-1)])]),_:1},8,["modelValue"]),e("div",Te,[m(B,{onClick:g=>s(!1)},{default:d(()=>[...t[11]||(t[11]=[c(" Cancel ",-1)])]),_:1},8,["onClick"]),m(B,{n:"solid primary",onClick:g=>s(!0)},{default:d(()=>[...t[12]||(t[12]=[c(" Start ",-1)])]),_:1},8,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),m(K,null,{default:d(()=>[m(J)]),_:1})],64)}}});export{Re as default};
@@ -0,0 +1,16 @@
1
+ import{G as Z,H as ee,_ as te,I as ne,J as O,K as ce,L as pe,M as me,r as W,E as X,v as ae,N as ve,O as fe,c as le,A as ge,a as xe,w as he,P as be,Q as we,R as ye,S as _e,T as $e,g as ke,U as Ce}from"#entry";import{_ as Ve}from"./ncheckbox.vue-bh13p6qy.js";import{_ as Pe}from"./ndropdown.vue-cclblmxb.js";import{_ as Ae}from"./nnavbar.vue-nldppm6i.js";import{p as J,k as j,aj as oe,J as i,a0 as o,a5 as H,u as m,ad as K,Y as d,a1 as t,ac as A,F as L,ah as G,V,a2 as S,W as h,q as U,a3 as se,a9 as D,X as De,j as Ne,au as Fe,a4 as Se}from"./vendor/json-editor-vue-linwxbdb.js";import{_ as Ue}from"./nsection-block-ld7dxama.js";import{_ as Ie}from"./filepath-item.vue-neqjm2ct.js";import{_ as je}from"./code-snippets.vue-c07ituis.js";import{_ as Te}from"./ndrawer.vue-hcqgn10u.js";import{D as Ee}from"./constants-b32h69zq.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-c1ookmgn.js";import"./nicon-title.vue-c7m4gyag.js";import"./ncode-block.vue-fnl81rsp.js";import"./client-grni31iy.js";const Be={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},Le={for:"drop-zone-input","text-3xl":"",hover:"text-green cursor-pointer","transition-all":""},ze={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},Oe={grid:"~ cols-minmax-8rem gap-8","overflow-auto":"",p6:""},Re={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},Me=["src"],Ke={flex:"~ gap1","items-center":""},qe={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Ge=J({__name:"AssetDropZone",props:{modelValue:{type:Boolean,required:!0},folder:{type:String,required:!0}},setup(l){const g=l,f=ee(g,"modelValue"),N=j(),n=j([]);function v(a){N.value=a.target,f.value=!0}function w(a){a.target===N.value&&(f.value=!1)}function T(a){a.preventDefault()}function M(a){a.preventDefault(),b(a.dataTransfer.files)}function b(a){const c=Array.from(a||[]);if(c.length){const x=[],_=n.value.map(u=>u.name);for(const u of c)if(_.includes(u.name)){let P=1;const[$,B]=u.name.split(".");for(;_.includes(`${$} (${P}).${B}`);)P++;const R=`${$}-${P}.${B}`,s=new Blob([u],{type:u.type}),e=new File([s],R,{lastModified:Date.now()});x.push(e),_.push(R)}else u.type===""&&O({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}),x.push(u);n.value=[...n.value,...x]}}async function E(){if(ce.value||pe.value)return;me("assets:upload");const a=[];for(const c of n.value){const x=new FileReader;x.readAsDataURL(c);const u=(await new Promise(P=>{x.onload=()=>P(x.result)})).split(";base64,").pop();a.push({path:c.name,encoding:"base64",content:u})}await W.writeStaticAssets(await X(),[...a],g.folder).then(()=>{p(),O({message:"Files uploaded successfully!",icon:"i-carbon:checkmark"})}).catch(c=>{p(),O({message:`Error uploading files: ${c?.message??"unknown"}`,icon:"i-carbon-warning",classes:"text-red"})}),f.value=!1}function q(a){n.value?.splice(a,1)}function z(a){return URL.createObjectURL(a)}function y(a,c){const[x,_]=a.name.split("."),u=c.replace(/\.\w+$/,""),P=`${u}.${_}`;return u.length===0?(alert("File name must be at least 1 characters long"),x):(Object.defineProperty(a,"name",{value:P,writable:!1}),n.value.splice(n.value.indexOf(a),1,a),a)}function r(){n.value=[]}function p(){f.value=!1,r()}return Z("dragenter",v),Z("dragleave",w),Z("dragover",T),Z("drop",M),(a,c)=>{const x=te,_=ne,u=ae,P=oe("tooltip");return o(),i("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:H(m(f)?"opacity-100 visible":"opacity-0 invisible")},[K(d(x,{icon:"carbon-close",title:"Close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",border:!1,onClick:p},null,512),[[P,"Close",void 0,{"bottom-end":!0}]]),n.value?.length?(o(),i("div",ze,[c[4]||(c[4]=t("div",{px6:"",py6:""},[t("h1",{"text-2xl":""}," Upload "),t("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1)),t("div",Oe,[(o(!0),i(L,null,G(n.value,($,B)=>(o(),i("div",{key:$.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[t("div",Re,[t("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:z($)},null,8,Me)]),t("div",Ke,[d(u,{n:"xs","h-full":"","flex-auto":"","model-value":$.name,"onUpdate:modelValue":R=>y($,R.target.value)},null,8,["model-value","onUpdate:modelValue"]),d(x,{n:"red",icon:"carbon-trash-can","h-full":"","flex-none":"",title:"Remove file",onClick:R=>q(B)},null,8,["onClick"])])]))),128))]),t("div",qe,[n.value.length?(o(),V(x,{key:0,n:"red",onClick:r},{default:h(()=>[d(_,{icon:"carbon-clean"}),c[2]||(c[2]=A(" Clear ",-1))]),_:1})):S("",!0),d(x,{disabled:!n.value.length,n:"primary solid",onClick:E},{default:h(()=>[d(_,{icon:"carbon-cloud-upload"}),c[3]||(c[3]=A(" Upload ",-1))]),_:1},8,["disabled"])])])):(o(),i("div",Be,[t("label",Le,[d(_,{icon:"carbon-cloud-upload","mr-2":""}),c[1]||(c[1]=A(" Drop files here or click to select ",-1))]),t("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:c[0]||(c[0]=$=>b($.target.files))},null,32)]))],2)}}}),Je=J({__name:"AssetFontPreview",props:{asset:{}},setup(l){const g=l,f=U(()=>`devtools-assets-${ve(g.asset)}`);return fe(U(()=>`
2
+ @font-face {
3
+ font-family: '${f.value}';
4
+ src: url('${g.asset.publicPath}');
5
+ }
6
+ `)),(N,n)=>(o(),i("div",{"of-hidden":"",style:se({fontFamily:`'${f.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))}}),We={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},Xe=["src"],Ze={key:2,"i-carbon-document":"","text-3xl":"",op20:""},He={key:3,"w-full":"","self-start":"",p4:""},Qe=["textContent"],Ye={key:4},et=["src","autoplay","controls"],tt={key:5},nt={key:0,"i-carbon-volume-up":"","text-3xl":"",op20:""},ot=["src"],lt={key:6,"i-carbon-help":"","text-3xl":"",op20:""},ie=J({__name:"AssetPreview",props:{asset:{},textContent:{},detail:{type:Boolean}},setup(l){return(g,f)=>{const N=Je;return o(),i("div",We,[l.asset.type==="image"?(o(),i("img",{key:0,src:l.asset.publicPath},null,8,Xe)):l.asset.type==="font"?(o(),V(N,{key:l.asset.publicPath,asset:l.asset,"self-stretch":"",p2:"","text-2xl":""},null,8,["asset"])):l.asset.type==="text"&&!l.textContent?(o(),i("div",Ze)):l.asset.type==="text"&&l.textContent?(o(),i("div",He,[t("pre",{"max-h-10rem":"","of-hidden":"","text-xs":"","font-mono":"",textContent:D(l.textContent)},null,8,Qe)])):l.asset.type==="video"?(o(),i("div",Ye,[t("video",{src:l.asset.publicPath,autoplay:l.detail,controls:l.detail},null,8,et)])):l.asset.type==="audio"?(o(),i("div",tt,[l.detail?(o(),i("audio",{key:1,src:l.asset.publicPath,controls:""},null,8,ot)):(o(),i("div",nt))])):(o(),i("div",lt))])}}}),at={relative:"",flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},st={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},it=J({__name:"AssetGridItem",props:{asset:{},folder:{}},setup(l){const g=l,f=U(()=>g.folder&&g.asset.path.startsWith(g.folder)?g.asset.path.slice(g.folder.length):g.asset.path);return(N,n)=>{const v=ne,w=ie;return o(),i("button",at,[l.asset.layer?(o(),V(v,{key:0,icon:"i-carbon-layers",absolute:"","right-4":"","top-4":"","bg-primary":""})):S("",!0),d(w,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:l.asset},null,8,["asset"]),t("div",st,D(f.value),1)])}}}),re=J({__name:"AssetListItem",props:{item:{},index:{default:0},modelValue:{}},setup(l,{emit:g}){const f=l,n=ee(f,"modelValue",g,{passive:!0}),v=U(()=>f.item?.children?.length),w=j(!0),T=U(()=>v.value?"i-carbon-folder":f.item.type==="image"?"i-carbon-image":f.item.type==="video"?"i-carbon-video":f.item.type==="audio"?"i-carbon-volume-up":f.item.type==="font"?"i-carbon-text-small-caps":f.item.type==="text"?"i-carbon-document":f.item.type==="json"?"i-carbon-json":"i-carbon-document-blank");return(M,b)=>{const E=ne,q=re;return o(),i("div",null,[t("button",{flex:"~ gap-2","w-full":"","items-center":"",hover:"bg-active",px4:"",py1:"",style:se({paddingLeft:`calc(1rem + ${l.index*1.5}em)`}),class:H({"bg-active":!v.value&&m(n)?.filePath===l.item?.filePath}),border:"b base",onClick:b[0]||(b[0]=z=>v.value?w.value=!w.value:n.value=l.item)},[t("div",{class:H(T.value)},null,2),t("span",{class:H({"flex items-center":v.value}),"flex-auto":"","text-start":"","text-sm":"","font-mono":""},[A(D(l.item.path)+" ",1),l.item.layer?(o(),V(E,{key:0,icon:"i-carbon-layers","bg-primary":""})):S("",!0)],2),v.value?(o(),V(E,{key:0,icon:"carbon:chevron-right","transform-rotate":w.value?90:0,transition:""},null,8,["transform-rotate"])):S("",!0)],6),w.value?De(M.$slots,"default",{key:0},()=>[(o(!0),i(L,null,G(l.item?.children,z=>(o(),V(q,{key:z.filepath,modelValue:m(n),"onUpdate:modelValue":b[1]||(b[1]=y=>Ne(n)?n.value=y:null),item:z,index:l.index+1},null,8,["modelValue","item","index"]))),128))]):S("",!0)])}}}),rt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},ut={flex:"~","items-center":"","justify-center":""},dt={"max-w-full":"","w-full":"","table-fixed":""},ct={flex:"~ gap-1","w-full":"","items-center":""},pt={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},mt={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},vt={capitalize:""},ft={key:0},gt={op70:""},xt={flex:"~ gap2 wrap"},ht={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},bt={flex:"~ gap2 wrap justify-center"},wt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},yt={flex:"~ gap2 wrap justify-center"},_t={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},$t={flex:"","justify-end":"","gap-4":""},kt=J({__name:"AssetDetails",props:{modelValue:{}},setup(l,{emit:g}){const n=ee(l,"modelValue",g,{passive:!0}),v=le(async()=>{if(n.value.type==="image")return W.getImageMeta(await X(),n.value.filePath)}),w=j(!1),T=j(),M=j(0),b=le(async()=>{if(n.value.type!=="text")return;M.value;const s=await W.getTextAssetContent(await X(),n.value.filePath);return T.value=s,s});async function E(){if(b.value!==T.value)try{await W.writeStaticAssets(await X(),[{path:n.value.path,content:T.value,override:!0}],""),w.value=!1,M.value++,O({message:"Updated",icon:"i-carbon-checkmark",classes:"text-green"})}catch(s){console.error(s),O({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const q=ge(),z=U(()=>(q.value?._installedModules||[]).some(e=>e.meta?.name==="@nuxt/image"||e.meta?.name==="@nuxt/image-edge"||e.meta?.name==="@nuxt/image-nightly")),y=U(()=>{const s=[];if(n.value.type==="image"){const e=v.value?.width?`
7
+ width="${v.value.width}"
8
+ height="${v.value.height}" `:" ";return s.push({lang:"vue-html",code:`<img${e}
9
+ src="${n.value.publicPath}"
10
+ />`,name:"Plain Image"}),z.value&&s.push({lang:"vue-html",code:`<NuxtImg${e}
11
+ src="${n.value.publicPath}"
12
+ />`,name:"Nuxt Img",docs:"https://image.nuxt.com/usage/nuxt-img"},{lang:"vue-html",code:`<NuxtPicture${e}
13
+ src="${n.value.publicPath}"
14
+ />`,name:"Nuxt Picture",docs:"https://image.nuxt.com/usage/nuxt-picture"}),s}return s.push({lang:"html",code:`<a download href="${n.value.publicPath}">
15
+ Download ${n.value.path.split("/").slice(-1)[0]}
16
+ </a>`,name:"Download link"}),s}),r=xe(),p=he(),a=be(()=>n.value.mtime),c=U(()=>{const s=n.value.size;return s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(2)} KB`:`${(s/1024/1024).toFixed(2)} MB`}),x=U(()=>{if(!v.value?.width||!v.value?.height)return"";const s=(k,I)=>I?s(I,k%I):k,e=s(v.value.width,v.value.height);return e>3?`${v.value.width/e}:${v.value.height/e}`:""}),_=U(()=>["image","text","video","audio","font"].includes(n.value.type)),u=j(!1);async function P(){try{await W.deleteStaticAsset(await X(),n.value.filePath),n.value=void 0,u.value=!1,O({message:"Asset deleted",icon:"i-carbon-checkmark",classes:"text-green"})}catch(s){console.error(s),O({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const $=j(!1),B=j("");async function R(){const s=n.value.filePath.split("/"),e=s.slice(-1)[0].split(".").slice(0,-1).join(".");if(!B.value||B.value===e)return O({message:"Please enter a new name",icon:"i-carbon-warning",classes:"text-orange"});try{const k=s.slice(-1)[0].split(".").slice(-1)[0],I=`${s.slice(0,-1).join("/")}/${B.value}.${k}`;await W.renameStaticAsset(await X(),n.value.filePath,I),n.value=void 0,$.value=!1,O({message:"Asset renamed",icon:"i-carbon-checkmark",classes:"text-green"})}catch(k){console.error(k),O({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}return(s,e)=>{const k=ie,I=Ie,F=te,ue=je,Q=we,de=ae,Y=oe("tooltip");return o(),i(L,null,[t("div",rt,[_.value?(o(),i(L,{key:0},[e[13]||(e[13]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Preview "),t("div",{"x-divider":""})],-1)),t("div",ut,[d(k,{detail:"","max-h-80":"","min-h-20":"","min-w-20":"","w-auto":"",rounded:"",border:"~ base",asset:m(n),"text-content":m(b)},null,8,["asset","text-content"])])],64)):S("",!0),e[25]||(e[25]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Details "),t("div",{"x-divider":""})],-1)),t("table",dt,[t("tbody",null,[t("tr",null,[e[14]||(e[14]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1)),t("td",null,[t("div",ct,[d(I,{filepath:m(n).filePath,"text-left":""},null,8,["filepath"]),K(d(F,{"flex-none":"",title:"Open in Editor",icon:"carbon-launch",border:!1,onClick:e[0]||(e[0]=C=>m(p)(m(n).filePath))},null,512),[[Y,"Open in Editor"]])])])]),t("tr",null,[e[15]||(e[15]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1)),t("td",null,[t("div",pt,[t("div",mt,D(m(n).publicPath),1),K(d(F,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",border:!1,onClick:e[1]||(e[1]=C=>m(r)(m(n).publicPath,"assets-public-path"))},null,512),[[Y,"Copy public path"]]),K(d(F,{"flex-none":"",to:m(n).publicPath,icon:"carbon-launch",target:"_blank",border:!1,title:"Open in browser"},null,8,["to"]),[[Y,"Open in browser"]])])])]),t("tr",null,[e[16]||(e[16]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1)),t("td",vt,D(m(n).type),1)]),m(v)?.width?(o(),i(L,{key:0},[t("tr",null,[e[17]||(e[17]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1)),t("td",null,D(m(v).width)+" x "+D(m(v).height),1)]),x.value?(o(),i("tr",ft,[e[18]||(e[18]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1)),t("td",null,D(x.value),1)])):S("",!0)],64)):S("",!0),t("tr",null,[e[19]||(e[19]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1)),t("td",null,D(c.value),1)]),t("tr",null,[e[20]||(e[20]=t("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1)),t("td",null,[A(D(new Date(m(n).mtime).toLocaleString())+" ",1),t("span",gt,"("+D(m(a))+")",1)])])])]),e[26]||(e[26]=t("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[t("div",{"x-divider":""}),t("div",{"flex-none":""}," Actions "),t("div",{"x-divider":""})],-1)),t("div",xt,[d(F,{to:m(n).publicPath,download:"",target:"_blank",icon:"carbon-download",n:"green"},{default:h(()=>[...e[21]||(e[21]=[A(" Download ",-1)])]),_:1},8,["to"]),m(n).type==="text"?(o(),V(F,{key:0,icon:"carbon-edit",n:"cyan",onClick:e[2]||(e[2]=C=>w.value=!w.value)},{default:h(()=>[...e[22]||(e[22]=[A(" Edit ",-1)])]),_:1})):S("",!0),d(F,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:e[3]||(e[3]=C=>$.value=!$.value)},{default:h(()=>[...e[23]||(e[23]=[A(" Rename ",-1)])]),_:1}),d(F,{icon:"carbon-delete",n:"red",onClick:e[4]||(e[4]=C=>u.value=!u.value)},{default:h(()=>[...e[24]||(e[24]=[A(" Delete ",-1)])]),_:1})]),e[27]||(e[27]=t("div",{"flex-auto":""},null,-1)),y.value.length?(o(),V(ue,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":y.value},null,8,["code-snippets"])):S("",!0)]),d(Q,{modelValue:u.value,"onUpdate:modelValue":e[6]||(e[6]=C=>u.value=C)},{default:h(()=>[t("div",ht,[e[30]||(e[30]=t("span",null," Are you sure you want to delete this asset? ",-1)),t("div",bt,[d(F,{icon:"carbon-close",onClick:e[5]||(e[5]=C=>u.value=!1)},{default:h(()=>[...e[28]||(e[28]=[A(" Cancel ",-1)])]),_:1}),d(F,{icon:"carbon-delete",n:"red",onClick:P},{default:h(()=>[...e[29]||(e[29]=[A(" Delete ",-1)])]),_:1})])])]),_:1},8,["modelValue"]),d(Q,{modelValue:$.value,"onUpdate:modelValue":e[9]||(e[9]=C=>$.value=C)},{default:h(()=>[t("div",wt,[d(de,{modelValue:B.value,"onUpdate:modelValue":e[7]||(e[7]=C=>B.value=C),placeholder:"New name",n:"blue"},null,8,["modelValue"]),t("div",yt,[d(F,{icon:"carbon-close",onClick:e[8]||(e[8]=C=>$.value=!1)},{default:h(()=>[...e[31]||(e[31]=[A(" Cancel ",-1)])]),_:1}),d(F,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:R},{default:h(()=>[...e[32]||(e[32]=[A(" Rename ",-1)])]),_:1})])])]),_:1},8,["modelValue"]),m(n).type==="text"?(o(),V(Q,{key:0,modelValue:w.value,"onUpdate:modelValue":e[12]||(e[12]=C=>w.value=C)},{default:h(()=>[t("div",_t,[K(t("textarea",{"onUpdate:modelValue":e[10]||(e[10]=C=>T.value=C),placeholder:"Item value...",class:"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none",onKeydown:Se(E,["enter"])},null,544),[[Fe,T.value]]),t("div",$t,[d(F,{icon:"carbon-close",onClick:e[11]||(e[11]=C=>w.value=!1)},{default:h(()=>[...e[33]||(e[33]=[A(" Cancel ",-1)])]),_:1}),d(F,{icon:"carbon:save",n:"primary",onClick:E},{default:h(()=>[...e[34]||(e[34]=[A(" save ",-1)])]),_:1})])])]),_:1},8,["modelValue"])):S("",!0)],64)}}}),Ct={"h-full":"","of-auto":""},Vt={"flex-none":"",flex:"~ gap2 items-center","text-lg":""},Pt={flex:"~ items-center justify-center",absolute:"","bottom--1":"","right--1":"","h-4":"","w-4":"","rounded-full":"","bg-primary:30":"","text-8px":""},At={flex:"~ col","w-30":"","of-auto":""},Dt={"text-xs":"",op75:""},Nt={op50:""},Ft={key:0},St={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},Ut={key:1,p2:"",grid:"~ cols-minmax-8rem"},It={key:1},Zt=J({__name:"assets",setup(l){const g=ye(),f=j(!1),N=j(""),n=U(()=>new _e(g.value||[],{keys:["path"]})),v=$e(()=>{const y=[];for(const r of g.value||[]){const p=r.path.split(".").pop();p&&!y.find(a=>a.name===p)&&y.push({name:p,value:!0})}return y}),w=U(()=>(N.value?n.value.search(N.value).map(r=>r.item):g.value||[]).filter(r=>{const p=r.path.split(".").pop();return!p||v.some(a=>a.name===p&&a.value)})),T=U(()=>{const y={};for(const r of w.value){const p=`${r.path.split("/").slice(0,-1).join("/")}/`;y[p]||(y[p]=[]),y[p].push(r)}return Object.entries(y).sort(([r],[p])=>r.localeCompare(p))}),M=U(()=>{const y={children:[]},r=(p,a,c)=>{const[x,..._]=a;let u=p.children.find(P=>P.path===x);u||(u={...c,path:x,children:[]},p.children.push(u)),_.length>1?r(u,_,c):_.length===1&&u.children.push({...c,path:_[0]})};return w.value.forEach(p=>{const a=p.path.split("/").filter(c=>c!=="");r(y,a,p)}),y.children}),b=j(),{view:E}=ke("assets");function q(){E.value=E.value==="list"?"grid":"list"}Ce("Escape",()=>{b.value=void 0});const z=j();return(y,r)=>{const p=te,a=Ve,c=Pe,x=Ae,_=Ge,u=it,P=Ue,$=re,B=kt,R=Te,s=oe("tooltip");return o(),i("div",Ct,[d(x,{ref_key:"navbar",ref:z,search:N.value,"onUpdate:search":r[1]||(r[1]=e=>N.value=e),pb2:""},{actions:h(()=>[t("div",Vt,[K(d(p,{icon:"carbon:cloud-upload",title:"File Upload",border:!1,onClick:r[0]||(r[0]=e=>f.value=!f.value)},null,512),[[s,"File Upload",void 0,{"bottom-end":!0}]]),m(v).length?(o(),V(c,{key:0,direction:"end",n:"sm primary"},{trigger:h(({click:e})=>[K(d(p,{icon:"carbon-filter",border:!1,title:"Filter",p3:"","text-lg":"",onClick:k=>e()},null,8,["onClick"]),[[s,"Filter",void 0,{"bottom-end":!0}]]),t("span",Pt,D(m(v).length),1)]),default:h(()=>[t("div",At,[(o(!0),i(L,null,G(m(v),e=>(o(),V(a,{key:e.name,modelValue:e.value,"onUpdate:modelValue":k=>e.value=k,flex:"~ gap-2",rounded:"",px2:"",py2:""},{default:h(()=>[t("span",Dt,D(e.name),1)]),_:2},1032,["modelValue","onUpdate:modelValue"]))),128))])]),_:1})):S("",!0),K(d(p,{"text-lg":"",border:!1,icon:m(E)==="grid"?"i-carbon-list":"i-carbon-grid",title:"Toggle view",onClick:q},null,8,["icon"]),[[s,"Toggle View",void 0,{"bottom-end":!0}]])])]),default:h(()=>[t("div",Nt,[N.value?(o(),i("span",Ft,D(w.value.length)+" matched · ",1)):S("",!0),t("span",null,D(m(g)?.length)+" assets in total",1)])]),_:1},8,["search"]),d(_,{modelValue:f.value,"onUpdate:modelValue":r[2]||(r[2]=e=>f.value=e),folder:"/"},null,8,["modelValue"]),m(E)==="grid"?(o(),i(L,{key:0},[T.value.length>1?(o(!0),i(L,{key:0},G(T.value,([e,k])=>(o(),V(P,{key:e,text:e,description:`${k.length} items`,open:k.length<=m(Ee),padding:!1},{default:h(()=>[t("div",St,[(o(!0),i(L,null,G(k,I=>(o(),V(u,{key:I.path,asset:I,folder:e,onClick:F=>b.value=I},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(o(),i("div",Ut,[(o(!0),i(L,null,G(w.value,e=>(o(),V(u,{key:e.path,asset:e,onClick:k=>b.value=e},null,8,["asset","onClick"]))),128))]))],64)):(o(),i("div",It,[(o(!0),i(L,null,G(M.value,(e,k)=>(o(),V($,{key:k,modelValue:b.value,"onUpdate:modelValue":r[3]||(r[3]=I=>b.value=I),item:e},null,8,["modelValue","item"]))),128))])),d(R,{"model-value":!!b.value,"auto-close":"","w-120":"",top:z.value,onClose:r[5]||(r[5]=e=>b.value=void 0)},{default:h(()=>[b.value?(o(),V(B,{key:0,modelValue:b.value,"onUpdate:modelValue":r[4]||(r[4]=e=>b.value=e)},null,8,["modelValue"])):S("",!0)]),_:1},8,["model-value","top"])])}}});export{Zt as default};
@@ -1 +1 @@
1
- {"id":"66686ce5-d9fb-4644-8217-9527ecb94af7","timestamp":1758311754090}
1
+ {"id":"d81a82cc-1641-42f4-8236-01d5f57535e9","timestamp":1761515285558}
@@ -0,0 +1 @@
1
+ {"id":"d81a82cc-1641-42f4-8236-01d5f57535e9","timestamp":1761515285558,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
@@ -1 +1 @@
1
- import{n as f,O as r}from"./vendor/json-editor-vue-nstwj98r.js";let e;const n=[];function s(i){if(n.push(i),!(typeof window>"u"))return window.__NUXT_DEVTOOLS__&&n.forEach(o=>o(window.__NUXT_DEVTOOLS__)),Object.defineProperty(window,"__NUXT_DEVTOOLS__",{set(o){o&&n.forEach(t=>t(o))},get(){return e.value},configurable:!0}),()=>{n.splice(n.indexOf(i),1)}}function u(){e||(e=f(),s(o));function i(){e&&r(e)}function o(t){e.value=t,t.host&&t.host.hooks.hook("host:update:reactivity",i)}return e}const c=u();export{c as d};
1
+ import{n as f,P as r}from"./vendor/json-editor-vue-linwxbdb.js";let e;const n=[];function s(i){if(n.push(i),!(typeof window>"u"))return window.__NUXT_DEVTOOLS__&&n.forEach(o=>o(window.__NUXT_DEVTOOLS__)),Object.defineProperty(window,"__NUXT_DEVTOOLS__",{set(o){o&&n.forEach(t=>t(o))},get(){return e.value},configurable:!0}),()=>{n.splice(n.indexOf(i),1)}}function u(){e||(e=f(),s(o));function i(){e&&r(e)}function o(t){e.value=t,t.host&&t.host.hooks.hook("host:update:reactivity",i)}return e}const c=u();export{c as d};
@@ -0,0 +1,8 @@
1
+ import{_ as k}from"./ncode-block.vue-fnl81rsp.js";import{ao as D}from"#entry";import{p as I,q as T,k as j,E as y,V as q,a0 as M}from"./vendor/json-editor-vue-linwxbdb.js";class V{diff(e,t,n={}){let o;typeof n=="function"?(o=n,n={}):"callback"in n&&(o=n.callback);const c=this.castInput(e,n),u=this.castInput(t,n),l=this.removeEmpty(this.tokenize(c,n)),s=this.removeEmpty(this.tokenize(u,n));return this.diffWithOptionsObj(l,s,n,o)}diffWithOptionsObj(e,t,n,o){var c;const u=d=>{if(d=this.postProcess(d,n),o){setTimeout(function(){o(d)},0);return}else return d},l=t.length,s=e.length;let r=1,i=l+s;n.maxEditLength!=null&&(i=Math.min(i,n.maxEditLength));const p=(c=n.timeout)!==null&&c!==void 0?c:1/0,f=Date.now()+p,a=[{oldPos:-1,lastComponent:void 0}];let h=this.extractCommon(a[0],t,e,0,n);if(a[0].oldPos+1>=s&&h+1>=l)return u(this.buildValues(a[0].lastComponent,t,e));let g=-1/0,w=1/0;const x=()=>{for(let d=Math.max(g,-r);d<=Math.min(w,r);d+=2){let C;const P=a[d-1],v=a[d+1];P&&(a[d-1]=void 0);let L=!1;if(v){const _=v.oldPos-d;L=v&&0<=_&&_<l}const E=P&&P.oldPos+1<s;if(!L&&!E){a[d]=void 0;continue}if(!E||L&&P.oldPos<v.oldPos?C=this.addToPath(v,!0,!1,0,n):C=this.addToPath(P,!1,!0,1,n),h=this.extractCommon(C,t,e,d,n),C.oldPos+1>=s&&h+1>=l)return u(this.buildValues(C.lastComponent,t,e))||!0;a[d]=C,C.oldPos+1>=s&&(w=Math.min(w,d-1)),h+1>=l&&(g=Math.max(g,d+1))}r++};if(o)(function d(){setTimeout(function(){if(r>i||Date.now()>f)return o(void 0);x()||d()},0)})();else for(;r<=i&&Date.now()<=f;){const d=x();if(d)return d}}addToPath(e,t,n,o,c){const u=e.lastComponent;return u&&!c.oneChangePerToken&&u.added===t&&u.removed===n?{oldPos:e.oldPos+o,lastComponent:{count:u.count+1,added:t,removed:n,previousComponent:u.previousComponent}}:{oldPos:e.oldPos+o,lastComponent:{count:1,added:t,removed:n,previousComponent:u}}}extractCommon(e,t,n,o,c){const u=t.length,l=n.length;let s=e.oldPos,r=s-o,i=0;for(;r+1<u&&s+1<l&&this.equals(n[s+1],t[r+1],c);)r++,s++,i++,c.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return i&&!c.oneChangePerToken&&(e.lastComponent={count:i,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,r}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){const t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){const o=[];let c;for(;e;)o.push(e),c=e.previousComponent,delete e.previousComponent,e=c;o.reverse();const u=o.length;let l=0,s=0,r=0;for(;l<u;l++){const i=o[l];if(i.removed)i.value=this.join(n.slice(r,r+i.count)),r+=i.count;else{if(!i.added&&this.useLongestToken){let p=t.slice(s,s+i.count);p=p.map(function(f,a){const h=n[r+a];return h.length>f.length?h:f}),i.value=this.join(p)}else i.value=this.join(t.slice(s,s+i.count));s+=i.count,i.added||(r+=i.count)}}return o}}class z extends V{constructor(){super(...arguments),this.tokenize=N}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
2
+ `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
3
+ `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
4
+ `)&&(e=e.slice(0,-1)),t.endsWith(`
5
+ `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}}const A=new z;function W(m,e,t){return A.diff(m,e,t)}function N(m,e){e.stripTrailingCr&&(m=m.replace(/\r\n/g,`
6
+ `));const t=[],n=m.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(let o=0;o<n.length;o++){const c=n[o];o%2&&!e.newlineIsToken?t[t.length-1]+=c:t.push(c)}return t}const B=I({__name:"CodeDiff",props:{from:{},to:{},lang:{}},setup(m){const e=m;function t(l,s){const r=W(l.trim(),s.trim()),i=[],p=[],f=[];for(const a of r){const h=a.value.trimEnd().split(`
7
+ `);for(const g of h)a.added?(i.push(f.length),f.push(g)):(a.removed&&p.push(f.length),f.push(g))}return{added:i,removed:p,result:f.join(`
8
+ `)}}const n=T(()=>t(e.from,e.to));function o(l){let s=0;return l.replace(/class="shiki/,'class="shiki diff').replace(/class="line"/g,r=>(s++,n.value.added.includes(s-1)?'class="line line-added"':n.value.removed.includes(s-1)?'class="line line-removed"':r))}const c=j();y(u);function u(){const l=D(c);l&&l.querySelector(".line-added,.line-removed")?.scrollIntoView()}return(l,s)=>{const r=k;return M(),q(r,{ref_key:"elRef",ref:c,code:n.value.result,lang:m.lang,"transform-rendered":o,onLoaded:u},null,8,["code","lang"])}}});export{B as _};
@@ -0,0 +1 @@
1
+ import{_ as y}from"./ncode-block.vue-fnl81rsp.js";import{a as g,_ as x}from"#entry";import{p as C,n as S,q as w,w as B,J as s,a2 as r,a0 as a,a1 as l,F as d,ah as N,a5 as i,a9 as V,Y as u,V as $,W as v,ac as m,u as h}from"./vendor/json-editor-vue-linwxbdb.js";const T={key:0,relative:"","n-code-block":""},D={flex:"~ wrap","w-full":""},E=["onClick"],F={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},W=C({__name:"CodeSnippets",props:{codeSnippets:{},eventType:{}},setup(n){const c=n,e=S(c.codeSnippets[0]),f=g(),_=w(()=>e.value?.lang||"text");return B(()=>{c.codeSnippets.includes(e.value)||(e.value=c.codeSnippets[0])}),(L,o)=>{const b=y,p=x;return n.codeSnippets.length?(a(),s("div",T,[l("div",D,[(a(!0),s(d,null,N(n.codeSnippets,(t,k)=>(a(),s("button",{key:k,px4:"",py2:"",border:"r base",hover:"bg-active",class:i(t===e.value?"":"border-b"),onClick:q=>e.value=t},[l("div",{class:i(t===e.value?"":"op30"),"font-mono":""},V(t.name),3)],10,E))),128)),o[1]||(o[1]=l("div",{border:"b base","flex-auto":""},null,-1))]),e.value?(a(),s(d,{key:0},[u(b,{code:e.value.code,lang:_.value,lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),l("div",F,[u(p,{icon:"carbon-copy",onClick:o[0]||(o[0]=t=>h(f)(e.value.code,n.eventType||`code-snippet-${e.value.name}`))},{default:v(()=>[...o[2]||(o[2]=[m(" Copy ",-1)])]),_:1}),e.value?.docs?(a(),$(p,{key:0,to:e.value.docs,target:"_blank",icon:"carbon-catalog"},{default:v(()=>[...o[3]||(o[3]=[m(" Docs ",-1)])]),_:1},8,["to"])):r("",!0)])],64)):r("",!0)])):r("",!0)}}});export{W as _};
@@ -0,0 +1 @@
1
+ import{a as ue,_ as X,a4 as pe,aq as re,A as ce,B as me,g as J,ar as de,n as fe,as as ve,S as he,Y as ge,W as be,I as _e,f as xe}from"#entry";import{J as r,a0 as t,a1 as n,p as G,q as P,ac as E,a9 as O,a2 as _,X as j,Y as p,V as b,W as m,u as V,F as B,ah as M,k as F,n as ye,E as we,x as ke,j as z,$ as Ce,a5 as Ne,Z as W,aj as $e,ad as Y,ag as Ve}from"./vendor/json-editor-vue-linwxbdb.js";import{_ as De}from"./help-fab.vue-lyrsxykz.js";import{_ as Pe}from"./ncheckbox.vue-bh13p6qy.js";import{_ as Z}from"./nnavbar.vue-nldppm6i.js";import{p as K}from"./index-jc4yj4to.js";import{_ as Q}from"./nbadge-h7alls7b.js";import{_ as ee}from"./filepath-item.vue-neqjm2ct.js";import{_ as Se}from"./ndrawer.vue-hcqgn10u.js";import{D as Le,N as Be}from"./vendor/vis-bs03k74b.js";import{_ as Ie}from"./nselect-tabs.vue-g78ecijz.js";import{_ as Te}from"./nsection-block-ld7dxama.js";import{_ as Me}from"./nicon-title.vue-c7m4gyag.js";import{D as H}from"./constants-b32h69zq.js";import{u as Ue,a as Fe}from"./state-components-k1rzq61q.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-c1ookmgn.js";const Ge={class:"markdown-body"},Ae={__name:"components",setup(s,{expose:l}){return l({frontmatter:{}}),(x,d)=>(t(),r("div",Ge,[...d[0]||(d[0]=[n("h1",null,"Components",-1),n("p",null,"Vue Components allow us to split the UI into independent and reusable pieces, and think about each piece in isolation. This is very similar to how we nest native HTML elements, but Vue implements its own component model that allow us to encapsulate custom content and logic in each component.",-1),n("p",null,"Components placed in the components/ directory are automatically registered by Nuxt. They can be used in your templates without importing them.",-1),n("p",null,[n("a",{href:"https://nuxt.com/docs/guide/directory-structure/components",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])]))}},Re={"text-sm":"","font-mono":""},ne=G({__name:"ComponentName",props:{component:{}},setup(s){const l=s,v=P(()=>l.component.pascalName||K(l.component.name||l.component.__name||l.component.kebabName||""));return(x,d)=>(t(),r("code",Re,[d[0]||(d[0]=n("span",{mr1:"",op20:""},"<",-1)),E(O(v.value),1),d[1]||(d[1]=n("span",{ml1:"",op20:""},"/>",-1))]))}}),ze={flex:"~ col gap1","items-start":"","of-hidden":""},Ee={flex:"~ gap2 items-center",px3:""},We={px3:"",pb2:""},Oe={key:0,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},je={"text-sm":""},qe={"text-primary":""},He={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},Xe={key:1,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},Ye={"text-sm":""},Je={"text-primary":""},Ze={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},te=G({__name:"ComponentDetails",props:{component:{},dependencies:{},dependents:{}},setup(s){const l=s,v=P(()=>l.component.pascalName||K(l.component.name||l.component.__name||l.component.kebabName||"")),x=P(()=>l.component.filePath||l.component.file||l.component.__file||""),d=ue();return(c,h)=>{const i=ne,y=X,a=Q,k=ee;return t(),r("div",ze,[n("div",Ee,[p(i,{component:s.component},null,8,["component"]),s.component.meta?.docs&&typeof s.component.meta.docs=="string"?(t(),b(y,{key:0,title:"Open docs","flex-none":"",n:"xs",to:s.component.meta.docs,target:"_blank",icon:"carbon-catalog"},{default:m(()=>[...h[1]||(h[1]=[E(" Docs ",-1)])]),_:1},8,["to"])):_("",!0),p(y,{title:"Copy name","flex-none":"",n:"xs",icon:"carbon-copy",onClick:h[0]||(h[0]=g=>V(d)(`<${v.value}></${v.value}>`,"component-name"))},{default:m(()=>[...h[2]||(h[2]=[E(" Copy ",-1)])]),_:1}),s.component.global?(t(),b(a,{key:1,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):_("",!0)]),n("div",We,[x.value?(t(),b(k,{key:0,filepath:x.value,"w-full":"","text-sm":"",op40:"","group-hover:op75":""},null,8,["filepath"])):_("",!0)]),s.dependents?(t(),r("div",Oe,[n("div",je,[n("strong",qe,O(s.dependents.length),1),h[3]||(h[3]=n("span",{op50:""}," references",-1))]),s.dependents.length?(t(),r("div",He,[(t(!0),r(B,null,M(s.dependents,g=>(t(),b(k,{key:g,filepath:g},null,8,["filepath"]))),128))])):_("",!0)])):_("",!0),s.dependencies?(t(),r("div",Xe,[n("div",Ye,[n("strong",Je,O(s.dependencies.length),1),h[4]||(h[4]=n("span",{op50:""}," dependencies",-1))]),s.dependencies.length?(t(),r("div",Ze,[(t(!0),r(B,null,M(s.dependencies,g=>(t(),b(k,{key:g,filepath:g},null,8,["filepath"]))),128))])):_("",!0)])):_("",!0),j(c.$slots,"default")])}}}),Ke={flex:"~ gap-x-3 gap-y-1 wrap","w-full":""},Qe={relative:"","h-full":"","w-full":""},en={key:0,py4:"",pt3:"",flex:"~ col"},nn={border:"t base",p4:""},tn=G({__name:"ComponentsGraph",props:{components:{},relationships:{}},setup(s){const l=s,v=F(),x=F(),d=pe(),c=ye(),h=re(),i=ce(),y=me(),{componentsGraphShowNodeModules:a,componentsGraphShowGlobalComponents:k,componentsGraphShowPages:g,componentsGraphShowLayouts:C,componentsGraphShowWorkspace:S}=J("ui"),f=F(),N=F(""),u=de(N,300),A=P(()=>{const D=l.relationships||[];if(f.value){let e=function($){!$||o.has($)||(o.add($),$.deps.forEach(I=>{e(D.find(U=>U.id===I))}))};const o=new Set;return e(f.value),Array.from(o)}return D}),T=P(()=>{const D=A.value.map(o=>{const $=l.components.find(R=>R.filePath===o.id),I=h.value?.find(R=>R.file===o.id),U=y.value?.find(R=>R.file===o.id),L=o.id.includes("/node_modules/")?"lib":$?$.global?"global":"user":U?"layout":I?"page":"unknown";if(!a.value&&L==="lib"||!g.value&&L==="page"||!C.value&&L==="layout"||!S.value&&L==="user"&&i.value&&!o.id.startsWith(i.value.rootDir)||!k.value&&L==="global")return null;const q=L==="layout"?"hexagon":L==="page"?"square":"dot",w=u.value&&!o.id.toLowerCase().includes(u.value.toLowerCase());return{id:o.id,label:ae(o.id),group:L,shape:q,size:15+Math.min(o.deps.length/2,8),font:{color:w?"#8885":d.value==="dark"?"white":"black"},color:w?"#8885":f.value?.id===o.id?"#82c742":void 0,extra:{id:o.id,component:$,page:I,layout:U,relationship:o}}}).filter(o=>!!o),e=A.value.flatMap(o=>o.deps.map($=>({from:o.id,to:$,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:new Le(D),edges:e}}),oe=P(()=>c.value?.component?l.relationships?.find(e=>e.id===c.value?.component?.filePath)?.deps?.map(e=>l.relationships?.find(o=>o.id===e)?.id).filter(Boolean):[]),se=P(()=>c.value?.component?l.relationships?.filter(e=>e.deps.includes(c.value.component.filePath))?.map(e=>l.relationships?.find(o=>o.id===e.id)?.id).filter(Boolean):[]);we(()=>{const D={nodes:{shape:"dot",size:16},physics:{repulsion:{centralGravity:.7,springLength:100,springConstant:.01},maxVelocity:146,solver:"forceAtlas2Based",timestep:.35,stabilization:{enabled:!0,iterations:200}},groups:{user:{color:"#42b883"},unknown:{color:"#b86542"},lib:{color:"#b4b842"},page:{color:"#42b2b8"},layout:{color:"#4256b8"}}},e=new Be(v.value,T.value,D);e.on("click",o=>{const $=o.nodes?.[0],I=T.value.nodes.get($).extra;c.value=I}),ke(T,()=>{e.setData(T.value)})});function le(){c.value=void 0}function ae(D){const e=l.components.find(o=>o.filePath===D);return e?e.pascalName:D.replace(/.*\/components\//,"").replace(/\.vue$/,"").replace(/\/index$/,"").split("/").map(o=>o.charAt(0).toUpperCase()+o.slice(1)).join("")}function ie(){f.value=c.value?.relationship,c.value=void 0}return(D,e)=>{const o=Pe,$=Z,I=fe,U=te,L=X,q=Se;return t(),r(B,null,[p($,{ref_key:"navbar",ref:x,search:N.value,"onUpdate:search":e[6]||(e[6]=w=>N.value=w),absolute:"","left-0":"","right-0":"","top-0":""},{actions:m(()=>[n("div",Ke,[p(o,{modelValue:V(g),"onUpdate:modelValue":e[0]||(e[0]=w=>z(g)?g.value=w:null),n:"primary sm"},{default:m(()=>[...e[8]||(e[8]=[n("span",{op75:""},"Show pages",-1)])]),_:1},8,["modelValue"]),p(o,{modelValue:V(C),"onUpdate:modelValue":e[1]||(e[1]=w=>z(C)?C.value=w:null),n:"primary sm"},{default:m(()=>[...e[9]||(e[9]=[n("span",{op75:""},"Show layouts",-1)])]),_:1},8,["modelValue"]),p(o,{modelValue:V(S),"onUpdate:modelValue":e[2]||(e[2]=w=>z(S)?S.value=w:null),n:"primary sm"},{default:m(()=>[...e[10]||(e[10]=[n("span",{op75:""},"Show workspace",-1)])]),_:1},8,["modelValue"]),p(o,{modelValue:V(a),"onUpdate:modelValue":e[3]||(e[3]=w=>z(a)?a.value=w:null),n:"primary sm"},{default:m(()=>[...e[11]||(e[11]=[n("span",{op75:""},"Show node_modules",-1)])]),_:1},8,["modelValue"]),p(o,{modelValue:V(k),"onUpdate:modelValue":e[4]||(e[4]=w=>z(k)?k.value=w:null),n:"primary sm"},{default:m(()=>[...e[12]||(e[12]=[n("span",{op75:""},"Show global components",-1)])]),_:1},8,["modelValue"])]),f.value?(t(),r("button",{key:0,flex:"~ gap-1","flex-none":"","items-center":"","rounded-full":"","bg-gray:20":"",py1:"",pl3:"",pr2:"","text-xs":"",op50:"","hover:op100":"",onClick:e[5]||(e[5]=w=>f.value=void 0)},[...e[13]||(e[13]=[E(" Clear filter ",-1),n("div",{"i-carbon-close":""},null,-1)])])):_("",!0),e[14]||(e[14]=n("div",{"flex-auto":""},null,-1)),j(D.$slots,"default")]),_:3},8,["search"]),n("div",Qe,[n("div",{ref_key:"container",ref:v,"h-full":"","w-full":""},null,512),p(I,{absolute:"","bottom-3":"","left-3":"","border-0":"","n-glass-effect":"",p2:"",px3:"","text-sm":""},{default:m(()=>[...e[15]||(e[15]=[n("div",{grid:"~ cols-[20px_1fr] items-center gap-y-1"},[n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-42b883":""}),n("div",{op50:""}," Component "),n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-97c2fc":""}),n("div",{op50:""}," Global Component "),n("div",{"h-3":"","w-3":"","bg-hex-42b2b8":""}),n("div",{op50:""}," Page "),n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 726 628","ml--1px":"","h-3":""},[n("path",{fill:"#4256b8","stroke-width":"4",d:"M723 314 543 625.8H183L3 314 183 2.2h360L723 314z"})]),n("div",{op50:""}," Layout "),n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b4b842":""}),n("div",{op50:""}," Library Component "),n("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b86542":""}),n("div",{op50:""}," Unknown ")],-1)])]),_:1}),p(q,{"model-value":!!(c.value&&c.value.component),top:x.value,border:"t l base","w-80":"",onClose:le},{default:m(()=>[c.value&&c.value.component?(t(),r("div",en,[p(U,{component:c.value.component,dependencies:oe.value,dependents:se.value},null,8,["component","dependencies","dependents"]),n("div",nn,[p(L,{n:"primary solid",onClick:e[7]||(e[7]=w=>ie())},{default:m(()=>[...e[16]||(e[16]=[E(" Filter to this component ",-1)])]),_:1})])])):_("",!0)]),_:1},8,["model-value","top"])])],64)}}}),on={hover:"bg-active",class:"group",flex:"~ gap2","w-full":"","items-center":"",rounded:"",px2:"",py1:""},sn={key:0,"ml--1":"","text-primary":""},ln=G({__name:"ComponentItem",props:{component:{},dependencies:{},dependents:{}},setup(s){const l=s,v=P(()=>l.component.filePath||l.component.file||l.component.__file||"");return(x,d)=>{const c=ne,h=te,i=Ce("VDropdown"),y=Q,a=ee;return t(),r("div",on,[p(i,null,{popper:m(()=>[p(h,{component:s.component,dependencies:s.dependencies,dependents:s.dependents,"w-100":"",pt3:""},null,8,["component","dependencies","dependents"])]),default:m(()=>[n("button",{"hover:text-primary":"",class:Ne(s.dependents&&s.dependents.length===0?"op50":"")},[p(c,{component:s.component},null,8,["component"])],2)]),_:1}),s.dependents?.length?(t(),r("sup",sn," x"+O(s.dependents?.length),1)):_("",!0),s.component.global?(t(),b(y,{key:1,n:"green",title:"Registered at runtime as a global component",textContent:"runtime"})):_("",!0),j(x.$slots,"default"),v.value?(t(),b(a,{key:2,filepath:v.value,"text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):_("",!0)])}}}),an={flex:"~ gap-2 items-center"},un={pl4:""},pn=G({__name:"ComponentsList",props:{components:{},relationships:{}},setup(s){const l=s,v=F(""),x=F("all"),d=P(()=>{const y=l.components.map(a=>ve(a,l.relationships));return x.value==="using"?y.filter(a=>a.dependents?.length):x.value==="not-used"?y.filter(a=>!a.dependents?.length):y}),c={ClientOnly:"https://nuxt.com/docs/api/components/client-only",DevOnly:"https://nuxt.com/docs/api/components/dev-only",NuxtClientFallback:"https://nuxt.com/docs/api/components/nuxt-client-fallback",NuxtPicture:"https://nuxt.com/docs/api/components/nuxt-picture",NuxtRouteAnnouncer:"https://nuxt.com/docs/api/components/nuxt-route-announcer",NuxtTime:"https://nuxt.com/docs/api/components/nuxt-time",NuxtPage:"https://nuxt.com/docs/api/components/nuxt-page",NuxtLayout:"https://nuxt.com/docs/api/components/nuxt-layout",NuxtLink:"https://nuxt.com/docs/api/components/nuxt-link",NuxtLoadingIndicator:"https://nuxt.com/docs/api/components/nuxt-loading-indicator",NuxtErrorBoundary:"https://nuxt.com/docs/api/components/nuxt-error-boundary",NuxtWelcome:"https://nuxt.com/docs/api/components/nuxt-welcome",NuxtIsland:"https://nuxt.com/docs/api/components/nuxt-island",NuxtImg:"https://nuxt.com/docs/api/components/nuxt-img"},h=P(()=>new he(d.value,{keys:["component.pascalName","component.filePath","component.kebabName"]})),i=P(()=>{const y=[],a=new Map,k=[],g=[],C={user:0,lib:0,builtin:0,runtime:0};return(v.value?h.value.search(v.value).map(f=>f.item):d.value).forEach(f=>{const N=f.component;if(N.filePath&&ge(N.filePath)){const u=be(N.filePath);if(!u)return;u==="nuxt"?(N.meta??={},N.meta.docs??=c?.[N.pascalName],k.push(f),C.builtin++):(a.has(u)||a.set(u,[]),a.get(u).push(f),C.lib++)}else N.global&&!N.filePath?(g.push(f),C.runtime++):(y.push(f),C.user++)}),{count:C,user:y,builtin:k,lib:a,runtime:g}});return(y,a)=>{const k=_e,g=Ie,C=Z,S=ln,f=Te,N=Me;return t(),r(B,null,[p(C,{search:v.value,"onUpdate:search":a[1]||(a[1]=u=>v.value=u),pb3:""},{actions:m(()=>[j(y.$slots,"default")]),default:m(()=>[n("div",an,[p(k,{icon:"carbon-filter",op50:""}),p(g,{modelValue:x.value,"onUpdate:modelValue":a[0]||(a[0]=u=>x.value=u),n:"primary sm",options:[{label:"All",value:"all"},{label:"Using",value:"using"},{label:"Not used",value:"not-used"}]},null,8,["modelValue"])])]),_:3},8,["search"]),i.value.user.length?(t(),b(f,{key:0,icon:"carbon-nominal",text:"User components",open:i.value.user.length<=V(H),description:`Total components: ${i.value.count.user}`},{default:m(()=>[(t(!0),r(B,null,M(i.value.user,u=>(t(),b(S,W({key:u.component.filePath},{ref_for:!0},u),null,16))),128))]),_:1},8,["open","description"])):_("",!0),i.value.runtime.length?(t(),b(f,{key:1,icon:"carbon-load-balancer-global",open:i.value.runtime.length<=V(H),text:"Runtime components",description:`Total components: ${i.value.count.runtime}`},{default:m(()=>[(t(!0),r(B,null,M(i.value.runtime,u=>(t(),b(S,W({key:u.component.filePath},{ref_for:!0},u),null,16))),128))]),_:1},8,["open","description"])):_("",!0),i.value.builtin.length?(t(),b(f,{key:2,icon:"simple-icons-nuxtdotjs",text:"Built-in components",description:`Total components: ${i.value.count.builtin}`},{default:m(()=>[(t(!0),r(B,null,M(i.value.builtin,u=>(t(),b(S,W({key:u.component.filePath},{ref_for:!0},u),null,16))),128))]),_:1},8,["description"])):_("",!0),i.value.lib.size?(t(),b(f,{key:3,open:i.value.count.lib<=V(H),icon:"carbon-3d-mpr-toggle",text:"Components from libraries",description:`${i.value.count.lib} components from ${i.value.lib.size} packages`},{default:m(()=>[(t(!0),r(B,null,M(i.value.lib.entries(),([u,A])=>(t(),r("div",{key:u,"ml-2":""},[p(N,{text:`${u} (${A.length})`,py1:"",op50:""},null,8,["text"]),n("div",un,[(t(!0),r(B,null,M(A,T=>(t(),b(S,W({key:T.component.filePath},{ref_for:!0},T),null,16))),128))])]))),128))]),_:1},8,["open","description"])):_("",!0)],64)}}}),rn={relative:"","h-full":"","of-auto":""},cn={"flex-none":"",flex:"~ gap3"},Pn=G({__name:"components",setup(s){const l=xe(),v=Ue(),x=Fe(),{componentsView:d}=J("ui");function c(){l.value?.inspector?.enable()}function h(){d.value=d.value==="list"?"graph":"list"}return(i,y)=>{const a=X,k=Ae,g=De,C=$e("tooltip");return t(),r(B,null,[n("div",rn,[(t(),b(Ve(V(d)==="list"?pn:tn),{components:V(v),relationships:V(x)},{default:m(()=>[n("div",cn,[Y(p(a,{"text-lg":"",border:!1,icon:V(d)==="graph"?"i-carbon-list":"i-carbon-network-4",title:"Toggle view",onClick:h},null,8,["icon"]),[[C,"Toggle View",void 0,{"bottom-end":!0}]]),V(l)?.inspector?.isAvailable?Y((t(),b(a,{key:0,"text-lg":"",border:!1,icon:"i-tabler-focus-2",title:"Inspect Vue components",onClick:c},null,512)),[[C,"Inspect Vue components",void 0,{"bottom-end":!0}]]):_("",!0)])]),_:1},8,["components","relationships"]))]),p(g,null,{default:m(()=>[p(k)]),_:1})],64)}}});export{Pn as default};
@@ -0,0 +1 @@
1
+ import{a as $,w as U,I as E,_ as F}from"#entry";import{_ as j}from"./nmarkdown.vue-benph8ez.js";import{_ as S}from"./filepath-item.vue-neqjm2ct.js";import{k as W}from"./index-jc4yj4to.js";import{C as y}from"./constants-b32h69zq.js";import{p as q,q as r,$ as z,V as m,a0 as n,W as l,a1 as o,a5 as J,J as u,a2 as d,ac as f,a9 as x,Y as b,u as k,F as g,ah as L}from"./vendor/json-editor-vue-linwxbdb.js";const M={rounded:"","font-mono":""},O={key:0,"text-primary":""},T={key:0},Y={title:"Vue Directive"},A={"max-w-100":""},G={px4:"",py3:"","text-sm":""},H={flex:"~ gap2",n:"primary xs"},K={border:"t base","max-h-60":"","of-auto":"",px4:"",py3:""},P={"text-sm":""},Q={"text-primary":""},R={flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},X={key:1,"text-sm":"",op50:""},se=q({__name:"ComposableItem",props:{item:{},isDirective:{type:Boolean,default:!1},metadata:{},filepath:{},counter:{type:Boolean,default:!0},classes:{default:"px2 py1 text-sm bg-gray:5 "}},setup(a){const t=a,h=$(),C=U(),c=r(()=>t.item.as||t.item.name),D=r(()=>{let s=c.value;return t.isDirective&&(s[0]!=="v"&&(s=`v${s}`),s=W(s)),s}),i=r(()=>t.metadata?.injectionUsage?.[c.value]?.count||0),N=r(()=>(t.metadata?.injectionUsage?.[c.value]?.moduleIds||[]).filter(s=>!s.endsWith("?macro=true"))),_=r(()=>t.item.meta?.docsUrl?t.item.meta.docsUrl:["nuxt","#app","nuxt3"].includes(t.item.from)?y.nuxt[t.item.name]:t.item.from==="vue"?y.vue[t.item.name]:null);return(s,e)=>{const w=E,I=j,v=F,V=S,B=z("VDropdown");return n(),m(B,{disabled:!t.metadata},{popper:l(()=>[o("div",A,[o("div",G,[a.item.meta?.description?(n(),m(I,{key:0,tag:"div",pb3:"","text-sm":"",markdown:a.item.meta.description},null,8,["markdown"])):d("",!0),o("div",H,[b(v,{icon:"carbon-copy",onClick:e[0]||(e[0]=p=>k(h)(D.value,"imports-name"))},{default:l(()=>[...e[2]||(e[2]=[f(" Copy ",-1)])]),_:1}),a.filepath?(n(),m(v,{key:0,icon:"carbon-code",onClick:e[1]||(e[1]=p=>a.filepath&&k(C)(a.filepath))},{default:l(()=>[...e[3]||(e[3]=[f(" Source ",-1)])]),_:1})):d("",!0),_.value?(n(),m(v,{key:1,icon:"carbon-catalog",to:_.value,target:"_blank"},{default:l(()=>[...e[4]||(e[4]=[f(" Docs ",-1)])]),_:1},8,["to"])):d("",!0)])]),o("div",K,[i.value?(n(),u(g,{key:0},[o("div",P,[e[5]||(e[5]=o("span",{op50:""},"It has been referenced ",-1)),o("strong",Q,x(i.value),1),e[6]||(e[6]=o("span",{op50:""}," times by:",-1))]),o("div",R,[(n(!0),u(g,null,L(N.value,p=>(n(),m(V,{key:p,filepath:p},null,8,["filepath"]))),128))])],64)):(n(),u("div",X," Not in use via auto import. "))])])]),default:l(()=>[o("button",{"hover:text-primary":"",class:J([a.metadata&&!i.value?"op30 hover:op100":"",a.classes])},[o("code",M,[f(x(c.value)+" ",1),i.value&&a.counter?(n(),u("sup",O,"x"+x(i.value),1)):d("",!0)]),a.isDirective?(n(),u("sup",T,[o("abbr",Y,[b(w,{icon:"tabler:hexagon-letter-d"})])])):d("",!0)],2)]),_:1},8,["disabled"])}}});export{se as _};
@@ -0,0 +1 @@
1
+ import{a4 as $,ba as j,bb as E,bc as N,a6 as V,l as B,ag as k,bd as W,r as D,n as I,j as L,aa as P}from"#entry";import{p as q,k as C,q as x,r as O,E as M,z as R,w as _,M as S,J as U,a0 as n,V as u,W as y,a1 as r,ac as w,a9 as A,u as T,ag as F,Y as z}from"./vendor/json-editor-vue-linwxbdb.js";import{_ as G}from"./launch-page.vue-b5jz6435.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-c1ookmgn.js";import"./nmarkdown.vue-benph8ez.js";import"./client-grni31iy.js";const h=new Map,J=q({__name:"IframeView",props:{tab:{}},setup(f){const m=f,c=$(),d=C(),s=x(()=>m.tab.name),e=C(),t=O(j(d));M(()=>{const o=m.tab.view,l=o.persistent!==!1,b=["clipboard-write","clipboard-read"];if(h.get(s.value)&&l)e.value=h.get(s.value),e.value.style.visibility="visible";else{e.value=document.createElement("iframe"),e.value.setAttribute("allow",b.join("; ")),e.value.setAttribute("aria-label","Nuxt Devtools"),l&&h.set(s.value,e.value),e.value.src=o.src;try{e.value.style.opacity="0.01",e.value.onload=()=>{v(),i(),e.value.style.opacity="1"}}catch{e.value.style.opacity="1"}document.body.appendChild(e.value),R(p)}setTimeout(i,100)}),_(p),_(i),_(v),S(()=>{e.value&&(e.value.style.visibility="hidden")});function i(){if(!(!e.value||!e.value.contentWindow))try{const o=e.value.contentWindow.document.querySelector("html");o?.classList.toggle("dark",c.value==="dark"),o?.classList.toggle("light",c.value==="dark"),new MutationObserver(()=>{c.value=e.value?.contentWindow?.document.querySelector("html")?.classList.contains("dark")?"dark":"light"}).observe(o,{attributes:!0,attributeFilter:["class"]})}catch{}}const a=E();function v(){if(!(!e.value||!e.value.contentWindow))try{e.value.contentWindow.__NUXT_DEVTOOLS__=a.value}catch{}}function p(){e.value&&Object.assign(e.value.style,{position:"fixed",left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`,outline:"none"})}return(o,l)=>(n(),U("div",{ref_key:"anchor",ref:d,"h-full":"","w-full":""},null,512))}}),X={flex:"~ col gap2",mxa:"","items-center":""},Y={"text-xl":""},H={"text-rose":""},ne=q({__name:"custom-[name]",props:{name:{}},setup(f){const m=f,c=N(),d=V(),s=x(()=>m.name??c.params.name),e=B(),t=x(()=>e.value.find(i=>i.name===s.value));return M(()=>{t.value?t.value.requireAuth&&!k.value&&W():setTimeout(()=>{t.value||d.push("/modules/overview")},2e3)}),(i,a)=>{const v=L,p=P,o=J,l=G,b=I;return t.value?t.value.requireAuth&&!T(k)?(n(),u(p,{key:1})):t.value.view.type==="iframe"?(n(),u(o,{key:2,tab:t.value},null,8,["tab"])):t.value.view.type==="vnode"?(n(),u(F(t.value.view.vnode),{key:3})):t.value.view.type==="launch"?(n(),u(l,{key:4,name:`custom-${t.value.name}`,icon:t.value.view.icon||t.value.icon,title:t.value.view.title||t.value.title,description:t.value.view.description,actions:t.value.view.actions,onAction:a[0]||(a[0]=g=>T(D).customTabAction(t.value.name,g))},null,8,["name","icon","title","description","actions"])):(n(),u(v,{key:5},{default:y(()=>[z(b,{flex:"~ col","h-full":"","items-center":"","justify-center":""},{default:y(()=>[w(" Unknown tab type "+A(t.value.view),1)]),_:1})]),_:1})):(n(),u(v,{key:0},{default:y(()=>[r("div",X,[a[3]||(a[3]=r("div",{"i-carbon-queued":"",mb2:"","text-5xl":"",op50:""},null,-1)),r("p",Y,[a[1]||(a[1]=w(" Tab ",-1)),r("code",H,A(s.value),1),a[2]||(a[2]=w(" not found ",-1))]),a[4]||(a[4]=r("p",{op50:""}," It might because the module contributing this tab is not installed or enabled ",-1)),a[5]||(a[5]=r("p",{mt8:"","animate-pulse":""}," Redirecting to overview page... ",-1))])]),_:1}))}}});export{ne as default};
@@ -0,0 +1 @@
1
+ import{u as r,_ as c}from"#entry";import{p as s,aj as i,ad as p,a0 as _,V as m}from"./vendor/json-editor-vue-linwxbdb.js";const D=s({__name:"DataSchemaButton",props:{getter:{type:Function}},setup(t){const n=r();return(u,e)=>{const o=c,a=i("tooltip");return p((_(),m(o,{title:"Generate Data Schema",icon:"carbon:container-services",border:!1,onClick:e[0]||(e[0]=l=>n.value=t.getter())},null,512)),[[a,"Generate Data Schema"]])}}});export{D as _};