@nuxt/devtools 0.8.5 → 1.0.0-beta.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 (119) hide show
  1. package/README.md +1 -5
  2. package/dist/chunks/module-main.mjs +54 -26
  3. package/dist/chunks/vscode.mjs +11 -11
  4. package/dist/client/200.html +17 -17
  5. package/dist/client/404.html +17 -17
  6. package/dist/client/_nuxt/{CodeDiff.vue.0e58df1f.js → CodeDiff.vue.3beaa134.js} +1 -1
  7. package/dist/client/_nuxt/{ComposableItem.vue.e263b9a9.js → ComposableItem.vue.136c5104.js} +1 -1
  8. package/dist/client/_nuxt/DataSchemaButton.vue.125423b7.js +1 -0
  9. package/dist/client/_nuxt/{DataSchemaDrawer.6de1f238.js → DataSchemaDrawer.8ac6b677.js} +2 -2
  10. package/dist/client/_nuxt/{DurationDisplay.vue.8da73fd3.js → DurationDisplay.vue.c49b4e64.js} +1 -1
  11. package/dist/client/_nuxt/{FilepathItem.vue.7bd675c6.js → FilepathItem.vue.5af0b5df.js} +1 -1
  12. package/dist/client/_nuxt/HelpFab.vue.98c902f4.js +1 -0
  13. package/dist/client/_nuxt/LaunchPage.vue.805f9595.js +1 -0
  14. package/dist/client/_nuxt/NBadge.98d5d309.js +1 -0
  15. package/dist/client/_nuxt/{NCheckbox.vue.fcd1d971.js → NCheckbox.vue.6fb2ece1.js} +1 -1
  16. package/dist/client/_nuxt/{NCodeBlock.vue.84865d5b.js → NCodeBlock.vue.adf1e9b4.js} +2 -2
  17. package/dist/client/_nuxt/NDrawer.vue.8e620517.js +1 -0
  18. package/dist/client/_nuxt/{NDropdown.vue.d756d40c.js → NDropdown.vue.b2f7aaef.js} +1 -1
  19. package/dist/client/_nuxt/{NIconTitle.vue.b6d28480.js → NIconTitle.vue.bf8093eb.js} +1 -1
  20. package/dist/client/_nuxt/NLink.vue.0e98999b.js +1 -0
  21. package/dist/client/_nuxt/{NMarkdown.vue.d2063d22.js → NMarkdown.vue.b0e8b2fc.js} +1 -1
  22. package/dist/client/_nuxt/{NSectionBlock.42a3cefc.js → NSectionBlock.4347cc14.js} +1 -1
  23. package/dist/client/_nuxt/NSelect.vue.4c22d30e.js +1 -0
  24. package/dist/client/_nuxt/{NSelectTabs.vue.4a83d611.js → NSelectTabs.vue.c9be0aa2.js} +1 -1
  25. package/dist/client/_nuxt/{NSwitch.vue.21018268.js → NSwitch.vue.de333089.js} +1 -1
  26. package/dist/client/_nuxt/{NTip.vue.d193bf96.js → NTip.vue.770a171a.js} +1 -1
  27. package/dist/client/_nuxt/{Navbar.vue.bacddf14.js → Navbar.vue.371e4d0a.js} +1 -1
  28. package/dist/client/_nuxt/StateEditor.vue.332bb451.js +1 -0
  29. package/dist/client/_nuxt/analyze-build.281c50c1.js +1 -0
  30. package/dist/client/_nuxt/assets.ca8faf7a.js +16 -0
  31. package/dist/client/_nuxt/{client.d926285a.js → client.3f2665f1.js} +1 -1
  32. package/dist/client/_nuxt/{components.fc36eeef.js → components.a8900a78.js} +26 -26
  33. package/dist/client/_nuxt/custom-_name_.c49c72a2.js +1 -0
  34. package/dist/client/_nuxt/{default.c4c43b40.js → default.3ba7d10b.js} +1 -1
  35. package/dist/client/_nuxt/entry.1c0836ed.css +1 -0
  36. package/dist/client/_nuxt/entry.e01776ec.js +27 -0
  37. package/dist/client/_nuxt/{error-404.087131b3.js → error-404.9d2aaad9.js} +1 -1
  38. package/dist/client/_nuxt/{error-500.d1c41037.js → error-500.20d1b3ce.js} +1 -1
  39. package/dist/client/_nuxt/{full.478da439.js → full.6d0fd7cf.js} +1 -1
  40. package/dist/client/_nuxt/hooks.908144b2.js +1 -0
  41. package/dist/client/_nuxt/{imports.79d88ab3.js → imports.d7bd415a.js} +1 -1
  42. package/dist/client/_nuxt/{index.5e3c6999.js → index.a0a2f0b3.js} +1 -1
  43. package/dist/client/_nuxt/index.eb95211d.js +1 -0
  44. package/dist/client/_nuxt/{json-editor-vue.ce96762e.js → json-editor-vue.b22bf91c.js} +1 -1
  45. package/dist/client/_nuxt/{middleware.87876377.js → middleware.9e4b2529.js} +1 -1
  46. package/dist/client/_nuxt/modules.fd214f26.js +2 -0
  47. package/dist/client/_nuxt/{none.cfaeed76.js → none.27bf71df.js} +1 -1
  48. package/dist/client/_nuxt/open-graph.b95ebacd.js +3 -0
  49. package/dist/client/_nuxt/overview.4991be1e.js +1 -0
  50. package/dist/client/_nuxt/pages.708b9e25.js +1 -0
  51. package/dist/client/_nuxt/payload.eaf10e21.js +1 -0
  52. package/dist/client/_nuxt/plugins.f02b2c56.js +1 -0
  53. package/dist/client/_nuxt/{runtime-configs.bf4f2459.js → runtime-configs.63235af8.js} +1 -1
  54. package/dist/client/_nuxt/server-routes.88eebd4c.js +9 -0
  55. package/dist/client/_nuxt/settings.7dbb31cf.js +1 -0
  56. package/dist/client/_nuxt/{state-components.c2201640.js → state-components.ca4a58b1.js} +1 -1
  57. package/dist/client/_nuxt/state-modules.6d6b039c.js +1 -0
  58. package/dist/client/_nuxt/storage-options.ab028b2a.js +1 -0
  59. package/dist/client/_nuxt/storage.27117a31.js +1 -0
  60. package/dist/client/_nuxt/{terminals.a1c82952.js → terminals.cdead889.js} +3 -3
  61. package/dist/client/_nuxt/timeline.ddc61557.js +29 -0
  62. package/dist/client/_nuxt/{unocss-runtime.dedd4a37.js → unocss-runtime.ddd835d7.js} +2 -2
  63. package/dist/client/_nuxt/virtual-files.9da3562d.js +1 -0
  64. package/dist/client/index.html +17 -17
  65. package/dist/client/modules/analyze-build/index.html +17 -17
  66. package/dist/client/modules/assets/index.html +17 -17
  67. package/dist/client/modules/components/index.html +17 -17
  68. package/dist/client/modules/hooks/index.html +17 -17
  69. package/dist/client/modules/imports/index.html +17 -17
  70. package/dist/client/modules/middleware/index.html +17 -17
  71. package/dist/client/modules/modules/index.html +17 -17
  72. package/dist/client/modules/open-graph/index.html +17 -17
  73. package/dist/client/modules/overview/index.html +17 -17
  74. package/dist/client/modules/pages/index.html +17 -17
  75. package/dist/client/modules/payload/index.html +17 -17
  76. package/dist/client/modules/plugins/index.html +17 -17
  77. package/dist/client/modules/runtime-configs/index.html +17 -17
  78. package/dist/client/modules/server-routes/index.html +17 -17
  79. package/dist/client/modules/storage/index.html +17 -17
  80. package/dist/client/modules/terminals/index.html +17 -17
  81. package/dist/client/modules/timeline/index.html +17 -17
  82. package/dist/client/modules/virtual-files/index.html +17 -17
  83. package/dist/client/settings/index.html +17 -17
  84. package/dist/module.json +1 -1
  85. package/dist/module.mjs +1 -1
  86. package/dist/runtime/plugins/view/Main.vue +39 -10
  87. package/dist/runtime/plugins/view/client.mjs +2 -1
  88. package/dist/runtime/settings.d.ts +4 -0
  89. package/dist/runtime/settings.mjs +2 -0
  90. package/dist/shared/{devtools.18eefaee.mjs → devtools.c28fc9a7.mjs} +3 -1
  91. package/package.json +16 -18
  92. package/dist/client/_nuxt/Badge.15b76164.js +0 -1
  93. package/dist/client/_nuxt/DataSchemaButton.vue.41ad6158.js +0 -1
  94. package/dist/client/_nuxt/DrawerRight.vue.5bde5a0b.js +0 -1
  95. package/dist/client/_nuxt/HelpFab.vue.f082102a.js +0 -1
  96. package/dist/client/_nuxt/LaunchPage.vue.f8df9e2a.js +0 -1
  97. package/dist/client/_nuxt/NLink.vue.e0a3a39a.js +0 -1
  98. package/dist/client/_nuxt/NSelect.vue.e3495019.js +0 -1
  99. package/dist/client/_nuxt/StateEditor.vue.5fea57d7.js +0 -1
  100. package/dist/client/_nuxt/analyze-build.7513704d.js +0 -1
  101. package/dist/client/_nuxt/assets.35017b46.js +0 -16
  102. package/dist/client/_nuxt/custom-_name_.50e8c68f.js +0 -1
  103. package/dist/client/_nuxt/entry.38bf3bdf.css +0 -1
  104. package/dist/client/_nuxt/entry.54b63325.js +0 -27
  105. package/dist/client/_nuxt/hooks.d9e8fd29.js +0 -1
  106. package/dist/client/_nuxt/index.86b1fd88.js +0 -1
  107. package/dist/client/_nuxt/modules.caf682af.js +0 -2
  108. package/dist/client/_nuxt/open-graph.cd0bdf97.js +0 -3
  109. package/dist/client/_nuxt/overview.14a73720.js +0 -1
  110. package/dist/client/_nuxt/pages.746eb038.js +0 -1
  111. package/dist/client/_nuxt/payload.913d1fd8.js +0 -1
  112. package/dist/client/_nuxt/plugins.5342d060.js +0 -1
  113. package/dist/client/_nuxt/server-routes.8c094c9d.js +0 -9
  114. package/dist/client/_nuxt/settings.59f50baa.js +0 -1
  115. package/dist/client/_nuxt/state-modules.8816f603.js +0 -1
  116. package/dist/client/_nuxt/storage-options.b1a5fc25.js +0 -1
  117. package/dist/client/_nuxt/storage.713a7e46.js +0 -1
  118. package/dist/client/_nuxt/timeline.9cfa88d9.js +0 -29
  119. package/dist/client/_nuxt/virtual-files.7dc060d0.js +0 -1
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <a href="https://devtools.nuxt.com"><img width="1200" alt="Nuxt DevTools" src="https://github-production-user-asset-6210df.s3.amazonaws.com/904724/261577617-a10567bd-ad33-48cc-9bda-9e37dbe1929f.png"></a>
2
2
  <br>
