@nuxt/devtools 1.0.3 → 1.0.4

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 (94) hide show
  1. package/README.md +2 -1
  2. package/dist/chunks/module-main.mjs +96 -83
  3. package/dist/chunks/vscode.mjs +2 -2
  4. package/dist/client/200.html +17 -17
  5. package/dist/client/404.html +17 -17
  6. package/dist/client/_nuxt/{CodeDiff.vue.0700b533.js → CodeDiff.vue.d8722166.js} +2 -2
  7. package/dist/client/_nuxt/{ComposableItem.vue.869f4305.js → ComposableItem.vue.a0062ecc.js} +1 -1
  8. package/dist/client/_nuxt/{DataSchemaButton.vue.72b202db.js → DataSchemaButton.vue.baec9a00.js} +1 -1
  9. package/dist/client/_nuxt/{DataSchemaDrawer.3aeebd14.js → DataSchemaDrawer.b2c7e5f0.js} +1 -1
  10. package/dist/client/_nuxt/{DurationDisplay.vue.37c54f2c.js → DurationDisplay.vue.75bf04c2.js} +1 -1
  11. package/dist/client/_nuxt/{FilepathItem.vue.ca308ea2.js → FilepathItem.vue.7a091e26.js} +1 -1
  12. package/dist/client/_nuxt/{HelpFab.vue.6bf23ece.js → HelpFab.vue.07720a44.js} +1 -1
  13. package/dist/client/_nuxt/{LaunchPage.vue.c8e4a567.js → LaunchPage.vue.51fc4c47.js} +1 -1
  14. package/dist/client/_nuxt/NBadge.ce033599.js +1 -0
  15. package/dist/client/_nuxt/NCheckbox.vue.0f5a8440.js +1 -0
  16. package/dist/client/_nuxt/{NCodeBlock.vue.c80c8282.js → NCodeBlock.vue.4697f7e4.js} +2 -2
  17. package/dist/client/_nuxt/{NDrawer.vue.e2617b9c.js → NDrawer.vue.4b4bd813.js} +1 -1
  18. package/dist/client/_nuxt/NDropdown.vue.ddbb4404.js +1 -0
  19. package/dist/client/_nuxt/{NIconTitle.vue.83cd82be.js → NIconTitle.vue.8be5866f.js} +1 -1
  20. package/dist/client/_nuxt/{NLink.vue.92e49c8b.js → NLink.vue.99516332.js} +1 -1
  21. package/dist/client/_nuxt/{NMarkdown.vue.07fe8875.js → NMarkdown.vue.d386a844.js} +1 -1
  22. package/dist/client/_nuxt/{NNavbar.vue.823096f1.js → NNavbar.vue.a82b9c01.js} +1 -1
  23. package/dist/client/_nuxt/NSectionBlock.1609c1ec.js +1 -0
  24. package/dist/client/_nuxt/NSelect.vue.7cf27fe7.js +1 -0
  25. package/dist/client/_nuxt/NSelectTabs.vue.8f4924f6.js +1 -0
  26. package/dist/client/_nuxt/NSwitch.vue.6fd7c26d.js +1 -0
  27. package/dist/client/_nuxt/StacktraceList.vue.a2e4171d.js +1 -0
  28. package/dist/client/_nuxt/StateEditor.vue.777f604e.js +1 -0
  29. package/dist/client/_nuxt/{__blank.aff34a18.js → __blank.2e21a1a7.js} +1 -1
  30. package/dist/client/_nuxt/analyze-build.371a5734.js +1 -0
  31. package/dist/client/_nuxt/assets.439f186c.js +16 -0
  32. package/dist/client/_nuxt/builds/latest.json +1 -1
  33. package/dist/client/_nuxt/builds/meta/f35e8543-749e-4b65-87f9-0ac9fa3dd3ab.json +1 -0
  34. package/dist/client/_nuxt/{client.b8ca1554.js → client.bd4053bc.js} +1 -1
  35. package/dist/client/_nuxt/{components.f8fde87c.js → components.ccf2fad3.js} +1 -1
  36. package/dist/client/_nuxt/{custom-_name_.779ca3e5.js → custom-_name_.b0891a20.js} +1 -1
  37. package/dist/client/_nuxt/{default.50175b13.js → default.97700872.js} +1 -1
  38. package/dist/client/_nuxt/{entry.aa8c94e8.css → entry.2732f55b.css} +1 -1
  39. package/dist/client/_nuxt/entry.35c58391.js +27 -0
  40. package/dist/client/_nuxt/{error-404.0dae1ccf.js → error-404.576aef72.js} +1 -1
  41. package/dist/client/_nuxt/{error-500.0a479375.js → error-500.61e43a5a.js} +1 -1
  42. package/dist/client/_nuxt/error.82c66fee.js +9 -0
  43. package/dist/client/_nuxt/full.72d92407.js +1 -0
  44. package/dist/client/_nuxt/{hooks.08bf14b9.js → hooks.889b91ae.js} +1 -1
  45. package/dist/client/_nuxt/{imports.10f1634a.js → imports.8a1177ed.js} +1 -1
  46. package/dist/client/_nuxt/{index.b567c37e.js → index.0214b01d.js} +1 -1
  47. package/dist/client/_nuxt/{index.06e4cc9c.js → index.11f08f78.js} +1 -1
  48. package/dist/client/_nuxt/{json-editor-vue.c3cbb111.js → json-editor-vue.24ac60a9.js} +1 -1
  49. package/dist/client/_nuxt/modules.0ea1264b.js +2 -0
  50. package/dist/client/_nuxt/{none.7a39bbba.js → none.9d86a5c5.js} +1 -1
  51. package/dist/client/_nuxt/{open-graph.7c382b87.js → open-graph.ce924f19.js} +2 -2
  52. package/dist/client/_nuxt/overview.811117a6.js +1 -0
  53. package/dist/client/_nuxt/{pages.e4e22a03.js → pages.f870c402.js} +1 -1
  54. package/dist/client/_nuxt/{payload.d7e93a46.js → payload.ae9699f5.js} +1 -1
  55. package/dist/client/_nuxt/{plugins.b2f10668.js → plugins.a8eafa2c.js} +1 -1
  56. package/dist/client/_nuxt/{runtime-configs.9fe5125f.js → runtime-configs.344cb73a.js} +1 -1
  57. package/dist/client/_nuxt/server-routes.d5948352.js +9 -0
  58. package/dist/client/_nuxt/{settings.78f334a8.js → settings.a887e1c0.js} +1 -1
  59. package/dist/client/_nuxt/state-components.295d8108.js +1 -0
  60. package/dist/client/_nuxt/state-modules.a1a00874.js +1 -0
  61. package/dist/client/_nuxt/{storage-options.2b389201.js → storage-options.835c9b2d.js} +1 -1
  62. package/dist/client/_nuxt/{storage.44a95fac.js → storage.d4c1d127.js} +1 -1
  63. package/dist/client/_nuxt/{terminals.539d48eb.js → terminals.3c6722c6.js} +1 -1
  64. package/dist/client/_nuxt/timeline.cebcddc5.js +29 -0
  65. package/dist/client/_nuxt/{unocss-runtime.dfaa24d0.js → unocss-runtime.eab56c8d.js} +1 -1
  66. package/dist/client/_nuxt/virtual-files.33dacdaf.js +1 -0
  67. package/dist/client/index.html +17 -17
  68. package/dist/module.json +1 -1
  69. package/dist/module.mjs +1 -1
  70. package/dist/runtime/plugins/devtools.client.mjs +2 -2
  71. package/dist/runtime/plugins/view/Main.vue +2 -0
  72. package/dist/shared/{devtools.6f6e0f47.mjs → devtools.371fa152.mjs} +2 -2
  73. package/package.json +14 -14
  74. package/dist/client/_nuxt/NBadge.0b42c7f8.js +0 -1
  75. package/dist/client/_nuxt/NCheckbox.vue.6b5ce38f.js +0 -1
  76. package/dist/client/_nuxt/NDropdown.vue.ff9a8df2.js +0 -1
  77. package/dist/client/_nuxt/NSectionBlock.c3646235.js +0 -1
  78. package/dist/client/_nuxt/NSelect.vue.c8c511ae.js +0 -1
  79. package/dist/client/_nuxt/NSelectTabs.vue.ec21a846.js +0 -1
  80. package/dist/client/_nuxt/NSwitch.vue.1cea2bc6.js +0 -1
  81. package/dist/client/_nuxt/NTip.vue.ca2f8e8a.js +0 -1
  82. package/dist/client/_nuxt/StateEditor.vue.2abb9bb3.js +0 -1
  83. package/dist/client/_nuxt/analyze-build.76d0de73.js +0 -1
  84. package/dist/client/_nuxt/assets.2cb4325d.js +0 -16
  85. package/dist/client/_nuxt/builds/meta/c6495541-4f21-430a-9b71-cda3f41cbf03.json +0 -1
  86. package/dist/client/_nuxt/entry.9a5af3dc.js +0 -27
  87. package/dist/client/_nuxt/full.f21cfe4d.js +0 -1
  88. package/dist/client/_nuxt/modules.63cf2a03.js +0 -2
  89. package/dist/client/_nuxt/overview.ea00b3f6.js +0 -1
  90. package/dist/client/_nuxt/server-routes.95c3caa5.js +0 -9
  91. package/dist/client/_nuxt/state-components.d81178a3.js +0 -1
  92. package/dist/client/_nuxt/state-modules.b9e84f85.js +0 -1
  93. package/dist/client/_nuxt/timeline.5deddf7e.js +0 -29
  94. package/dist/client/_nuxt/virtual-files.46ad04c9.js +0 -1