3
3
  <h1>
4
- Nuxt DevTools <sup>Preview</sup>
4
+ Nuxt DevTools
5
5
  </h1>
6
6
 
7
7
  [![npm version][npm-version-src]][npm-version-href]
@@ -23,10 +23,6 @@ Unleash Nuxt Developer Experience.
23
23
 
24
24
  <br>
25
25
 
26
- > **Warning**: Experimental and under heavy development. APIs are subject to change.
27
-
28
- <br>
29
-
30
26
  ## Installation
31
27
 
32
28
  > Nuxt DevTools requires **Nuxt v3.1.0 or higher**.
@@ -1,14 +1,14 @@
1
1
  import fs, { existsSync } from 'node:fs';
2
2
  import os, { homedir } from 'node:os';
3
3
  import { resolve, join as join$1, dirname } from 'pathe';
4
- import { logger, useNuxt, addPlugin, addVitePlugin } from '@nuxt/kit';
4
+ import { logger, useNuxt, addPlugin, addTemplate, addVitePlugin } from '@nuxt/kit';
5
5
  import { searchForWorkspaceRoot } from 'vite';
6
6
  import sirv from 'sirv';
7
7
  import { colors } from 'consola/utils';
8
8
  import { createBirpcGroup } from 'birpc';
9
9
  import { stringify, parse } from 'flatted';
10
- import { R as ROUTE_AUTH, d as defaultTabOptions, W as WS_EVENT_NAME, a as ROUTE_ANALYZE, b as ROUTE_CLIENT, c as ROUTE_AUTH_VERIFY } from '../shared/devtools.18eefaee.mjs';
11
- import { join } from 'node:path';
10
+ import { R as ROUTE_AUTH, d as defaultTabOptions, W as WS_EVENT_NAME, a as ROUTE_ANALYZE, b as ROUTE_CLIENT, c as ROUTE_AUTH_VERIFY } from '../shared/devtools.c28fc9a7.mjs';
11
+ import { join, dirname as dirname$1 } from 'node:path';
12
12
  import fsp from 'node:fs/promises';
13
13
  import { randomStr } from '@antfu/utils';
14
14
  import { imageMeta } from 'image-meta';
@@ -28,7 +28,7 @@ import Git from 'simple-git';
28
28
  import { hash } from 'ohash';
29
29
  import { runtimeDir, clientDir, packageDir, isGlobalInstall } from '../dirs.mjs';
30
30
 
31
- const version = "0.8.5";
31
+ const version = "1.0.0-beta.0";
32
32
 
33
33
  let token;
34
34
  async function getDevAuthToken() {
@@ -596,14 +596,15 @@ function setupGeneralRPC({ nuxt, options, refresh, openInEditorHooks }) {
596
596
  logger.info("Restarting Nuxt...");
597
597
  return nuxt.callHook("restart", { hard });
598
598
  },
599
- async requestForAuth(info) {
599
+ async requestForAuth(info, origin) {
600
600
  const token = await getDevAuthToken();
601
+ origin || (origin = `${nuxt.options.devServer.https ? "https" : "http"}://${nuxt.options.devServer.host === "::" ? "localhost" : nuxt.options.devServer.host || "localhost"}:${nuxt.options.devServer.port}`);
601
602
  const message = [
602
603
  `A browser is requesting permissions of ${colors.bold(colors.yellow("writing files and running commands"))} from the DevTools UI.`,
603
604
  colors.bold(info),
604
605
  "",
605
606
  "Please open the following URL in the browser:",
606
- colors.bold(colors.green(`${nuxt.options.devServer.https ? "https" : "http"}://${nuxt.options.devServer.host === "::" ? "localhost" : nuxt.options.devServer.host || "localhost"}:${nuxt.options.devServer.port}${ROUTE_AUTH}?token=${token}`)),
607
+ colors.bold(colors.green(`${origin}${ROUTE_AUTH}?token=${token}`)),
607
608
  "",
608
609
  "Or manually copy and paste the following token:",
609
610
  colors.bold(colors.cyan(token))
@@ -668,7 +669,7 @@ function setupWizardRPC({ nuxt, ensureDevAuthToken }) {
668
669
  };
669
670
  }
670
671
 
671
- function setupTerminalRPC({ nuxt, rpc, refresh }) {
672
+ function setupTerminalRPC({ nuxt, rpc, refresh, ensureDevAuthToken }) {
672
673
  const terminals = /* @__PURE__ */ new Map();
673
674
  nuxt.hook("devtools:terminal:register", (terminal) => {
674
675
  terminals.set(terminal.id, terminal);
@@ -718,10 +719,12 @@ function setupTerminalRPC({ nuxt, rpc, refresh }) {
718
719
  getTerminals() {
719
720
  return Array.from(terminals.values()).map((i) => serializeTerminal(i));
720
721
  },
721
- getTerminalDetail(id) {
722
+ async getTerminalDetail(token, id) {
723
+ await ensureDevAuthToken(token);
722
724
  return serializeTerminal(terminals.get(id), true);
723
725
  },
724
- async runTerminalAction(id, action) {
726
+ async runTerminalAction(token, id, action) {
727
+ await ensureDevAuthToken(token);
725
728
  const terminal = terminals.get(id);
726
729
  if (!terminal)
727
730
  return false;
@@ -887,13 +890,8 @@ function setupAnalyzeBuildRPC({ nuxt, refresh, ensureDevAuthToken }) {
887
890
  };
888
891
  }
889
892
 
890
- async function readOptions(defaults, options) {
891
- let hashedKey;
892
- if (options.key)
893
- hashedKey = hash(`${options.root}:${options.key}`);
894
- else
895
- hashedKey = hash(options.root);
896
- const filePath = join$1(homedir(), ".nuxt/devtools", `${hashedKey}.json`);
893
+ async function readLocalOptions(defaults, options) {
894
+ const { filePath } = getOptionsFilepath(options);
897
895
  if (existsSync(filePath)) {
898
896
  const options2 = {
899
897
  ...defaults,
@@ -904,16 +902,21 @@ async function readOptions(defaults, options) {
904
902
  return { ...defaults };
905
903
  }
906
904
  }
907
- async function writeOptions(settings, options) {
908
- const dir = join$1(homedir(), ".nuxt/devtools");
909
- if (!existsSync(dir))
910
- await fsp.mkdir(dir, { recursive: true });
905
+ function getOptionsFilepath(options) {
911
906
  let hashedKey;
912
907
  if (options.key)
913
908
  hashedKey = hash(`${options.root}:${options.key}`);
914
909
  else
915
910
  hashedKey = hash(options.root);
916
- const filePath = join$1(dir, `${hashedKey}.json`);
911
+ const filePath = join$1(homedir(), ".nuxt/devtools", `${hashedKey}.json`);
912
+ return {
913
+ filePath,
914
+ hashedKey
915
+ };
916
+ }
917
+ async function writeLocalOptions(settings, options) {
918
+ const { filePath, hashedKey } = getOptionsFilepath(options);
919
+ await fsp.mkdir(dirname$1(filePath), { recursive: true });
917
920
  await fsp.writeFile(
918
921
  filePath,
919
922
  JSON.stringify(
@@ -939,7 +942,7 @@ function setupOptionsRPC({ nuxt }) {
939
942
  return options[tab];
940
943
  }
941
944
  async function read(tab) {
942
- options[tab] = await readOptions(defaultTabOptions[tab], {
945
+ options[tab] = await readLocalOptions(defaultTabOptions[tab], {
943
946
  root: nuxt.options.rootDir,
944
947
  key: tab !== "ui" && tab
945
948
  });
@@ -949,9 +952,17 @@ function setupOptionsRPC({ nuxt }) {
949
952
  async updateOptions(tab, _settings) {
950
953
  const settings = await getOptions(tab);
951
954
  Object.assign(settings, _settings);
952
- await writeOptions({ ...settings }, {
953
- root: nuxt.options.rootDir,
954
- key: tab !== "ui" && tab
955
+ await writeLocalOptions(
956
+ { ...settings },
957
+ {
958
+ root: nuxt.options.rootDir,
959
+ key: tab !== "ui" && tab
960
+ }
961
+ );
962
+ nuxt.callHook("builder:generateApp", {
963
+ filter(template) {
964
+ return template.filename.includes("devtools/settings.mjs");
965
+ }
955
966
  });
956
967
  },
957
968
  getOptions
@@ -1144,6 +1155,7 @@ async function enableModule(options, nuxt) {
1144
1155
  await import('./analyze-build.mjs').then(({ setup }) => setup(nuxt, options));
1145
1156
  return;
1146
1157
  }
1158
+ const enabledExplicitly = nuxt.options.devtools === true || nuxt.options.devtools && nuxt.options.devtools.enabled || !!nuxt.options.modules.find((m) => m === "@nuxt/devtools" || m === "@nuxt/devtools-edge");
1147
1159
  await nuxt.callHook("devtools:before");
1148
1160
  nuxt.options.imports.collectMeta = true;
1149
1161
  addPlugin({
@@ -1154,6 +1166,22 @@ async function enableModule(options, nuxt) {
1154
1166
  src: join$1(runtimeDir, "plugins/devtools.server"),
1155
1167
  mode: "server"
1156
1168
  });
1169
+ addTemplate({
1170
+ filename: "devtools/settings.mjs",
1171
+ async getContents() {
1172
+ const uiOptions = await readLocalOptions(
1173
+ {
1174
+ ...defaultTabOptions.ui,
1175
+ // When not enabled explicitly, we hide the panel by default
1176
+ showPanel: enabledExplicitly ? true : null
1177
+ },
1178
+ { root: nuxt.options.rootDir }
1179
+ );
1180
+ return `export default ${JSON.stringify({
1181
+ ui: uiOptions
1182
+ })}`;
1183
+ }
1184
+ });
1157
1185
  nuxt.hook("nitro:config", (config) => {
1158
1186
  config.externals = config.externals || {};
1159
1187
  config.externals.inline = config.externals.inline || [];
@@ -1239,7 +1267,7 @@ window.__NUXT_DEVTOOLS_TIME_METRIC__.appInit = Date.now()
1239
1267
  isGlobalInstall: isGlobalInstall()
1240
1268
  });
1241
1269
  const isMac = os.platform() === "darwin";
1242
- logger.success(`Nuxt DevTools enabled ${colors.dim(`(v${version})`)}, press \`Shift\` + \`${isMac ? "Option" : "Alt"}\` + \`D\` in app to open ${isGlobalInstall() ? colors.dim("[global]") : ""} ${colors.yellow("(experimental)")}`);
1270
+ logger.success(`Nuxt DevTools ${colors.dim(`v${version}`)}${isGlobalInstall() ? colors.dim(" [global]") : ""} enabled, press \`Shift\` + \`${isMac ? "Option" : "Alt"}\` + \`D\` in app to open.`);
1243
1271
  }
1244
1272
 
1245
1273
  const moduleMain = {
@@ -6,7 +6,6 @@ import { logger } from '@nuxt/kit';
6
6
  import { execa } from 'execa';
7
7
  import { checkPort, getPort } from 'get-port-please';
8
8
  import which from 'which';
9
- import waitOn from 'wait-on';
10
9
  import { startSubprocess } from '@nuxt/devtools-kit';
11
10
  import { L as LOG_PREFIX } from './module-main.mjs';
12
11
  import 'pathe';
@@ -15,7 +14,7 @@ import 'sirv';
15
14
  import 'consola/utils';
16
15
  import 'birpc';
17
16
  import 'flatted';
18
- import '../shared/devtools.18eefaee.mjs';
17
+ import '../shared/devtools.c28fc9a7.mjs';
19
18
  import '../dirs.mjs';
20
19
  import 'node:url';
21
20
  import 'is-installed-globally';
@@ -95,11 +94,11 @@ async function setup({ nuxt, options, openInEditorHooks, rpc }) {
95
94
  },
96
95
  nuxt
97
96
  );
98
- await waitOn({
99
- resources: [url],
100
- timeout: 2e4,
101
- reverse: true
102
- });
97
+ for (let i = 0; i < 100; i++) {
98
+ if (await fetch(url).then((r) => r.ok).catch(() => false))
99
+ break;
100
+ await new Promise((resolve2) => setTimeout(resolve2, 500));
101
+ }
103
102
  await new Promise((resolve2) => setTimeout(resolve2, 2e3));
104
103
  loaded = true;
105
104
  }
@@ -118,10 +117,11 @@ async function setup({ nuxt, options, openInEditorHooks, rpc }) {
118
117
  nuxt.hook("close", () => {
119
118
  command.kill();
120
119
  });
121
- await waitOn({
122
- resources: [url],
123
- timeout: 2e4
124
- });
120
+ for (let i = 0; i < 100; i++) {
121
+ if (await fetch(url).then((r) => r.ok).catch(() => false))
122
+ break;
123
+ await new Promise((resolve2) => setTimeout(resolve2, 500));
124
+ }
125
125
  await new Promise((resolve2) => setTimeout(resolve2, 2e3));
126
126
  loaded = true;
127
127
  }
@@ -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__/client/_nuxt/entry.38bf3bdf.css">
6
- <link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.54b63325.js">
7
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.5e3c6999.js">
5
+ <link rel="stylesheet" href="/__nuxt_devtools__/client/_nuxt/entry.1c0836ed.css">
6
+ <link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.e01776ec.js">
7
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.a0a2f0b3.js">
8
8
  <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/onig.0c57a370.js">
9
9
  <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/vitesse-dark.ab479e3d.js">
10
10
  <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/vitesse-light.696edcfd.js">
@@ -18,24 +18,24 @@
18
18
  <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/vue-html.0806679f.js">
19
19
  <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/diff.22e0b108.js">
20
20
  <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/shellscript.9d056341.js">
21
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/default.c4c43b40.js">
22
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/full.478da439.js">
23
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/none.cfaeed76.js">
21
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/default.3ba7d10b.js">
22
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/full.6d0fd7cf.js">
23
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/none.27bf71df.js">
24
24
  <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/nuxt-docs.100caa70.js">
25
25
  <link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/NCodeBlock.6994516c.css">
26
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/DataSchemaDrawer.6de1f238.js">
27
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NSelect.vue.e3495019.js">
28
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NSwitch.vue.21018268.js">
29
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NDropdown.vue.d756d40c.js">
30
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NCodeBlock.vue.84865d5b.js">
31
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/client.d926285a.js">
32
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/DrawerRight.vue.5bde5a0b.js">
33
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.dedd4a37.js">
26
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/DataSchemaDrawer.8ac6b677.js">
27
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NSelect.vue.4c22d30e.js">
28
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NSwitch.vue.de333089.js">
29
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NDropdown.vue.b2f7aaef.js">
30
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NCodeBlock.vue.adf1e9b4.js">
31
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/client.3f2665f1.js">
32
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NDrawer.vue.8e620517.js">
33
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.ddd835d7.js">
34
34
  <link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/error-404.82ac0ec5.css">
35
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-404.087131b3.js">
35
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-404.9d2aaad9.js">
36
36
  <link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/error-500.ff959f66.css">
37
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-500.d1c41037.js">
38
- <script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.54b63325.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?f():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:f,addColorScheme:i,removeColorScheme:d};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function d(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function f(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
37
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-500.20d1b3ce.js">
38
+ <script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.e01776ec.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?f():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:f,addColorScheme:i,removeColorScheme:d};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function d(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function f(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
39
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__/client",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__/client/_nuxt/entry.38bf3bdf.css">
6
- <link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.54b63325.js">
7
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.5e3c6999.js">
5
+ <link rel="stylesheet" href="/__nuxt_devtools__/client/_nuxt/entry.1c0836ed.css">
6
+ <link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.e01776ec.js">
7
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.a0a2f0b3.js">
8
8
  <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/onig.0c57a370.js">
9
9
  <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/vitesse-dark.ab479e3d.js">
10
10
  <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/vitesse-light.696edcfd.js">
@@ -18,24 +18,24 @@
18
18
  <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/vue-html.0806679f.js">
19
19
  <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/diff.22e0b108.js">
20
20
  <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/shellscript.9d056341.js">
21
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/default.c4c43b40.js">
22
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/full.478da439.js">
23
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/none.cfaeed76.js">
21
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/default.3ba7d10b.js">
22
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/full.6d0fd7cf.js">
23
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/none.27bf71df.js">
24
24
  <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/nuxt-docs.100caa70.js">
25
25
  <link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/NCodeBlock.6994516c.css">
26
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/DataSchemaDrawer.6de1f238.js">
27
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NSelect.vue.e3495019.js">
28
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NSwitch.vue.21018268.js">
29
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NDropdown.vue.d756d40c.js">
30
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NCodeBlock.vue.84865d5b.js">
31
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/client.d926285a.js">
32
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/DrawerRight.vue.5bde5a0b.js">
33
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.dedd4a37.js">
26
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/DataSchemaDrawer.8ac6b677.js">
27
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NSelect.vue.4c22d30e.js">
28
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NSwitch.vue.de333089.js">
29
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NDropdown.vue.b2f7aaef.js">
30
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NCodeBlock.vue.adf1e9b4.js">
31
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/client.3f2665f1.js">
32
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NDrawer.vue.8e620517.js">
33
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.ddd835d7.js">
34
34
  <link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/error-404.82ac0ec5.css">
35
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-404.087131b3.js">
35
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-404.9d2aaad9.js">
36
36
  <link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/error-500.ff959f66.css">
37
- <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-500.d1c41037.js">
38
- <script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.54b63325.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?f():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:f,addColorScheme:i,removeColorScheme:d};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function d(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function f(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
37
+ <link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-500.20d1b3ce.js">
38
+ <script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.e01776ec.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?f():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:f,addColorScheme:i,removeColorScheme:d};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function d(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function f(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
39
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__/client",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body>
@@ -1,3 +1,3 @@
1
- import{_ as R}from"./NCodeBlock.vue.84865d5b.js";import{d as _,a as N,r as F,aj as W,bv as A,o as B,h as J,f as V}from"./entry.54b63325.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(`
1
+ import{_ as R}from"./NCodeBlock.vue.adf1e9b4.js";import{d as _,a as N,r as F,aj as W,bv as A,o as B,h as J,f as V}from"./entry.e01776ec.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
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 _};
@@ -1 +1 @@
1
- import{_ as I}from"./NMarkdown.vue.d2063d22.js";import{d as V,e as D,a7 as U,a as c,am as $,o as s,h as r,j as i,k as o,p as l,i as E,f as e,v as u,m as _,F as v,t as h,n as j,G as F,E as S}from"./entry.54b63325.js";import{_ as z}from"./FilepathItem.vue.7bd675c6.js";import{C as k}from"./constants.4e5eba24.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,[E(f,{icon:"carbon-copy",onClick:p[0]||(p[0]=d=>e(b)(e(m)))},{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,j(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.b0e8b2fc.js";import{d as V,e as D,a7 as U,a as c,al 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.e01776ec.js";import{_ as z}from"./FilepathItem.vue.5af0b5df.js";import{C as k}from"./constants.4e5eba24.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)))},{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 _};
@@ -0,0 +1 @@
1
+ import{d as r,u as s,aa as c,I as i,o as p,h as _,_ as u}from"./entry.e01776ec.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 _};