package/README.md CHANGED
@@ -16,6 +16,7 @@ Unleash Nuxt Developer Experience.
16
16
  </p>
17
17
 
18
18
  <p>
19
+ <a href="https://nuxt.com/blog/nuxt-devtools-v1-0">👋 Introduction</a> |
19
20
  <a href="https://github.com/nuxt/devtools/discussions/29">💡 Ideas & Suggestions</a> |
20
21
  <a href="https://github.com/nuxt/devtools/discussions/31">🗺️ Project Roadmap</a> |
21
22
  <a href="https://devtools.nuxt.com/">📚 Documentation</a>
@@ -77,7 +78,7 @@ For all options available, please refer to TSDocs in your IDE, or the [type defi
77
78
 
78
79
  ## Features
79
80
 
80
- Read the [**Announcement Blog Post 🎊**](https://nuxt.com/blog/introducing-nuxt-devtools) for why we built Nuxt DevTools and what it can do!
81
+ Read the [**Announcement Blog Post 🎊**](https://nuxt.com/blog/nuxt-devtools-v1-0) for why we built Nuxt DevTools and what it can do!
81
82
 
82
83
  ## Module Authors
83
84
 
@@ -1,16 +1,17 @@
1
1
  import fs$1, { existsSync } from 'node:fs';
2
2
  import os, { homedir } from 'node:os';
3
3
  import fs from 'node:fs/promises';
4
- import { resolve, join as join$1, dirname } from 'pathe';
4
+ import { join, resolve, dirname as dirname$1 } from 'pathe';
5
5
  import { logger, useNuxt, addPlugin, addTemplate, addVitePlugin } from '@nuxt/kit';
6
6
  import { searchForWorkspaceRoot } from 'vite';
7
7
  import sirv from 'sirv';
8
8
  import { colors } from 'consola/utils';
9
9
  import { createBirpcGroup } from 'birpc';
10
10
  import { stringify, parse as parse$1 } from 'flatted';
11
- import { d as defaultAllowedExtensions, a as defaultTabOptions, W as WS_EVENT_NAME } from '../shared/devtools.6f6e0f47.mjs';
12
- import { join, parse, dirname as dirname$1 } from 'node:path';
11
+ import { d as defaultAllowedExtensions, a as defaultTabOptions, W as WS_EVENT_NAME } from '../shared/devtools.371fa152.mjs';
12
+ import { dirname, join as join$1, parse } from 'node:path';
13
13
  import { randomStr } from '@antfu/utils';
14
+ import { hash } from 'ohash';
14
15
  import { imageMeta } from 'image-meta';
15
16
  import { debounce } from 'perfect-debounce';
16
17
  import fg from 'fast-glob';
@@ -27,18 +28,74 @@ import { resolveBuiltinPresets } from 'unimport';
27
28
  import destr from 'destr';
28
29
  import { snakeCase } from 'scule';
29
30
  import Git from 'simple-git';
30
- import { hash } from 'ohash';
31
31
  import { runtimeDir, clientDir, packageDir, isGlobalInstall } from '../dirs.mjs';
32
32
 
33
- const version = "1.0.3";
33
+ const version = "1.0.4";
34
+
35
+ function getHomeDir() {
36
+ return process.env.XDG_CONFIG_HOME || homedir();
37
+ }
38
+ async function readLocalOptions(defaults, options) {
39
+ const { filePath } = getOptionsFilepath(options);
40
+ if (existsSync(filePath)) {
41
+ try {
42
+ const options2 = {
43
+ ...defaults,
44
+ ...JSON.parse(await fs.readFile(filePath, "utf-8")).settings || {}
45
+ };
46
+ return options2;
47
+ } catch (e) {
48
+ console.error(`[DevTools] failed to parse local options file: ${filePath}, fallback to defaults`);
49
+ console.error(e);
50
+ return { ...defaults };
51
+ }
52
+ } else {
53
+ return { ...defaults };
54
+ }
55
+ }
56
+ function getOptionsFilepath(options) {
57
+ let hashedKey;
58
+ if (options.key)
59
+ hashedKey = hash(`${options.root}:${options.key}`);
60
+ else
61
+ hashedKey = hash(options.root);
62
+ const home = getHomeDir();
63
+ const filePath = join(home, ".nuxt/devtools", `${hashedKey}.json`);
64
+ return {
65
+ filePath,
66
+ hashedKey
67
+ };
68
+ }
69
+ async function clearLocalOptions(options) {
70
+ const { filePath } = getOptionsFilepath(options);
71
+ if (existsSync(filePath))
72
+ await fs.unlink(filePath);
73
+ }
74
+ async function writeLocalOptions(settings, options) {
75
+ const { filePath, hashedKey } = getOptionsFilepath(options);
76
+ await fs.mkdir(dirname(filePath), { recursive: true });
77
+ await fs.writeFile(
78
+ filePath,
79
+ JSON.stringify(
80
+ {
81
+ root: options.root,
82
+ hash: hashedKey,
83
+ settings
84
+ },
85
+ null,
86
+ 2
87
+ ),
88
+ "utf-8"
89
+ );
90
+ }
34
91
 
35
92
  let token;
36
93
  async function getDevAuthToken() {
37
94
  if (token)
38
95
  return token;
39
- const home = homedir();
40
- const dir = join(home, ".nuxt/devtools");
41
- const filepath = join(dir, "dev-auth-token.txt");
96
+ const home = getHomeDir();
97
+ const dir = join$1(home, ".nuxt/devtools");
98
+ const filepath = join$1(dir, "dev-auth-token.txt");
42
99
  if (existsSync(filepath))
43
100
  token = (await fs.readFile(filepath, "utf-8")).trim();
44
101
  if (!token)
@@ -153,7 +210,7 @@ function setupAssetsRPC({ nuxt, ensureDevAuthToken, refresh, options }) {
153
210
  const stat = await fs.lstat(filePath);
154
211
  return {
155
212
  path,
156
- publicPath: join$1(baseURL, path),
213
+ publicPath: join(baseURL, path),
157
214
  filePath,
158
215
  type: guessType(path),
159
216
  size: stat.size,
@@ -166,7 +223,8 @@ function setupAssetsRPC({ nuxt, ensureDevAuthToken, refresh, options }) {
166
223
  async getStaticAssets() {
167
224
  return await scan();
168
225
  },
169
- async getImageMeta(filepath) {
226
+ async getImageMeta(token, filepath) {
227
+ await ensureDevAuthToken(token);
170
228
  if (_imageMetaCache.has(filepath))
171
229
  return _imageMetaCache.get(filepath);
172
230
  try {
@@ -179,7 +237,8 @@ function setupAssetsRPC({ nuxt, ensureDevAuthToken, refresh, options }) {
179
237
  return void 0;
180
238
  }
181
239
  },
182
- async getTextAssetContent(filepath, limit = 300) {
240
+ async getTextAssetContent(token, filepath, limit = 300) {
241
+ await ensureDevAuthToken(token);
183
242
  try {
184
243
  const content = await fs.readFile(filepath, "utf-8");
185
244
  return content.slice(0, limit);
@@ -513,7 +572,13 @@ function setupHooksDebug(hooks) {
513
572
  return serverHooks;
514
573
  }
515
574
 
516
- function setupGeneralRPC({ nuxt, options, refresh, openInEditorHooks }) {
575
+ function setupGeneralRPC({
576
+ nuxt,
577
+ options,
578
+ refresh,
579
+ ensureDevAuthToken,
580
+ openInEditorHooks
581
+ }) {
517
582
  const components = [];
518
583
  const imports = [];
519
584
  const importPresets = [];
@@ -660,7 +725,8 @@ function setupGeneralRPC({ nuxt, options, refresh, openInEditorHooks }) {
660
725
  return false;
661
726
  }
662
727
  },
663
- restartNuxt(hard = true) {
728
+ async restartNuxt(token, hard = true) {
729
+ await ensureDevAuthToken(token);
664
730
  logger.info("Restarting Nuxt...");
665
731
  return nuxt.callHook("restart", { hard });
666
732
  },
@@ -710,14 +776,14 @@ const route = useRoute()
710
776
  </template>
711
777
  `;
712
778
  async function enablePages(nuxt) {
713
- const pathApp = join$1(nuxt.options.srcDir, "app.vue");
714
- const pathPageIndex = join$1(nuxt.options.srcDir, "pages/index.vue");
779
+ const pathApp = join(nuxt.options.srcDir, "app.vue");
780
+ const pathPageIndex = join(nuxt.options.srcDir, "pages/index.vue");
715
781
  if (fs$1.existsSync(pathPageIndex)) {
716
782
  logger.warn("pages/index.vue already exists, skipping");
717
783
  return;
718
784
  }
719
785
  let appContent = fs$1.existsSync(pathApp) ? await fs.readFile(pathApp, "utf-8") : void 0;
720
- await fs.mkdir(dirname(pathPageIndex), { recursive: true });
786
+ await fs.mkdir(dirname$1(pathPageIndex), { recursive: true });
721
787
  await fs.writeFile(pathPageIndex, pagesIndexTemplate, "utf-8");
722
788
  if (appContent && !appContent.includes("<NuxtPage")) {
723
789
  appContent = appContent.replace("</template>", " <NuxtPage />\n</template>").replace(/<NuxtWelcome\s*\/>/, "");
@@ -880,7 +946,7 @@ function setupAnalyzeBuildRPC({ nuxt, refresh, ensureDevAuthToken }) {
880
946
  let promise;
881
947
  let initalized;
882
948
  const processId = "devtools:analyze-build";
883
- const analyzeDir = join$1(nuxt.options.rootDir, ".nuxt/analyze");
949
+ const analyzeDir = join(nuxt.options.rootDir, ".nuxt/analyze");
884
950
  async function startAnalyzeBuild(name) {
885
951
  if (promise)
886
952
  throw new Error("Already building");
@@ -907,14 +973,14 @@ function setupAnalyzeBuildRPC({ nuxt, refresh, ensureDevAuthToken }) {
907
973
  async function readBuildInfo() {
908
974
  const files = await fg("*/meta.json", { cwd: analyzeDir, onlyFiles: true, absolute: true });
909
975
  builds = await Promise.all(files.map(async (file) => {
910
- const dir = dirname(file);
976
+ const dir = dirname$1(file);
911
977
  const json = JSON.parse(await fs.readFile(file, "utf-8"));
912
978
  return {
913
979
  ...json,
914
980
  features: {
915
- bundleClient: fs$1.existsSync(join$1(dir, "client.html")),
916
- bundleNitro: fs$1.existsSync(join$1(dir, "nitro.html")),
917
- viteInspect: fs$1.existsSync(join$1(dir, ".vite-inspect"))
981
+ bundleClient: fs$1.existsSync(join(dir, "client.html")),
982
+ bundleNitro: fs$1.existsSync(join(dir, "nitro.html")),
983
+ viteInspect: fs$1.existsSync(join(dir, ".vite-inspect"))
918
984
  }
919
985
  };
920
986
  }));
@@ -950,7 +1016,7 @@ function setupAnalyzeBuildRPC({ nuxt, refresh, ensureDevAuthToken }) {
950
1016
  await fs.rm(analyzeDir, { recursive: true, force: true });
951
1017
  } else {
952
1018
  const targets = builds.filter((build) => names.includes(build.name));
953
- await Promise.all(targets.map((target) => fs.rm(join$1(analyzeDir, target.slug), { recursive: true, force: true })));
1019
+ await Promise.all(targets.map((target) => fs.rm(join(analyzeDir, target.slug), { recursive: true, force: true })));
954
1020
  }
955
1021
  initalized = readBuildInfo();
956
1022
  refresh("getAnalyzeBuildInfo");
@@ -963,59 +1029,6 @@ function setupAnalyzeBuildRPC({ nuxt, refresh, ensureDevAuthToken }) {
963
1029
  };
964
1030
  }
965
1031
 
966
- async function readLocalOptions(defaults, options) {
967
- const { filePath } = getOptionsFilepath(options);
968
- if (existsSync(filePath)) {
969
- try {
970
- const options2 = {
971
- ...defaults,
972
- ...JSON.parse(await fs.readFile(filePath, "utf-8")).settings || {}
973
- };
974
- return options2;
975
- } catch (e) {
976
- console.error(`[DevTools] failed to parse local options file: ${filePath}, fallback to defaults`);
977
- console.error(e);
978
- return { ...defaults };
979
- }
980
- } else {
981
- return { ...defaults };
982
- }
983
- }
984
- function getOptionsFilepath(options) {
985
- let hashedKey;
986
- if (options.key)
987
- hashedKey = hash(`${options.root}:${options.key}`);
988
- else
989
- hashedKey = hash(options.root);
990
- const filePath = join$1(homedir(), ".nuxt/devtools", `${hashedKey}.json`);
991
- return {
992
- filePath,
993
- hashedKey
994
- };
995
- }
996
- async function clearLocalOptions(options) {
997
- const { filePath } = getOptionsFilepath(options);
998
- if (existsSync(filePath))
999
- await fs.unlink(filePath);
1000
- }
1001
- async function writeLocalOptions(settings, options) {
1002
- const { filePath, hashedKey } = getOptionsFilepath(options);
1003
- await fs.mkdir(dirname$1(filePath), { recursive: true });
1004
- await fs.writeFile(
1005
- filePath,
1006
- JSON.stringify(
1007
- {
1008
- root: options.root,
1009
- hash: hashedKey,
1010
- settings
1011
- },
1012
- null,
1013
- 2
1014
- ),
1015
- "utf-8"
1016
- );
1017
- }
1018
-
1019
1032
  let options;
1020
1033
  function getOptions() {
1021
1034
  return options;
@@ -1264,11 +1277,11 @@ async function enableModule(options, nuxt) {
1264
1277
  await nuxt.callHook("devtools:before");
1265
1278
  nuxt.options.imports.collectMeta = true;
1266
1279
  addPlugin({
1267
- src: join$1(runtimeDir, "plugins/devtools.client"),
1280
+ src: join(runtimeDir, "plugins/devtools.client"),
1268
1281
  mode: "client"
1269
1282
  });
1270
1283
  addPlugin({
1271
- src: join$1(runtimeDir, "plugins/devtools.server"),
1284
+ src: join(runtimeDir, "plugins/devtools.server"),
1272
1285
  mode: "server"
1273
1286
  });
1274
1287
  addTemplate({
@@ -1290,7 +1303,7 @@ async function enableModule(options, nuxt) {
1290
1303
  nuxt.hook("nitro:config", (config) => {
1291
1304
  config.externals = config.externals || {};
1292
1305
  config.externals.inline = config.externals.inline || [];
1293
- config.externals.inline.push(join$1(runtimeDir, "nitro"));
1306
+ config.externals.inline.push(join(runtimeDir, "nitro"));
1294
1307
  config.virtual = config.virtual || {};
1295
1308
  config.virtual["#nuxt-devtools-inline"] = `export const script = \`
1296
1309
  if (!window.__NUXT_DEVTOOLS_TIME_METRIC__) {
@@ -1303,7 +1316,7 @@ if (!window.__NUXT_DEVTOOLS_TIME_METRIC__) {
1303
1316
  window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
1304
1317
  \``;
1305
1318
  config.plugins = config.plugins || [];
1306
- config.plugins.unshift(join$1(runtimeDir, "nitro/inline"));
1319
+ config.plugins.unshift(join(runtimeDir, "nitro/inline"));
1307
1320
  });
1308
1321
  const {
1309
1322
  vitePlugin,
@@ -1311,7 +1324,7 @@ window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
1311
1324
  } = setupRPC(nuxt, options);
1312
1325
  addVitePlugin(vitePlugin);
1313
1326
  const clientDirExists = existsSync(clientDir);
1314
- const analyzeDir = join$1(nuxt.options.rootDir, ".nuxt/analyze");
1327
+ const analyzeDir = join(nuxt.options.rootDir, ".nuxt/analyze");
1315
1328
  nuxt.hook("vite:extendConfig", (config) => {
1316
1329
  config.server ||= {};
1317
1330
  config.server.fs ||= {};
@@ -1328,7 +1341,7 @@ window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
1328
1341
  nuxt.hook("imports:extend", (imports) => {
1329
1342
  imports.push({
1330
1343
  name: "useNuxtDevTools",
1331
- from: join$1(runtimeDir, "use-nuxt-devtools")
1344
+ from: join(runtimeDir, "use-nuxt-devtools")
1332
1345
  });
1333
1346
  });
1334
1347
  const ROUTE_PATH = `${nuxt.options.app.baseURL || "/"}/__nuxt_devtools__`.replace(/\/+/g, "/");
@@ -1339,7 +1352,7 @@ window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
1339
1352
  nuxt.hook("vite:serverCreated", (server) => {
1340
1353
  server.middlewares.use(ROUTE_ANALYZE, sirv(analyzeDir, { single: false, dev: true }));
1341
1354
  if (clientDirExists) {
1342
- const indexHtmlPath = join$1(clientDir, "index.html");
1355
+ const indexHtmlPath = join(clientDir, "index.html");
1343
1356
  const indexContent = fs.readFile(indexHtmlPath, "utf-8");
1344
1357
  const handleStatic = sirv(clientDir, {
1345
1358
  dev: true,
@@ -1357,7 +1370,7 @@ window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
1357
1370
  return handleStatic(req, res, () => handleIndex(res));
1358
1371
  });
1359
1372
  }
1360
- server.middlewares.use(ROUTE_AUTH, sirv(join$1(runtimeDir, "auth"), { single: true, dev: true }));
1373
+ server.middlewares.use(ROUTE_AUTH, sirv(join(runtimeDir, "auth"), { single: true, dev: true }));
1361
1374
  server.middlewares.use(ROUTE_AUTH_VERIFY, async (req, res) => {
1362
1375
  const search = req.url?.split("?")[1];
1363
1376
  if (!search) {
@@ -14,11 +14,12 @@ import 'sirv';
14
14
  import 'consola/utils';
15
15
  import 'birpc';
16
16
  import 'flatted';
17
- import '../shared/devtools.6f6e0f47.mjs';
17
+ import '../shared/devtools.371fa152.mjs';
18
18
  import '../dirs.mjs';
19
19
  import 'node:url';
20
20
  import 'is-installed-globally';
21
21
  import '@antfu/utils';
22
+ import 'ohash';
22
23
  import 'image-meta';
23
24
  import 'perfect-debounce';
24
25
  import 'fast-glob';
@@ -33,7 +34,6 @@ import 'unimport';
33
34
  import 'destr';
34
35
  import 'scule';
35
36
  import 'simple-git';
36
- import 'ohash';
37
37
 
38
38
  async function setup({ nuxt, options, openInEditorHooks, rpc }) {
39
39
  const installed = !!await which("code-server").catch(() => null);
@@ -2,9 +2,9 @@
2
2
  <html >
3
3
  <head><meta charset="utf-8">
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1">
5
- <link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.aa8c94e8.css">
6
- <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.9a5af3dc.js">
7
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/index.06e4cc9c.js">
5
+ <link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.2732f55b.css">
6
+ <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.35c58391.js">
7
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/index.11f08f78.js">
8
8
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/onig.0c57a370.js">
9
9
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vitesse-dark.ff0e7dcb.js">
10
10
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vitesse-light.c6996724.js">
@@ -18,24 +18,24 @@
18
18
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vue-html.88dda4a8.js">
19
19
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/diff.22e0b108.js">
20
20
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/shellscript.e25d1410.js">
21
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default.50175b13.js">
22
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full.f21cfe4d.js">
23
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none.7a39bbba.js">
21
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default.97700872.js">
22
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full.72d92407.js">
23
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none.9d86a5c5.js">
24
24
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-docs.100caa70.js">
25
25
  <link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NCodeBlock.6994516c.css">
26
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/DataSchemaDrawer.3aeebd14.js">
27
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NSelect.vue.c8c511ae.js">
28
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NSwitch.vue.1cea2bc6.js">
29
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NDropdown.vue.ff9a8df2.js">
30
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NCodeBlock.vue.c80c8282.js">
31
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client.b8ca1554.js">
32
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NDrawer.vue.e2617b9c.js">
33
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime.dfaa24d0.js">
26
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/DataSchemaDrawer.b2c7e5f0.js">
27
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NSelect.vue.7cf27fe7.js">
28
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NSwitch.vue.6fd7c26d.js">
29
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NDropdown.vue.ddbb4404.js">
30
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NCodeBlock.vue.4697f7e4.js">
31
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client.bd4053bc.js">
32
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NDrawer.vue.4b4bd813.js">
33
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime.eab56c8d.js">
34
34
  <link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.82ac0ec5.css">
35
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.0dae1ccf.js">
35
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.576aef72.js">
36
36
  <link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.ff959f66.css">
37
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.0a479375.js">
38
- <script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.9a5af3dc.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window&&window.localStorage&&window.localStorage.getItem&&window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?d():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:d,addColorScheme:i,removeColorScheme:f};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function f(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function d(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
37
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.61e43a5a.js">
38
+ <script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.35c58391.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window&&window.localStorage&&window.localStorage.getItem&&window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?d():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:d,addColorScheme:i,removeColorScheme:f};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function f(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function d(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
39
39
  </script></head>
40
40
  <body ><div id="__nuxt"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4},{},false,{},{}]</script>
41
41
  <script>window.__NUXT__={};window.__NUXT__.config={public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body>
@@ -2,9 +2,9 @@
2
2
  <html >
3
3
  <head><meta charset="utf-8">
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1">
5
- <link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.aa8c94e8.css">
6
- <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.9a5af3dc.js">
7
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/index.06e4cc9c.js">
5
+ <link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.2732f55b.css">
6
+ <link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.35c58391.js">
7
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/index.11f08f78.js">
8
8
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/onig.0c57a370.js">
9
9
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vitesse-dark.ff0e7dcb.js">
10
10
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vitesse-light.c6996724.js">
@@ -18,24 +18,24 @@
18
18
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vue-html.88dda4a8.js">
19
19
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/diff.22e0b108.js">
20
20
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/shellscript.e25d1410.js">
21
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default.50175b13.js">
22
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full.f21cfe4d.js">
23
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none.7a39bbba.js">
21
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default.97700872.js">
22
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full.72d92407.js">
23
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none.9d86a5c5.js">
24
24
  <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-docs.100caa70.js">
25
25
  <link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NCodeBlock.6994516c.css">
26
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/DataSchemaDrawer.3aeebd14.js">
27
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NSelect.vue.c8c511ae.js">
28
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NSwitch.vue.1cea2bc6.js">
29
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NDropdown.vue.ff9a8df2.js">
30
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NCodeBlock.vue.c80c8282.js">
31
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client.b8ca1554.js">
32
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NDrawer.vue.e2617b9c.js">
33
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime.dfaa24d0.js">
26
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/DataSchemaDrawer.b2c7e5f0.js">
27
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NSelect.vue.7cf27fe7.js">
28
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NSwitch.vue.6fd7c26d.js">
29
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NDropdown.vue.ddbb4404.js">
30
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NCodeBlock.vue.4697f7e4.js">
31
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client.bd4053bc.js">
32
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NDrawer.vue.4b4bd813.js">
33
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime.eab56c8d.js">
34
34
  <link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.82ac0ec5.css">
35
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.0dae1ccf.js">
35
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.576aef72.js">
36
36
  <link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.ff959f66.css">
37
- <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.0a479375.js">
38
- <script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.9a5af3dc.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window&&window.localStorage&&window.localStorage.getItem&&window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?d():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:d,addColorScheme:i,removeColorScheme:f};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function f(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function d(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
37
+ <link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.61e43a5a.js">
38
+ <script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.35c58391.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window&&window.localStorage&&window.localStorage.getItem&&window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?d():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:d,addColorScheme:i,removeColorScheme:f};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function f(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function d(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
39
39
  </script></head>
40
40
  <body ><div id="__nuxt"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4},{},false,{},{}]</script>
41
41
  <script>window.__NUXT__={};window.__NUXT__.config={public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body>
@@ -1,3 +1,3 @@
1
- import{_ as R}from"./NCodeBlock.vue.c80c8282.js";import{d as _,a as N,r as F,am as W,bE as A,o as B,h as J,f as V}from"./entry.9a5af3dc.js";function m(){}m.prototype={diff:function(e,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f=o.callback;typeof o=="function"&&(f=o,o={}),this.options=o;var r=this;function l(c){return f?(setTimeout(function(){f(void 0,c)},0),!0):c}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var i=t.length,s=e.length,u=1,d=i+s;o.maxEditLength&&(d=Math.min(d,o.maxEditLength));var a=[{newPos:-1,components:[]}],p=this.extractCommon(a[0],t,e,0);if(a[0].newPos+1>=i&&p+1>=s)return l([{value:this.join(t),count:t.length}]);function v(){for(var c=-1*u;c<=u;c+=2){var h=void 0,w=a[c-1],C=a[c+1],g=(C?C.newPos:0)-c;w&&(a[c-1]=void 0);var q=w&&w.newPos+1<i,$=C&&0<=g&&g<s;if(!q&&!$){a[c]=void 0;continue}if(!q||$&&w.newPos<C.newPos?(h=Z(C),r.pushComponent(h.components,void 0,!0)):(h=w,h.newPos++,r.pushComponent(h.components,!0,void 0)),g=r.extractCommon(h,t,e,c),h.newPos+1>=i&&g+1>=s)return l(M(r,h.components,t,e,r.useLongestToken));a[c]=h}u++}if(f)(function c(){setTimeout(function(){if(u>d)return f();v()||c()},0)})();else for(;u<=d;){var y=v();if(y)return y}},pushComponent:function(e,t,o){var f=e[e.length-1];f&&f.added===t&&f.removed===o?e[e.length-1]={count:f.count+1,added:t,removed:o}:e.push({count:1,added:t,removed:o})},extractCommon:function(e,t,o,f){for(var r=t.length,l=o.length,i=e.newPos,s=i-f,u=0;i+1<r&&s+1<l&&this.equals(t[i+1],o[s+1]);)i++,s++,u++;return u&&e.components.push({count:u}),e.newPos=i,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],o=0;o<e.length;o++)e[o]&&t.push(e[o]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function M(n,e,t,o,f){for(var r=0,l=e.length,i=0,s=0;r<l;r++){var u=e[r];if(u.removed){if(u.value=n.join(o.slice(s,s+u.count)),s+=u.count,r&&e[r-1].added){var a=e[r-1];e[r-1]=e[r],e[r]=a}}else{if(!u.added&&f){var d=t.slice(i,i+u.count);d=d.map(function(v,y){var c=o[s+y];return c.length>v.length?c:v}),u.value=n.join(d)}else u.value=n.join(t.slice(i,i+u.count));i+=u.count,u.added||(s+=u.count)}}var p=e[l-1];return l>1&&typeof p.value=="string"&&(p.added||p.removed)&&n.equals("",p.value)&&(e[l-2].value+=p.value,e.pop()),e}function Z(n){return{newPos:n.newPos,components:n.components.slice(0)}}var I=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,T=/\S/,O=new m;O.equals=function(n,e){return this.options.ignoreCase&&(n=n.toLowerCase(),e=e.toLowerCase()),n===e||this.options.ignoreWhitespace&&!T.test(n)&&!T.test(e)};O.tokenize=function(n){for(var e=n.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),t=0;t<e.length-1;t++)!e[t+1]&&e[t+2]&&I.test(e[t])&&I.test(e[t+2])&&(e[t]+=e[t+2],e.splice(t+1,2),t--);return e};var D=new m;D.tokenize=function(n){var e=[],t=n.split(/(\n|\r\n)/);t[t.length-1]||t.pop();for(var o=0;o<t.length;o++){var f=t[o];o%2&&!this.options.newlineIsToken?e[e.length-1]+=f:(this.options.ignoreWhitespace&&(f=f.trim()),e.push(f))}return e};function k(n,e,t){return D.diff(n,e,t)}var G=new m;G.tokenize=function(n){return n.split(/(\S.+?[.!?])(?=\s+|$)/)};var H=new m;H.tokenize=function(n){return n.split(/([{}:;,]|\s+)/)};function E(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?E=function(e){return typeof e}:E=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(n)}var Q=Object.prototype.toString,L=new m;L.useLongestToken=!0;L.tokenize=D.tokenize;L.castInput=function(n){var e=this.options,t=e.undefinedReplacement,o=e.stringifyReplacer,f=o===void 0?function(r,l){return typeof l>"u"?t:l}:o;return typeof n=="string"?n:JSON.stringify(z(n,null,null,f),f," ")};L.equals=function(n,e){return m.prototype.equals.call(L,n.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};function z(n,e,t,o,f){e=e||[],t=t||[],o&&(n=o(f,n));var r;for(r=0;r<e.length;r+=1)if(e[r]===n)return t[r];var l;if(Q.call(n)==="[object Array]"){for(e.push(n),l=new Array(n.length),t.push(l),r=0;r<n.length;r+=1)l[r]=z(n[r],e,t,o,f);return e.pop(),t.pop(),l}if(n&&n.toJSON&&(n=n.toJSON()),E(n)==="object"&&n!==null){e.push(n),l={},t.push(l);var i=[],s;for(s in n)n.hasOwnProperty(s)&&i.push(s);for(i.sort(),r=0;r<i.length;r+=1)s=i[r],l[s]=z(n[s],e,t,o,s);e.pop(),t.pop()}else l=n;return l}var x=new m;x.tokenize=function(n){return n.slice()};x.join=x.removeEmpty=function(n){return n};const Y=_({__name:"CodeDiff",props:{from:{},to:{},lang:{}},setup(n){const e=n;function t(i,s){const u=k(i.trim(),s.trim()),d=[],a=[],p=[];for(const v of u){const y=v.value.trimEnd().split(`
1
+ import{_ as R}from"./NCodeBlock.vue.4697f7e4.js";import{d as _,a as F,r as N,an as W,bF as A,o as B,h as J,f as V}from"./entry.35c58391.js";function m(){}m.prototype={diff:function(e,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f=o.callback;typeof o=="function"&&(f=o,o={}),this.options=o;var r=this;function l(c){return f?(setTimeout(function(){f(void 0,c)},0),!0):c}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var i=t.length,s=e.length,u=1,d=i+s;o.maxEditLength&&(d=Math.min(d,o.maxEditLength));var a=[{newPos:-1,components:[]}],p=this.extractCommon(a[0],t,e,0);if(a[0].newPos+1>=i&&p+1>=s)return l([{value:this.join(t),count:t.length}]);function v(){for(var c=-1*u;c<=u;c+=2){var h=void 0,w=a[c-1],C=a[c+1],g=(C?C.newPos:0)-c;w&&(a[c-1]=void 0);var q=w&&w.newPos+1<i,$=C&&0<=g&&g<s;if(!q&&!$){a[c]=void 0;continue}if(!q||$&&w.newPos<C.newPos?(h=Z(C),r.pushComponent(h.components,void 0,!0)):(h=w,h.newPos++,r.pushComponent(h.components,!0,void 0)),g=r.extractCommon(h,t,e,c),h.newPos+1>=i&&g+1>=s)return l(M(r,h.components,t,e,r.useLongestToken));a[c]=h}u++}if(f)(function c(){setTimeout(function(){if(u>d)return f();v()||c()},0)})();else for(;u<=d;){var y=v();if(y)return y}},pushComponent:function(e,t,o){var f=e[e.length-1];f&&f.added===t&&f.removed===o?e[e.length-1]={count:f.count+1,added:t,removed:o}:e.push({count:1,added:t,removed:o})},extractCommon:function(e,t,o,f){for(var r=t.length,l=o.length,i=e.newPos,s=i-f,u=0;i+1<r&&s+1<l&&this.equals(t[i+1],o[s+1]);)i++,s++,u++;return u&&e.components.push({count:u}),e.newPos=i,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],o=0;o<e.length;o++)e[o]&&t.push(e[o]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function M(n,e,t,o,f){for(var r=0,l=e.length,i=0,s=0;r<l;r++){var u=e[r];if(u.removed){if(u.value=n.join(o.slice(s,s+u.count)),s+=u.count,r&&e[r-1].added){var a=e[r-1];e[r-1]=e[r],e[r]=a}}else{if(!u.added&&f){var d=t.slice(i,i+u.count);d=d.map(function(v,y){var c=o[s+y];return c.length>v.length?c:v}),u.value=n.join(d)}else u.value=n.join(t.slice(i,i+u.count));i+=u.count,u.added||(s+=u.count)}}var p=e[l-1];return l>1&&typeof p.value=="string"&&(p.added||p.removed)&&n.equals("",p.value)&&(e[l-2].value+=p.value,e.pop()),e}function Z(n){return{newPos:n.newPos,components:n.components.slice(0)}}var I=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,T=/\S/,O=new m;O.equals=function(n,e){return this.options.ignoreCase&&(n=n.toLowerCase(),e=e.toLowerCase()),n===e||this.options.ignoreWhitespace&&!T.test(n)&&!T.test(e)};O.tokenize=function(n){for(var e=n.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),t=0;t<e.length-1;t++)!e[t+1]&&e[t+2]&&I.test(e[t])&&I.test(e[t+2])&&(e[t]+=e[t+2],e.splice(t+1,2),t--);return e};var D=new m;D.tokenize=function(n){var e=[],t=n.split(/(\n|\r\n)/);t[t.length-1]||t.pop();for(var o=0;o<t.length;o++){var f=t[o];o%2&&!this.options.newlineIsToken?e[e.length-1]+=f:(this.options.ignoreWhitespace&&(f=f.trim()),e.push(f))}return e};function k(n,e,t){return D.diff(n,e,t)}var G=new m;G.tokenize=function(n){return n.split(/(\S.+?[.!?])(?=\s+|$)/)};var H=new m;H.tokenize=function(n){return n.split(/([{}:;,]|\s+)/)};function z(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?z=function(e){return typeof e}:z=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z(n)}var Q=Object.prototype.toString,L=new m;L.useLongestToken=!0;L.tokenize=D.tokenize;L.castInput=function(n){var e=this.options,t=e.undefinedReplacement,o=e.stringifyReplacer,f=o===void 0?function(r,l){return typeof l>"u"?t:l}:o;return typeof n=="string"?n:JSON.stringify(E(n,null,null,f),f," ")};L.equals=function(n,e){return m.prototype.equals.call(L,n.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};function E(n,e,t,o,f){e=e||[],t=t||[],o&&(n=o(f,n));var r;for(r=0;r<e.length;r+=1)if(e[r]===n)return t[r];var l;if(Q.call(n)==="[object Array]"){for(e.push(n),l=new Array(n.length),t.push(l),r=0;r<n.length;r+=1)l[r]=E(n[r],e,t,o,f);return e.pop(),t.pop(),l}if(n&&n.toJSON&&(n=n.toJSON()),z(n)==="object"&&n!==null){e.push(n),l={},t.push(l);var i=[],s;for(s in n)n.hasOwnProperty(s)&&i.push(s);for(i.sort(),r=0;r<i.length;r+=1)s=i[r],l[s]=E(n[s],e,t,o,s);e.pop(),t.pop()}else l=n;return l}var x=new m;x.tokenize=function(n){return n.slice()};x.join=x.removeEmpty=function(n){return n};const Y=_({__name:"CodeDiff",props:{from:{},to:{},lang:{}},setup(n){const e=n;function t(i,s){const u=k(i.trim(),s.trim()),d=[],a=[],p=[];for(const v of u){const y=v.value.trimEnd().split(`
2
2
  `);for(const c of y)v.added?(d.push(p.length),p.push(c)):(v.removed&&a.push(p.length),p.push(c))}return{added:d,removed:a,result:p.join(`
3
- `)}}const o=N(()=>t(e.from,e.to));function f(i){let s=0;return i.replace(/class="shiki/,'class="shiki diff').replace(/class="line"/g,u=>(s++,o.value.added.includes(s-1)?'class="line line-added"':o.value.removed.includes(s-1)?'class="line line-removed"':u))}const r=F();W(l);function l(){const i=A(r);i&&i.querySelector(".line-added,.line-removed")?.scrollIntoView()}return(i,s)=>{const u=R;return B(),J(u,{ref_key:"elRef",ref:r,code:V(o).result,lang:i.lang,"transform-rendered":f,onLoaded:l},null,8,["code","lang"])}}});export{Y as _};
3
+ `)}}const o=F(()=>t(e.from,e.to));function f(i){let s=0;return i.replace(/class="shiki/,'class="shiki diff').replace(/class="line"/g,u=>(s++,o.value.added.includes(s-1)?'class="line line-added"':o.value.removed.includes(s-1)?'class="line line-removed"':u))}const r=N();W(l);function l(){const i=A(r);i&&i.querySelector(".line-added,.line-removed")?.scrollIntoView()}return(i,s)=>{const u=R;return B(),J(u,{ref_key:"elRef",ref:r,code:V(o).result,lang:i.lang,"transform-rendered":f,onLoaded:l},null,8,["code","lang"])}}});export{Y as _};
@@ -1 +1 @@
1
- import{_ as I}from"./NMarkdown.vue.07fe8875.js";import{d as V,e as D,aa as U,a as c,ao as $,o as s,h as r,j as i,k as o,p as l,i as j,f as e,v as u,m as _,F as v,t as h,n as E,G as F,_ as S}from"./entry.9a5af3dc.js";import{_ as z}from"./FilepathItem.vue.ca308ea2.js";import{C as k}from"./constants.2cc6e981.js";const G={"hover:text-primary":""},L={key:0,"text-primary":""},M={"max-w-100":""},O={px4:"",py3:"","text-sm":""},T={flex:"~ gap2",n:"primary xs"},W={border:"t base","max-h-60":"","of-auto":"",px4:"",py3:""},q={"text-sm":""},A=o("span",{op50:""},"It has been referenced ",-1),H={"text-primary":""},J=o("span",{op50:""}," times by:",-1),K={flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},P={key:1,"text-sm":"",op50:""},Z=V({__name:"ComposableItem",props:{item:{},metadata:{},filepath:{},counter:{type:Boolean,default:!0},classes:{default:"px2 py1 text-sm bg-gray:5 "}},setup(x){const t=x,b=D(),g=U(),m=c(()=>t.item.as||t.item.name),n=c(()=>t.metadata?.injectionUsage?.[m.value]?.count||0),C=c(()=>(t.metadata?.injectionUsage?.[m.value]?.moduleIds||[]).filter(a=>!a.endsWith("?macro=true"))),y=c(()=>{if(t.item.meta?.docsUrl)return t.item.meta.docsUrl;if(["nuxt","#app","nuxt3"].includes(t.item.from))return k.nuxt[t.item.name];if(t.item.from==="vue")return k.vue[t.item.name]});return(a,p)=>{const w=I,f=S,N=z,B=$("VDropdown");return s(),r(B,{disabled:!t.metadata},{popper:i(()=>[o("div",M,[o("div",O,[a.item.meta?.description?(s(),r(w,{key:0,tag:"div",pb3:"","text-sm":"",markdown:a.item.meta.description},null,8,["markdown"])):l("",!0),o("div",T,[j(f,{icon:"carbon-copy",onClick:p[0]||(p[0]=d=>e(b)(e(m),"imports-name"))},{default:i(()=>[u(" Copy ")]),_:1}),a.filepath?(s(),r(f,{key:0,icon:"carbon-code",onClick:p[1]||(p[1]=d=>a.filepath&&e(g)(a.filepath))},{default:i(()=>[u(" Source ")]),_:1})):l("",!0),e(y)?(s(),r(f,{key:1,icon:"carbon-catalog",to:e(y),target:"_blank"},{default:i(()=>[u(" Docs ")]),_:1},8,["to"])):l("",!0)])]),o("div",W,[e(n)?(s(),_(v,{key:0},[o("div",q,[A,o("strong",H,h(e(n)),1),J]),o("div",K,[(s(!0),_(v,null,E(e(C),d=>(s(),r(N,{key:d,filepath:d},null,8,["filepath"]))),128))])],64)):(s(),_("div",P," Not in use via auto import. "))])])]),default:i(()=>[o("button",G,[o("code",{rounded:"","font-mono":"",class:F([a.metadata&&!e(n)?"op30 hover:op100":"",a.classes])},[u(h(e(m))+" ",1),e(n)&&a.counter?(s(),_("sup",L,"x"+h(e(n)),1)):l("",!0)],2)])]),_:1},8,["disabled"])}}});export{Z as _};
1
+ import{_ as I}from"./NMarkdown.vue.d386a844.js";import{d as V,e as D,ac as U,a as c,ap as $,o as s,h as r,j as i,k as o,p as l,i as j,f as e,v as u,m as _,F as v,t as h,n as E,G as F,_ as S}from"./entry.35c58391.js";import{_ as z}from"./FilepathItem.vue.7a091e26.js";import{C as k}from"./constants.2cc6e981.js";const G={"hover:text-primary":""},L={key:0,"text-primary":""},M={"max-w-100":""},O={px4:"",py3:"","text-sm":""},T={flex:"~ gap2",n:"primary xs"},W={border:"t base","max-h-60":"","of-auto":"",px4:"",py3:""},q={"text-sm":""},A=o("span",{op50:""},"It has been referenced ",-1),H={"text-primary":""},J=o("span",{op50:""}," times by:",-1),K={flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},P={key:1,"text-sm":"",op50:""},Z=V({__name:"ComposableItem",props:{item:{},metadata:{},filepath:{},counter:{type:Boolean,default:!0},classes:{default:"px2 py1 text-sm bg-gray:5 "}},setup(x){const t=x,b=D(),g=U(),m=c(()=>t.item.as||t.item.name),n=c(()=>t.metadata?.injectionUsage?.[m.value]?.count||0),C=c(()=>(t.metadata?.injectionUsage?.[m.value]?.moduleIds||[]).filter(a=>!a.endsWith("?macro=true"))),y=c(()=>{if(t.item.meta?.docsUrl)return t.item.meta.docsUrl;if(["nuxt","#app","nuxt3"].includes(t.item.from))return k.nuxt[t.item.name];if(t.item.from==="vue")return k.vue[t.item.name]});return(a,p)=>{const w=I,f=S,N=z,B=$("VDropdown");return s(),r(B,{disabled:!t.metadata},{popper:i(()=>[o("div",M,[o("div",O,[a.item.meta?.description?(s(),r(w,{key:0,tag:"div",pb3:"","text-sm":"",markdown:a.item.meta.description},null,8,["markdown"])):l("",!0),o("div",T,[j(f,{icon:"carbon-copy",onClick:p[0]||(p[0]=d=>e(b)(e(m),"imports-name"))},{default:i(()=>[u(" Copy ")]),_:1}),a.filepath?(s(),r(f,{key:0,icon:"carbon-code",onClick:p[1]||(p[1]=d=>a.filepath&&e(g)(a.filepath))},{default:i(()=>[u(" Source ")]),_:1})):l("",!0),e(y)?(s(),r(f,{key:1,icon:"carbon-catalog",to:e(y),target:"_blank"},{default:i(()=>[u(" Docs ")]),_:1},8,["to"])):l("",!0)])]),o("div",W,[e(n)?(s(),_(v,{key:0},[o("div",q,[A,o("strong",H,h(e(n)),1),J]),o("div",K,[(s(!0),_(v,null,E(e(C),d=>(s(),r(N,{key:d,filepath:d},null,8,["filepath"]))),128))])],64)):(s(),_("div",P," Not in use via auto import. "))])])]),default:i(()=>[o("button",G,[o("code",{rounded:"","font-mono":"",class:F([a.metadata&&!e(n)?"op30 hover:op100":"",a.classes])},[u(h(e(m))+" ",1),e(n)&&a.counter?(s(),_("sup",L,"x"+h(e(n)),1)):l("",!0)],2)])]),_:1},8,["disabled"])}}});export{Z as _};
@@ -1 +1 @@
1
- import{d as r,u as s,a1 as c,I as i,o as p,h as _,_ as u}from"./entry.9a5af3dc.js";const f=r({__name:"DataSchemaButton",props:{getter:{type:Function}},setup(l){const t=s();return(n,e)=>{const o=u,a=c("tooltip");return i((p(),_(o,{title:"Generate Data Schema",icon:"carbon:container-services",border:!1,onClick:e[0]||(e[0]=m=>t.value=n.getter())},null,512)),[[a,"Generate Data Schema"]])}}});export{f as _};
1
+ import{d as r,u as s,a2 as c,I as i,o as p,h as _,_ as u}from"./entry.35c58391.js";const f=r({__name:"DataSchemaButton",props:{getter:{type:Function}},setup(l){const t=s();return(n,e)=>{const o=u,a=c("tooltip");return i((p(),_(o,{title:"Generate Data Schema",icon:"carbon:container-services",border:!1,onClick:e[0]||(e[0]=m=>t.value=n.getter())},null,512)),[[a,"Generate Data Schema"]])}}});export{f as _};