@nuxt/devtools 0.6.1 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/README.md +2 -4
  2. package/dist/chunks/module-main.mjs +29 -134
  3. package/dist/client/200.html +2 -2
  4. package/dist/client/404.html +2 -2
  5. package/dist/client/__blank/index.html +2 -2
  6. package/dist/client/_nuxt/AuthRequiredPanel.vue.e75f9e70.js +1 -0
  7. package/dist/client/_nuxt/Badge.d9d2b649.js +1 -0
  8. package/dist/client/_nuxt/CodeSnippets.vue.b63711e4.js +1 -0
  9. package/dist/client/_nuxt/{DrawerRight.vue.aa1fd47b.js → DrawerRight.vue.e21669fa.js} +1 -1
  10. package/dist/client/_nuxt/DurationDisplay.vue.c206edd8.js +1 -0
  11. package/dist/client/_nuxt/FilepathItem.vue.a47beb58.js +1 -0
  12. package/dist/client/_nuxt/HelpFab.vue.e5d23c98.js +1 -0
  13. package/dist/client/_nuxt/{LaunchPage.vue.f137554e.js → LaunchPage.vue.610fcc27.js} +1 -1
  14. package/dist/client/_nuxt/NCheckbox.vue.f4134b6b.js +1 -0
  15. package/dist/client/_nuxt/{NCodeBlock.vue.e44529a6.js → NCodeBlock.vue.bdc8bfdc.js} +1 -1
  16. package/dist/client/_nuxt/NIconButton.vue.24522062.js +1 -0
  17. package/dist/client/_nuxt/NIconTitle.vue.dc58a435.js +1 -0
  18. package/dist/client/_nuxt/{NLink.vue.372e1ca0.js → NLink.vue.393c859e.js} +1 -1
  19. package/dist/client/_nuxt/NMarkdown.vue.3224fbc4.js +1 -0
  20. package/dist/client/_nuxt/NPanelGrids.eec702e8.js +1 -0
  21. package/dist/client/_nuxt/NSectionBlock.8c2cc0df.js +1 -0
  22. package/dist/client/_nuxt/{NSelect.vue.3956d7b1.js → NSelect.vue.8ff29308.js} +1 -1
  23. package/dist/client/_nuxt/{NSwitch.vue.f0f70131.js → NSwitch.vue.840840dc.js} +1 -1
  24. package/dist/client/_nuxt/{NTip.vue.f50fcd60.js → NTip.vue.79345a6a.js} +1 -1
  25. package/dist/client/_nuxt/Navbar.vue.82295224.js +1 -0
  26. package/dist/client/_nuxt/{PanelLeftRight.vue.8031c7d4.js → PanelLeftRight.vue.5871de72.js} +1 -1
  27. package/dist/client/_nuxt/StateEditor.vue.d48421f9.js +1 -0
  28. package/dist/client/_nuxt/__blank.9ffea4ef.js +1 -0
  29. package/dist/client/_nuxt/analyze-build.67bd8db6.js +1 -0
  30. package/dist/client/_nuxt/{assets.f876e2b9.js → assets.36239ace.js} +3 -3
  31. package/dist/client/_nuxt/{client.d6464981.js → client.495918a8.js} +1 -1
  32. package/dist/client/_nuxt/{components.d23cd7b8.js → components.c4c5e473.js} +27 -27
  33. package/dist/client/_nuxt/custom-_name_.3e45940d.js +1 -0
  34. package/dist/client/_nuxt/default.0d72ce4e.js +1 -0
  35. package/dist/client/_nuxt/{editor.aee50e2c.js → editor.a4d83539.js} +1 -1
  36. package/dist/client/_nuxt/entry.eeaf510e.css +1 -0
  37. package/dist/client/_nuxt/entry.fbf2c464.js +21 -0
  38. package/dist/client/_nuxt/error-404.37bdd0cf.js +1 -0
  39. package/dist/client/_nuxt/error-404.91003ceb.css +1 -0
  40. package/dist/client/_nuxt/error-500.7e02f53c.css +1 -0
  41. package/dist/client/_nuxt/error-500.f09b55ae.js +1 -0
  42. package/dist/client/_nuxt/full.7e6e1e52.js +1 -0
  43. package/dist/client/_nuxt/hooks.9f8f251f.js +1 -0
  44. package/dist/client/_nuxt/{imports.e0b9437d.js → imports.55b5830a.js} +1 -1
  45. package/dist/client/_nuxt/{index.25d3cd66.js → index.2421127a.js} +1 -1
  46. package/dist/client/_nuxt/index.b31d0db0.js +1 -0
  47. package/dist/client/_nuxt/{json-editor-vue.b8dc29b2.js → json-editor-vue.d5db52dc.js} +61 -61
  48. package/dist/client/_nuxt/middleware.bc94adc0.js +1 -0
  49. package/dist/client/_nuxt/modules.b661d7e8.js +4 -0
  50. package/dist/client/_nuxt/none.3d1d9cce.js +1 -0
  51. package/dist/client/_nuxt/{open-graph.3563ee56.js → open-graph.d11fab80.js} +2 -2
  52. package/dist/client/_nuxt/overview.82760181.js +1 -0
  53. package/dist/client/_nuxt/{pages.e4cfc065.js → pages.fbb1f607.js} +1 -1
  54. package/dist/client/_nuxt/payload.5e745a21.js +1 -0
  55. package/dist/client/_nuxt/plugins.736cbd71.js +1 -0
  56. package/dist/client/_nuxt/{runtime-configs.7810c90a.js → runtime-configs.834452b2.js} +1 -1
  57. package/dist/client/_nuxt/server-routes.20327313.js +9 -0
  58. package/dist/client/_nuxt/{settings.80338150.js → settings.ef38f4f9.js} +1 -1
  59. package/dist/client/_nuxt/{state-components.3e562e84.js → state-components.20943c6b.js} +1 -1
  60. package/dist/client/_nuxt/state-modules.7230fab3.js +1 -0
  61. package/dist/client/_nuxt/storage.40229c6e.js +1 -0
  62. package/dist/client/_nuxt/terminals.ae8c3544.css +32 -0
  63. package/dist/client/_nuxt/terminals.e4fb811f.js +9 -0
  64. package/dist/client/_nuxt/{unocss-runtime.9d0d2556.js → unocss-runtime.73092d93.js} +1 -1
  65. package/dist/client/_nuxt/{virtual-files.ae241a9c.js → virtual-files.071a4a48.js} +1 -1
  66. package/dist/client/index.html +2 -2
  67. package/dist/client/modules/analyze-build/index.html +2 -2
  68. package/dist/client/modules/assets/index.html +2 -2
  69. package/dist/client/modules/components/index.html +2 -2
  70. package/dist/client/modules/hooks/index.html +2 -2
  71. package/dist/client/modules/imports/index.html +2 -2
  72. package/dist/client/modules/middleware/index.html +2 -2
  73. package/dist/client/modules/modules/index.html +2 -2
  74. package/dist/client/modules/open-graph/index.html +2 -2
  75. package/dist/client/modules/overview/index.html +2 -2
  76. package/dist/client/modules/pages/index.html +2 -2
  77. package/dist/client/modules/payload/index.html +2 -2
  78. package/dist/client/modules/plugins/index.html +2 -2
  79. package/dist/client/modules/runtime-configs/index.html +2 -2
  80. package/dist/client/modules/server-routes/index.html +2 -2
  81. package/dist/client/modules/storage/index.html +2 -2
  82. package/dist/client/modules/terminals/index.html +2 -2
  83. package/dist/client/modules/virtual-files/index.html +2 -2
  84. package/dist/client/settings/index.html +2 -2
  85. package/dist/global-20ccb74c.d.ts +52 -0
  86. package/dist/module.d.ts +2 -0
  87. package/dist/module.json +1 -1
  88. package/dist/runtime/plugins/devtools.client.d.ts +0 -8
  89. package/dist/runtime/plugins/devtools.client.mjs +10 -84
  90. package/dist/runtime/plugins/view/FrameBox.vue +66 -35
  91. package/dist/runtime/plugins/view/Main.vue +21 -3
  92. package/dist/runtime/plugins/view/client.d.ts +8 -0
  93. package/dist/runtime/plugins/view/client.mjs +209 -1
  94. package/dist/runtime/plugins/view/state.d.ts +1 -4
  95. package/dist/runtime/plugins/view/state.mjs +2 -20
  96. package/dist/runtime/plugins/view/utils.mjs +1 -1
  97. package/dist/types.d.ts +2 -0
  98. package/package.json +24 -24
  99. package/dist/client/_nuxt/AuthRequiredPanel.vue.19da182f.js +0 -1
  100. package/dist/client/_nuxt/Badge.067326d6.js +0 -1
  101. package/dist/client/_nuxt/CodeSnippets.vue.2f33c6d1.js +0 -1
  102. package/dist/client/_nuxt/DurationDisplay.vue.4afc40a4.js +0 -1
  103. package/dist/client/_nuxt/FilepathItem.vue.3587ec1f.js +0 -1
  104. package/dist/client/_nuxt/HelpFab.vue.dbb954dd.js +0 -1
  105. package/dist/client/_nuxt/NCheckbox.vue.060051ad.js +0 -1
  106. package/dist/client/_nuxt/NIconButton.vue.ac7efd0c.js +0 -1
  107. package/dist/client/_nuxt/NIconTitle.vue.ace3a05a.js +0 -1
  108. package/dist/client/_nuxt/NMarkdown.vue.9f252ec4.js +0 -1
  109. package/dist/client/_nuxt/NPanelGrids.54ee09bc.js +0 -1
  110. package/dist/client/_nuxt/NSectionBlock.9cbe0175.js +0 -1
  111. package/dist/client/_nuxt/Navbar.vue.bd98686f.js +0 -1
  112. package/dist/client/_nuxt/NpmVersionCheck.vue.78bff2df.js +0 -1
  113. package/dist/client/_nuxt/StateEditor.vue.4439d43c.js +0 -1
  114. package/dist/client/_nuxt/__blank.944beb26.js +0 -1
  115. package/dist/client/_nuxt/analyze-build.fd781999.js +0 -1
  116. package/dist/client/_nuxt/custom-_name_.3701152b.js +0 -1
  117. package/dist/client/_nuxt/default.809c6e7c.js +0 -1
  118. package/dist/client/_nuxt/entry.717f6486.css +0 -1
  119. package/dist/client/_nuxt/entry.a0dd6aac.js +0 -19
  120. package/dist/client/_nuxt/error-404.2618a69f.css +0 -1
  121. package/dist/client/_nuxt/error-404.d560629e.js +0 -1
  122. package/dist/client/_nuxt/error-500.12a2683b.css +0 -1
  123. package/dist/client/_nuxt/error-500.d7ca8dd1.js +0 -1
  124. package/dist/client/_nuxt/error-component.15e0d602.js +0 -3
  125. package/dist/client/_nuxt/full.76363f3f.js +0 -1
  126. package/dist/client/_nuxt/hooks.3a3b761d.js +0 -1
  127. package/dist/client/_nuxt/index.d7252ef5.js +0 -1
  128. package/dist/client/_nuxt/middleware.cbbbe53d.js +0 -1
  129. package/dist/client/_nuxt/modules.092674af.js +0 -4
  130. package/dist/client/_nuxt/none.0a084ac9.js +0 -1
  131. package/dist/client/_nuxt/overview.e4073f57.js +0 -1
  132. package/dist/client/_nuxt/payload.0be0c356.js +0 -1
  133. package/dist/client/_nuxt/plugins.88ff2e07.js +0 -1
  134. package/dist/client/_nuxt/server-routes.911ca1ca.js +0 -9
  135. package/dist/client/_nuxt/storage.4d3f94ab.js +0 -1
  136. package/dist/client/_nuxt/terminals.e433a70a.js +0 -1
  137. package/dist/runtime/plugins/view/Frame.vue +0 -105
@@ -1,4 +1,212 @@
1
- import { computed, ref } from "vue";
1
+ import { computed, createApp, h, markRaw, nextTick, ref, shallowReactive, shallowRef, watch } from "vue";
2
+ import { createHooks } from "hookable";
3
+ import Main from "./Main.vue";
4
+ import { popupWindow, state } from "./state.mjs";
5
+ import { useAppConfig } from "#imports";
6
+ const clientRef = shallowRef();
7
+ export { clientRef as client };
8
+ export async function setupDevToolsClient({
9
+ nuxt,
10
+ clientHooks,
11
+ timeMetric
12
+ }) {
13
+ const isInspecting = ref(false);
14
+ const colorMode = useClientColorMode();
15
+ const client = shallowReactive({
16
+ nuxt: markRaw(nuxt),
17
+ appConfig: useAppConfig(),
18
+ hooks: createHooks(),
19
+ getClientHooksMetrics: () => Object.values(clientHooks),
20
+ getClientPluginMetrics: () => {
21
+ return window.__NUXT_DEVTOOLS_PLUGINS_METRIC__ || [];
22
+ },
23
+ loadingTimeMetrics: timeMetric,
24
+ reloadPage() {
25
+ location.reload();
26
+ },
27
+ toggle() {
28
+ if (state.value.open)
29
+ client.close();
30
+ else
31
+ client.open();
32
+ },
33
+ close() {
34
+ if (!state.value.open)
35
+ return;
36
+ state.value.open = false;
37
+ if (popupWindow.value) {
38
+ try {
39
+ popupWindow.value.close();
40
+ } catch (e) {
41
+ }
42
+ popupWindow.value = null;
43
+ }
44
+ },
45
+ open() {
46
+ if (state.value.open)
47
+ return;
48
+ state.value.open = true;
49
+ nextTick(() => {
50
+ client.updateClient();
51
+ });
52
+ },
53
+ inspector: getInspectorInstance(),
54
+ colorMode,
55
+ getIframe,
56
+ updateClient
57
+ });
58
+ let iframe;
59
+ function updateClient() {
60
+ if (!client.inspector)
61
+ client.inspector = getInspectorInstance();
62
+ try {
63
+ iframe?.contentWindow?.__NUXT_DEVTOOLS_VIEW__?.setClient(client);
64
+ } catch (e) {
65
+ }
66
+ return client;
67
+ }
68
+ function getIframe() {
69
+ if (!iframe) {
70
+ const CLIENT_PATH = "/__nuxt_devtools__/client";
71
+ const initialUrl = CLIENT_PATH + state.value.route;
72
+ iframe = document.createElement("iframe");
73
+ iframe.id = "nuxt-devtools-iframe";
74
+ iframe.src = initialUrl;
75
+ iframe.setAttribute("data-v-inspector-ignore", "true");
76
+ iframe.onload = async () => {
77
+ await waitForClientInjection();
78
+ client.updateClient();
79
+ };
80
+ }
81
+ return iframe;
82
+ }
83
+ function waitForClientInjection(retry = 10, timeout = 200) {
84
+ const test = () => !!iframe?.contentWindow?.__NUXT_DEVTOOLS_VIEW__;
85
+ if (test())
86
+ return;
87
+ return new Promise((resolve, reject) => {
88
+ const interval = setInterval(() => {
89
+ if (test()) {
90
+ clearInterval(interval);
91
+ resolve();
92
+ } else if (retry-- <= 0) {
93
+ clearInterval(interval);
94
+ reject("Nuxt Devtools client injection failed");
95
+ }
96
+ }, timeout);
97
+ });
98
+ }
99
+ function enableComponentInspector() {
100
+ window.__VUE_INSPECTOR__?.enable();
101
+ isInspecting.value = true;
102
+ }
103
+ function disableComponentInspector() {
104
+ if (!window.__VUE_INSPECTOR__?.enabled)
105
+ return;
106
+ window.__VUE_INSPECTOR__?.disable();
107
+ client?.hooks.callHook("host:inspector:close");
108
+ isInspecting.value = false;
109
+ }
110
+ function getInspectorInstance() {
111
+ const componentInspector = window.__VUE_INSPECTOR__;
112
+ if (componentInspector) {
113
+ componentInspector.openInEditor = async (baseUrl, file, line, column) => {
114
+ disableComponentInspector();
115
+ await client.hooks.callHook("host:inspector:click", baseUrl, file, line, column);
116
+ };
117
+ componentInspector.onUpdated = () => {
118
+ client.hooks.callHook("host:inspector:update", {
119
+ ...componentInspector.linkParams,
120
+ ...componentInspector.position
121
+ });
122
+ };
123
+ }
124
+ return markRaw({
125
+ isEnabled: isInspecting,
126
+ enable: enableComponentInspector,
127
+ disable: disableComponentInspector,
128
+ toggle: () => {
129
+ if (window.__VUE_INSPECTOR__?.enabled)
130
+ disableComponentInspector();
131
+ else
132
+ enableComponentInspector();
133
+ },
134
+ instance: componentInspector
135
+ });
136
+ }
137
+ function refreshReactivity() {
138
+ client.hooks.callHook("host:update:reactivity");
139
+ }
140
+ watch(() => [
141
+ client.nuxt.payload,
142
+ client.colorMode.value,
143
+ client.loadingTimeMetrics
144
+ ], () => {
145
+ refreshReactivity();
146
+ }, { deep: true });
147
+ client.nuxt.vueApp.config.globalProperties?.$router?.afterEach(() => {
148
+ refreshReactivity();
149
+ });
150
+ client.nuxt.hook("app:mounted", () => {
151
+ refreshReactivity();
152
+ });
153
+ client.hooks.hook("devtools:navigate", (path) => {
154
+ state.value.route = path;
155
+ });
156
+ clientRef.value = client;
157
+ const documentPictureInPicture = window.documentPictureInPicture;
158
+ if (documentPictureInPicture?.requestWindow) {
159
+ client.popup = async () => {
160
+ const iframe2 = getIframe();
161
+ const pip = popupWindow.value = await documentPictureInPicture.requestWindow({
162
+ width: Math.round(window.innerWidth * state.value.width / 100),
163
+ height: Math.round(window.innerHeight * state.value.height / 100)
164
+ });
165
+ const style = pip.document.createElement("style");
166
+ style.innerHTML = `
167
+ body {
168
+ margin: 0;
169
+ padding: 0;
170
+ }
171
+ iframe {
172
+ width: 100vw;
173
+ height: 100vh;
174
+ border: none;
175
+ outline: none;
176
+ }
177
+ `;
178
+ pip.__NUXT_DEVTOOLS_DISABLE__ = true;
179
+ pip.__NUXT_DEVTOOLS_IS_POPUP__ = true;
180
+ pip.document.title = "Nuxt DevTools";
181
+ pip.document.head.appendChild(style);
182
+ pip.document.body.appendChild(iframe2);
183
+ pip.addEventListener("resize", () => {
184
+ state.value.width = Math.round(pip.innerWidth / window.innerWidth * 100);
185
+ state.value.height = Math.round(pip.innerHeight / window.innerHeight * 100);
186
+ });
187
+ pip.addEventListener("pagehide", () => {
188
+ popupWindow.value = null;
189
+ pip.close();
190
+ });
191
+ };
192
+ }
193
+ client.updateClient();
194
+ const holder = document.createElement("div");
195
+ holder.id = "nuxt-devtools-container";
196
+ holder.setAttribute("data-v-inspector-ignore", "true");
197
+ document.body.appendChild(holder);
198
+ addEventListener("keydown", (e) => {
199
+ if (e.code === "KeyD" && e.altKey && e.shiftKey)
200
+ client.close();
201
+ });
202
+ const app = createApp({
203
+ render: () => h(Main, { client }),
204
+ devtools: {
205
+ hide: true
206
+ }
207
+ });
208
+ app.mount(holder);
209
+ }
2
210
  export function useClientColorMode() {
3
211
  const explicitColor = ref();
4
212
  const systemColor = ref();
@@ -2,8 +2,5 @@ import type { DevToolsFrameState } from '../../../types';
2
2
  export declare const PANEL_PADDING = 10;
3
3
  export declare const PANEL_MIN = 20;
4
4
  export declare const PANEL_MAX = 100;
5
+ export declare const popupWindow: import("vue").ShallowRef<Window | null>;
5
6
  export declare const state: import("vue").Ref<DevToolsFrameState>;
6
- export declare const isInitialized: import("vue").Ref<boolean>;
7
- export declare function togglePanel(): void;
8
- export declare function closePanel(): void;
9
- export declare function openPanel(): void;
@@ -1,8 +1,9 @@
1
- import { ref, watch } from "vue";
1
+ import { shallowRef } from "vue";
2
2
  import { useObjectStorage } from "./utils.mjs";
3
3
  export const PANEL_PADDING = 10;
4
4
  export const PANEL_MIN = 20;
5
5
  export const PANEL_MAX = 100;
6
+ export const popupWindow = shallowRef(null);
6
7
  export const state = useObjectStorage("nuxt-devtools-frame-state", {
7
8
  width: 80,
8
9
  height: 60,
@@ -13,22 +14,3 @@ export const state = useObjectStorage("nuxt-devtools-frame-state", {
13
14
  position: "bottom",
14
15
  closeOnOutsideClick: false
15
16
  });
16
- export const isInitialized = ref(state.value.open);
17
- if (!isInitialized.value) {
18
- watch(() => state.value.open, (open) => {
19
- if (open)
20
- isInitialized.value = open;
21
- });
22
- }
23
- export function togglePanel() {
24
- if (state.value.open)
25
- closePanel();
26
- else
27
- openPanel();
28
- }
29
- export function closePanel() {
30
- state.value.open = false;
31
- }
32
- export function openPanel() {
33
- state.value.open = true;
34
- }
@@ -14,7 +14,7 @@ export function useObjectStorage(key, initial, readonly = false) {
14
14
  return;
15
15
  wrote = JSON.stringify(value);
16
16
  localStorage.setItem(key, wrote);
17
- }, { deep: true, flush: "sync" });
17
+ }, { deep: true, flush: "post" });
18
18
  }
19
19
  useEventListener(window, "storage", (e) => {
20
20
  if (e.key === key && e.newValue && e.newValue !== wrote) {
package/dist/types.d.ts CHANGED
@@ -1,5 +1,7 @@
1
+ import './global-20ccb74c.js';
1
2
  import { ModuleStaticInfo } from '@nuxt/devtools-kit/types';
2
3
  export * from '@nuxt/devtools-kit/types';
4
+ import 'vite-plugin-vue-inspector';
3
5
 
4
6
  interface DevToolsFrameState {
5
7
  width: number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/devtools",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.6.3",
5
5
  "license": "MIT",
6
6
  "repository": "nuxt/devtools",
7
7
  "exports": {
@@ -30,16 +30,16 @@
30
30
  "vite": "*"
31
31
  },
32
32
  "dependencies": {
33
- "@nuxt/kit": "^3.5.3",
33
+ "@nuxt/kit": "^3.6.0",
34
34
  "birpc": "^0.2.12",
35
35
  "boxen": "^7.1.0",
36
36
  "consola": "^3.1.0",
37
37
  "execa": "^7.1.1",
38
- "fast-folder-size": "^2.0.0",
38
+ "fast-folder-size": "^2.1.0",
39
39
  "fast-glob": "^3.2.12",
40
40
  "get-port-please": "^3.0.1",
41
41
  "global-dirs": "^3.0.1",
42
- "h3": "^1.6.6",
42
+ "h3": "^1.7.0",
43
43
  "hookable": "^5.5.3",
44
44
  "image-meta": "^0.1.1",
45
45
  "is-installed-globally": "^0.4.0",
@@ -52,8 +52,8 @@
52
52
  "perfect-debounce": "^1.0.0",
53
53
  "picocolors": "^1.0.0",
54
54
  "pkg-types": "^1.0.3",
55
- "rc9": "^2.1.0",
56
- "semver": "^7.5.1",
55
+ "rc9": "^2.1.1",
56
+ "semver": "^7.5.3",
57
57
  "sirv": "^2.0.3",
58
58
  "unimport": "^3.0.8",
59
59
  "vite-plugin-inspect": "^0.7.28",
@@ -61,38 +61,38 @@
61
61
  "wait-on": "^7.0.1",
62
62
  "which": "^3.0.1",
63
63
  "ws": "^8.13.0",
64
- "@nuxt/devtools-kit": "0.6.1",
65
- "@nuxt/devtools-wizard": "0.6.1"
64
+ "@nuxt/devtools-kit": "0.6.3",
65
+ "@nuxt/devtools-wizard": "0.6.3"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@antfu/utils": "^0.7.4",
69
69
  "@iconify-json/bxl": "^1.1.6",
70
70
  "@iconify-json/carbon": "^1.1.18",
71
- "@iconify-json/logos": "^1.1.32",
72
- "@iconify-json/ri": "^1.1.9",
73
- "@iconify-json/simple-icons": "^1.1.56",
71
+ "@iconify-json/logos": "^1.1.33",
72
+ "@iconify-json/ri": "^1.1.10",
73
+ "@iconify-json/simple-icons": "^1.1.57",
74
74
  "@iconify-json/tabler": "^1.1.79",
75
75
  "@nuxt/content": "^2.7.0",
76
- "@nuxtjs/color-mode": "^3.2.0",
76
+ "@nuxtjs/color-mode": "^3.3.0",
77
77
  "@parcel/watcher": "^2.1.0",
78
78
  "@types/markdown-it-link-attributes": "^3.0.1",
79
79
  "@types/ua-parser-js": "^0.7.36",
80
- "@unocss/nuxt": "^0.53.1",
81
- "@unocss/preset-icons": "^0.53.1",
82
- "@unocss/preset-uno": "^0.53.1",
83
- "@unocss/runtime": "^0.53.1",
84
- "@vueuse/nuxt": "^10.1.2",
80
+ "@unocss/nuxt": "^0.53.3",
81
+ "@unocss/preset-icons": "^0.53.3",
82
+ "@unocss/preset-uno": "^0.53.3",
83
+ "@unocss/runtime": "^0.53.3",
84
+ "@vueuse/nuxt": "^10.2.0",
85
85
  "esno": "^0.16.3",
86
86
  "flatted": "^3.2.7",
87
- "floating-vue": "2.0.0-beta.20",
87
+ "floating-vue": "2.0.0-beta.22",
88
88
  "fuse.js": "^6.6.2",
89
89
  "json-editor-vue": "^0.10.6",
90
90
  "markdown-it": "^13.0.1",
91
91
  "markdown-it-link-attributes": "^4.0.1",
92
92
  "nanoid": "^4.0.2",
93
- "nuxt": "^3.5.3",
93
+ "nuxt": "^3.6.0",
94
94
  "nuxt-vitest": "^0.8.5",
95
- "ofetch": "^1.1.0",
95
+ "ofetch": "^1.1.1",
96
96
  "ohash": "^1.1.2",
97
97
  "shiki": "^0.14.2",
98
98
  "shiki-es": "^0.2.0",
@@ -100,16 +100,16 @@
100
100
  "splitpanes": "^3.1.5",
101
101
  "theme-vitesse": "^0.7.2",
102
102
  "ua-parser-js": "^1.0.35",
103
- "unocss": "^0.53.1",
104
- "vanilla-jsoneditor": "^0.17.6",
103
+ "unocss": "^0.53.3",
104
+ "vanilla-jsoneditor": "^0.17.8",
105
105
  "vis-data": "^7.1.6",
106
106
  "vis-network": "^9.1.6",
107
107
  "vite-plugin-vue-markdown": "^0.23.5",
108
- "vue-tsc": "^1.6.5",
108
+ "vue-tsc": "^1.8.1",
109
109
  "vue-virtual-scroller": "2.0.0-beta.8",
110
110
  "xterm": "^5.2.1",
111
111
  "xterm-addon-fit": "^0.7.0",
112
- "@nuxt/devtools": "0.6.1"
112
+ "@nuxt/devtools": "0.6.3"
113
113
  },
114
114
  "scripts": {
115
115
  "build": "pnpm dev:prepare && pnpm build:module && pnpm build:client && esno scripts/prepare.ts",
@@ -1 +0,0 @@
1
- import{a as _,a3 as u,an as o,y as d,u as m,c as l,w as s,Z as f,o as p,f as a,b as e,j as t,h,a6 as x}from"./entry.a0dd6aac.js";import{_ as b}from"./NPanelGrids.54ee09bc.js";const g=e("h3",{class:"mb2 text-lg font-medium leading-6",flex:"~ items-center gap-1","text-orange":""},[e("span",{class:"i-carbon-information-square"}),t(" Permissions required ")],-1),k=e("p",null," This operation requires permissions for running command and access files from the browser. ",-1),q=e("p",null,[t(" A request is sent to the server."),e("br"),t(" Please check your terminal for the instructions and then come back. ")],-1),v={flex:"~ gap-3",mt2:"","justify-end":""},P=_({__name:"AuthRequiredPanel",setup(A){return u(()=>{o.value||d.requestForAuth()}),(n,N)=>{const r=h,i=x,c=b;return("isDevAuthed"in n?n.isDevAuthed:m(o))?f(n.$slots,"default",{key:1}):(p(),l(c,{key:0},{default:s(()=>[a(i,{flex:"~ col gap-2",mxa:"","items-center":"",p6:"","text-center":""},{default:s(()=>[g,k,q,e("div",v,[a(r,{disabled:"",icon:"i-carbon-time"},{default:s(()=>[t(" Waiting for authorization... ")]),_:1})])]),_:1})]),_:1}))}}});export{P as _};
@@ -1 +0,0 @@
1
- import{aY as n,o,e as s,Z as t}from"./entry.a0dd6aac.js";const c={},r={class:"mx-0.5 select-none whitespace-nowrap rounded px-1.5 py-0.5 text-xs"};function a(e,_){return o(),s("span",r,[t(e.$slots,"default")])}const l=n(c,[["render",a]]);export{l as _};
@@ -1 +0,0 @@
1
- import{_ as C}from"./NCodeBlock.vue.e44529a6.js";import{a as g,b3 as h,aj as S,o as s,e as a,b as n,F as d,m as w,p as u,u as o,t as x,f as _,w as f,j as m,c as B,q as r,h as N}from"./entry.a0dd6aac.js";import{a as V}from"./editor.aee50e2c.js";const $={key:0,relative:"","n-code-block":""},j={flex:"~ wrap","w-full":""},D=["onClick"],E=n("div",{border:"b base","flex-auto":""},null,-1),F={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},T=g({__name:"CodeSnippets",props:{codeSnippets:{}},setup(b){const c=b,e=h(c.codeSnippets[0]),k=V();return S(()=>{c.codeSnippets.includes(e.value)||(e.value=c.codeSnippets[0])}),(l,p)=>{const v=C,i=N;return l.codeSnippets.length?(s(),a("div",$,[n("div",j,[(s(!0),a(d,null,w(l.codeSnippets,(t,y)=>(s(),a("button",{key:y,px4:"",py2:"",border:"r base",hover:"bg-active",class:u(t===o(e)?"":"border-b"),onClick:q=>e.value=t},[n("div",{class:u(t===o(e)?"":"op30"),"font-mono":""},x(t.name),3)],10,D))),128)),E]),o(e)?(s(),a(d,{key:0},[_(v,{code:o(e).code,lang:o(e).lang,lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),n("div",F,[_(i,{icon:"carbon-copy",onClick:p[0]||(p[0]=t=>o(k)(o(e).code))},{default:f(()=>[m(" Copy ")]),_:1}),o(e)?.docs?(s(),B(i,{key:0,to:o(e).docs,target:"_blank",icon:"carbon-catalog"},{default:f(()=>[m(" Docs ")]),_:1},8,["to"])):r("",!0)])],64)):r("",!0)])):r("",!0)}}});export{T as _};
@@ -1 +0,0 @@
1
- import{a as n,o as s,e as i,j as u,t as f,p,b as c}from"./entry.a0dd6aac.js";const m=c("span",{"ml-1":"","text-xs":"",op50:""},"ms",-1),l=n({__name:"DurationDisplay",props:{duration:{},factor:{default:1}},setup(r){const e=r;function o(t){return t?(t=t*e.factor,t<.5?"text-gray:50":t>1e3?"text-red-400":t>500?"text-orange-400":t>200?"text-yellow-400":""):"text-gray-400"}function a(t){return t?t<1?"<1":t.toFixed(2):"-"}return(t,d)=>(s(),i("div",{class:p(o(t.duration))},[u(f(a(t.duration)),1),m],2))}});export{l as _};
@@ -1 +0,0 @@
1
- import{u as h}from"./editor.aee50e2c.js";import{a as f,U as c,l as k,at as v,o as t,c as y,w as B,e as s,F as l,j as m,t as n,u as a,b as C,q as b,p as N,ab as g}from"./entry.a0dd6aac.js";const w={key:0,op50:""},I=f({__name:"FilepathItem",props:{filepath:{},lineBreak:{type:Boolean},subpath:{type:Boolean},override:{}},setup(u){const r=u,d=h(),p=c(),o=k(()=>r.filepath&&p.value?v(r.filepath,p.value.rootDir):{path:r.filepath||""});return(e,i)=>(t(),y(g(e.filepath?"button":"span"),{class:N([e.filepath?"hover:underline":"",e.lineBreak?"":"ws-nowrap of-hidden truncate"]),"font-mono":"",title:e.override||e.filepath,onClick:i[0]||(i[0]=D=>e.filepath&&a(d)(e.filepath))},{default:B(()=>[e.override?(t(),s(l,{key:0},[m(n(e.override),1)],64)):a(o).moduleName?(t(),s(l,{key:1},[C("span",null,n(a(o).moduleName),1),e.subpath?(t(),s("span",w,n(a(o).path.slice(a(o).moduleName.length)),1)):b("",!0)],64)):(t(),s(l,{key:2},[m(n(a(o).path),1)],64))]),_:1},8,["class","title"]))}});export{I as _};
@@ -1 +0,0 @@
1
- import{_ as f}from"./NIconButton.vue.ac7efd0c.js";import{a as _,r as m,u as o,e as s,b as d,f as a,w as i,ae as u,F as v,q as n,o as l,Z as g,a5 as k}from"./entry.a0dd6aac.js";const x=d("div",{"i-ri:question-mark":""},null,-1),h=[x],y={key:0,border:"l base",class:"prose",pos:"fixed bottom-0 right-0 top-0","z-200":"","w-150":"",px8:"",py4:"","bg-base":""},$=_({__name:"HelpFab",setup(w){const e=m(!1),{showHelpButtons:p}=k();return(b,t)=>{const c=f;return o(p)?(l(),s(v,{key:0},[d("button",{pos:"absolute bottom-5 right-5",border:"~ base rounded-full ",flex:"~ items-center justify-center","z-110":"","h-11":"","w-11":"","backdrop-blur-8":"",bg:"bg-base op50!","light:shadow":"",hover:"bg-active",title:"Help",onClick:t[0]||(t[0]=r=>e.value=!o(e))},h),a(u,{name:"fade-in"},{default:i(()=>[o(e)?(l(),s("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:t[1]||(t[1]=r=>e.value=!1)})):n("",!0)]),_:1}),a(u,{name:"slide-in"},{default:i(()=>[o(e)?(l(),s("div",y,[g(b.$slots,"default"),a(c,{icon:"carbon-close",pos:"absolute top-3 right-3","rounded-full":"","text-xl":"",onClick:t[2]||(t[2]=r=>e.value=!1)})])):n("",!0)]),_:3})],64)):n("",!0)}}});export{$ as _};
@@ -1 +0,0 @@
1
- import{a as i,ar as r,e as p,v as b,bg as u,u as a,b as n,H as h,aO as k,f,Z as m,p as v,o as _,P as x}from"./entry.a0dd6aac.js";const V=["checked","disabled"],y=["disabled"],B={class:"n-checkbox-box n-checked:n-checkbox-box-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition"},$=i({__name:"NCheckbox",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(c,{emit:t}){const e=r(c,"modelValue",t,{passive:!0});return(o,s)=>{const d=x;return _(),p("label",{class:"n-checkbox hover:n-checkbox-hover select-none items-center n-disabled:n-disabled",checked:a(e)||null,disabled:o.disabled||null},[b(n("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>h(e)?e.value=l:null),type:"checkbox",class:"peer absolute op0",disabled:o.disabled,onKeypress:s[1]||(s[1]=k(l=>e.value=!a(e),["enter"]))},null,40,y),[[u,a(e)]]),n("span",B,[f(d,{class:"n-checkbox-icon scale-0 transform op0 n-transition n-checked:scale-100 n-checked:op100"})]),n("span",{class:v([a(e)?"":"op50","n-transition"])},[m(o.$slots,"default")],2)],8,V)}}});export{$ as _};
@@ -1 +0,0 @@
1
- import{a as s,o as e,c,w as r,f as i,af as p,ab as _,u as m,I as u,P as f}from"./entry.a0dd6aac.js";const d=s({__name:"NIconButton",props:{to:{},icon:{}},setup(n){const t=n;return(o,l)=>{const a=f;return e(),c(_(o.to?m(u):"button"),p({to:o.to},o.$attrs,{class:"n-transition n-icon-button"}),{default:r(()=>[i(a,{icon:t.icon},null,8,["icon"])]),_:1},16,["to"])}}});export{d as _};
@@ -1 +0,0 @@
1
- import{a as t,o,e as s,p as a,q as n,Z as r,b as l,t as i}from"./entry.a0dd6aac.js";const c={flex:"~ gap-3","items-center":""},u=t({__name:"NIconTitle",props:{icon:{},text:{}},setup(p){return(e,m)=>(o(),s("div",c,[e.icon?(o(),s("div",{key:0,class:a(e.icon)},null,2)):n("",!0),r(e.$slots,"default",{},()=>[l("div",null,i(e.text),1)])]))}});export{u as _};
@@ -1 +0,0 @@
1
- import{d as o}from"./client.d6464981.js";import{a as t,u as a,o as e,c as r,ab as s,t as d}from"./entry.a0dd6aac.js";const i=t({__name:"NMarkdown",props:{markdown:{},tag:{}},setup(m){return(n,l)=>n.markdown&&a(o)?.devtools?.renderMarkdown?(e(),r(s(n.tag||"span"),{key:0,class:"n-markdown",innerHTML:a(o).devtools.renderMarkdown(n.markdown)},null,8,["innerHTML"])):(e(),r(s(n.tag||"span"),{key:1,class:"n-markdown",textContent:d(n.markdown)},null,8,["textContent"]))}});export{i as _};
@@ -1 +0,0 @@
1
- import{aY as n,o,e as s,Z as t}from"./entry.a0dd6aac.js";const c={},r={class:"n-panel-grids-center"};function _(e,a){return o(),s("div",r,[t(e.$slots,"default")])}const d=n(c,[["render",_]]);export{d as _};
@@ -1 +0,0 @@
1
- import{a as g,ar as y,e as r,b as o,p as n,f as b,w,u as i,F as c,v as B,x as S,Z as s,q as p,o as l,j as u,t as v,c as $,ay as C,az as N,P as k,aY as x}from"./entry.a0dd6aac.js";import{_ as I}from"./NIconTitle.vue.ace3a05a.js";const f=t=>(C("data-v-a73dbcfe"),t=t(),N(),t),V=["open"],z={"text-base":""},T={key:0,"text-sm":"",op50:""},D=f(()=>o("div",{class:"flex-auto"},null,-1)),F=f(()=>o("div",{class:"x-divider"},null,-1)),j=g({__name:"NSectionBlock",props:{icon:{},text:{},description:{},containerClass:{default:""},headerClass:{},collapse:{type:Boolean,default:!0},open:{type:Boolean,default:!0},padding:{type:[Boolean,String],default:!0}},setup(t){const a=y(t,"open",void 0,{passive:!0});function _(e){a.value=e.target.open}return(e,d)=>{const m=k,h=I;return l(),r(c,null,[o("details",{open:i(a),onToggle:_},[o("summary",{class:n(["cursor-pointer select-none hover:bg-active p4",e.collapse?"":"pointer-events-none"])},[b(h,{icon:e.icon,text:e.text,"text-xl":"",transition:"",class:n([i(a)?"op100":"op60",e.headerClass])},{default:w(()=>[o("div",null,[o("div",z,[s(e.$slots,"text",{},()=>[u(v(e.text),1)],!0)]),e.description||e.$slots.description?(l(),r("div",T,[s(e.$slots,"description",{},()=>[u(v(e.description),1)],!0)])):p("",!0)]),D,s(e.$slots,"actions",{},void 0,!0),e.collapse?(l(),$(m,{key:0,icon:"carbon-chevron-down",class:"chevron","cursor-pointer":"","place-self-start":"","text-base":"",op75:"",transition:"","duration-500":""})):p("",!0)]),_:3},8,["icon","text","class"])],2),d._lazyshow1||i(a)?(d._lazyshow1=!0,l(),r(c,null,[B(o("div",{class:n(["flex flex-col flex-gap2 pb6 pt2",typeof e.padding=="string"?e.padding:e.padding?"px4":""])},[s(e.$slots,"details",{},void 0,!0),o("div",{class:n([e.containerClass,"mt1"])},[s(e.$slots,"default",{},void 0,!0)],2),s(e.$slots,"footer",{},void 0,!0)],2),[[S,i(a)]])],64)):p("v-show-if",!0)],40,V),F],64)}}});const P=x(j,[["__scopeId","data-v-a73dbcfe"]]);export{P as _};
@@ -1 +0,0 @@
1
- import{a as r,e as c,b as d,Z as s,p as n,o as p,f as i,J as u}from"./entry.a0dd6aac.js";const f={flex:"~ gap4"},g=r({__name:"Navbar",props:{search:{type:String,default:void 0},noPadding:{type:Boolean,default:!1}},emits:["update:search"],setup(e,{emit:o}){function t(a){o("update:search",a.target.value)}return(a,m)=>{const l=u;return p(),c("div",{flex:"~ col gap2",border:"b base","flex-1":"","navbar-glass":"",class:n([{p4:!e.noPadding}])},[d("div",f,[s(a.$slots,"search",{},()=>[i(l,{placeholder:"Search...",icon:"carbon-search",n:"primary","flex-auto":"",class:n({"px-5 py-2":!e.noPadding}),value:e.search,onInput:t},null,8,["class","value"])]),s(a.$slots,"actions")]),s(a.$slots,"default")],2)}}});export{g as _};
@@ -1 +0,0 @@
1
- import{_ as S}from"./Badge.067326d6.js";import{_ as E}from"./NCodeBlock.vue.e44529a6.js";import{_ as F}from"./NCheckbox.vue.060051ad.js";import{_ as q}from"./NTip.vue.f50fcd60.js";import{a as A,C as G,aT as H,r as h,aU as K,A as W,o as l,e as p,Z,u as e,t as v,q as x,F as N,f as t,c as z,w as s,b as _,H as b,j as i,h as J,K as L}from"./entry.a0dd6aac.js";const M={key:0},O={p4:"",flex:"~ col gap-1"},Q={class:"text-lg font-medium leading-6"},X=_("p",{op50:""}," The following command will be executed in your terminal: ",-1),Y={flex:"~ gap-3",mt2:"","justify-end":""},ne=A({__name:"NpmVersionCheck",props:{packageName:{},options:{},showVersion:{type:Boolean,default:!0}},setup(V){const u=V,$=G(),{info:r,update:w,state:B,processId:U,restart:R}=H(u.packageName,u.options),d=h(!0),c=h(!0),T=K(),f=W();async function g(){const o=await w(async a=>f.start(a));o&&c.value&&T.value.push({id:o,message:`${u.packageName} has been updated. Do you want to restart the Nuxt server now?`}),o&&d.value&&$.push(`/modules/terminals?id=${encodeURIComponent(o)}`)}return(o,a)=>{const k=S,D=E,y=F,P=q,C=J,j=L;return l(),p(N,null,[Z(o.$slots,"default",{id:e(U),info:e(r),update:g,state:e(B),restart:e(R)},()=>[e(r)&&o.showVersion?(l(),p("code",M,v(`v${e(r).current}`),1)):x("",!0),e(r)?.latest?(l(),p(N,{key:1},[e(r).needsUpdate?(l(),p("button",{key:0,onClick:a[0]||(a[0]=m=>g())},[t(k,{"bg-green-400:10":"","text-green-400":"",title:"updates available",textContent:"updates available"})])):(l(),z(k,{key:1,"bg-gray-400:10":"","text-gray-400":"",title:"latest",textContent:"latest"}))],64)):x("",!0)]),t(e(f),null,{default:s(({resolve:m,args:I})=>[t(j,{"model-value":!0,onClose:n=>m(!1)},{default:s(()=>[_("div",O,[_("h3",Q," Update "+v(u.packageName)+"? ",1),X,t(D,{code:I[0],lang:"bash",my3:"",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),t(y,{modelValue:e(d),"onUpdate:modelValue":a[1]||(a[1]=n=>b(d)?d.value=n:null),n:"primary"},{default:s(()=>[i(" Navigate to terminal ")]),_:1},8,["modelValue"]),t(y,{modelValue:e(c),"onUpdate:modelValue":a[2]||(a[2]=n=>b(c)?c.value=n:null),n:"primary"},{default:s(()=>[i(" Restart Nuxt server after update ")]),_:1},8,["modelValue"]),_("div",Y,[t(P,{n:"sm purple","flex-auto":"",icon:"carbon-chemistry"},{default:s(()=>[i(" Experimental feature. Please make sure to backup your project first. ")]),_:1}),t(C,{onClick:n=>m(!1)},{default:s(()=>[i(" Cancel ")]),_:2},1032,["onClick"]),t(C,{n:"solid primary",onClick:n=>m(!0)},{default:s(()=>[i(" Update ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)}}});export{ne as _};
@@ -1 +0,0 @@
1
- import{_ as h}from"./NIconButton.vue.ac7efd0c.js";import{a as N,ar as S,a0 as B,r as O,aZ as V,o as r,e as l,b as p,p as d,u as s,t as C,q as u,Z as _,n as w,g as j,c as f,F as J,af as P,a_ as $,H as z,ai as M}from"./entry.a0dd6aac.js";import{U as R}from"./json-editor-vue.b8dc29b2.js";const U=["open"],A={flex:"~ gap2","select-none":"","items-center":"",px4:""},E={key:1,"bg-active":"",p5:"",italic:""},F=p("span",{op50:""},"No data",-1),Z=[F],I=N({__name:"StateEditor",props:{name:{},open:{type:Boolean},state:{},readonly:{type:Boolean}},emits:["update:open"],setup(v,{emit:k}){const i=v,n=S(i,"open",k,{passive:!0}),b=B(),o=O();o.value=JSON.parse(JSON.stringify(i.state));const c=V(o,e=>{m(e,i.state)},{deep:!0});function m(e,t){for(const a in e)e[a]===null?t[a]=null:Array.isArray(e[a])?t[a]=e[a].slice():typeof e[a]=="object"?m(e[a],t[a]):t[a]=e[a]}async function g(){c.pause(),o.value=JSON.parse(JSON.stringify(i.state)),await M(),c.resume()}return(e,t)=>{const a=h;return r(),l("div",{class:"state-editor-details",open:e.name?s(n):!0},[p("div",A,[e.name?(r(),l("button",{key:0,flex:"~","cursor-pointer":"","items-center":"",class:d(s(n)?"":"op50"),onClick:t[0]||(t[0]=y=>n.value=!s(n))},[p("div",{"i-carbon-chevron-right":"",transition:"",class:d(s(n)?"rotate-90 op0":"")},null,2),p("code",{px3:"",py1:"","font-mono":"",class:d(s(n)?"bg-[#8881] rounded-t":"rounded hover:bg-active")},C(e.name),3)],2)):u("",!0),_(e.$slots,"actions",w(j({isOpen:s(n),name:e.name,state:e.state}))),s(n)?(r(),f(a,{key:1,title:"Refresh View",icon:"carbon-renew",onClick:g})):u("",!0)]),s(n)||!e.name?(r(),l(J,{key:0},[e.state&&Object.keys(e.state).length>0?(r(),f(s(R),P({key:0,modelValue:s(o),"onUpdate:modelValue":t[1]||(t[1]=y=>z(o)?o.value=y:null)},e.$attrs,{class:["json-editor-vue",[s(b).value==="dark"?"jse-theme-dark":"",(e.name,"")]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":"readonly"in e?e.readonly:s($),indentation:2,"tab-size":2}),null,16,["modelValue","class","read-only"])):(r(),l("div",E,Z))],64)):u("",!0)],8,U)}}});export{I as _};
@@ -1 +0,0 @@
1
- import{_ as o}from"./NPanelGrids.54ee09bc.js";import{a as n,c as t,w as _,o as a,b as s}from"./entry.a0dd6aac.js";const c=s("div",null," Your App ",-1),u=n({__name:"__blank",setup(r){return(p,m)=>{const e=o;return a(),t(e,{"h-screen":"","w-screen":"",px5:""},{default:_(()=>[c]),_:1})}}});export{u as default};
@@ -1 +0,0 @@
1
- import{a as j,l as I,r as V,o,e as a,b as e,F as m,m as E,p as F,u as n,t as _,q as y,s as P,f as s,w as i,j as p,v as T,x as A,y as R,z as U,h as G,A as X,B as ee,C as te,D as ne,E as oe,G as C,c as w,H as S,I as le,J as ie,K as se}from"./entry.a0dd6aac.js";import{_ as ae}from"./FilepathItem.vue.3587ec1f.js";import{_ as re}from"./NPanelGrids.54ee09bc.js";import{_ as ue}from"./PanelLeftRight.vue.8031c7d4.js";import{_ as de}from"./NTip.vue.f50fcd60.js";import{_ as ce}from"./NCodeBlock.vue.e44529a6.js";import{_ as me}from"./NCheckbox.vue.060051ad.js";import{_ as _e}from"./HelpFab.vue.dbb954dd.js";import"./editor.aee50e2c.js";import"./client.d6464981.js";import"./NIconButton.vue.ac7efd0c.js";const pe={"h-full":"",grid:"~ rows-[max-content_1fr]"},fe={flex:"~ wrap","w-full":""},ve=["onClick"],he=e("div",{border:"b base","flex-auto":""},null,-1),ye={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},xe=e("div",{"flex-auto":""},null,-1),$e={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},be=e("div",{"i-carbon-commit":"","text-xl":""},null,-1),ge=e("div",{"text-sm":"",op50:""}," Name ",-1),we=e("div",{"i-carbon-time":"","text-xl":""},null,-1),ze=e("div",{"text-sm":"",op50:""}," Build duration ",-1),Be=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1),ke=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1),Ce=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1),Ne=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1),Te=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1),Ae=e("div",{"text-sm":"",op50:""}," Built ",-1),De=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1),Ie=e("div",{"text-sm":"",op50:""}," Report Path ",-1),Ve=e("div",{"flex-auto":""},null,-1),D="/__nuxt_devtools__/analyze/",Fe=j({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(N){const f=N,v=I(()=>{const t=[{name:"Overview",id:"overview"}];return f.current.features.bundleClient&&t.push({name:"Client Bundle",id:"bundle-client"}),f.current.features.bundleNitro&&t.push({name:"Nitro Bundle",id:"bundle-nitro"}),f.current.features.viteInspect&&t.push({name:"Vite Inspect",id:"vite-inspect"}),t}),l=V(v.value[0]);function b(t){return t<1024?`${t}B`:t<1024*1024?`${(t/1024).toFixed(1)}KB`:t<1024*1024*1024?`${(t/1024/1024).toFixed(1)}MB`:`${(t/1024/1024/1024).toFixed(1)}GB`}function g(t){return`${((t.endTime-t.startTime)/1e3).toFixed(1)}s`}async function x(t){return R.clearAnalyzeBuilds(await U(),[t])}return(t,c)=>{const z=ae,B=G;return o(),a("div",pe,[e("div",fe,[(o(!0),a(m,null,E(n(v),(h,u)=>(o(),a("button",{key:u,px4:"",py2:"",border:"r base",hover:"bg-active",class:F(h.id===n(l).id?"":"border-b"),onClick:d=>l.value=h},[e("div",{class:F(h.id===n(l).id?"":"op30")},_(h.name),3)],10,ve))),128)),he]),n(l).id==="overview"?(o(),a("div",ye,[xe,e("div",$e,[be,e("div",null,[ge,e("div",null,_(t.current.name),1)]),we,e("div",null,[ze,e("div",null,_(g(t.current)),1)]),t.current.size?.clientBundle?(o(),a(m,{key:0},[Be,e("div",null,[ke,e("div",null,_(b(t.current.size.clientBundle)),1)])],64)):y("",!0),t.current.size.nitroBundle?(o(),a(m,{key:1},[Ce,e("div",null,[Ne,e("div",null,_(b(t.current.size.nitroBundle)),1)])],64)):y("",!0),Te,e("div",null,[Ae,e("div",null,_(n(P)(new Date(t.current.endTime))),1)]),De,e("div",null,[Ie,s(z,{filepath:t.current.analyzeDir},null,8,["filepath"])])]),Ve,s(B,{n:"rose",icon:"carbon-delete",onClick:c[0]||(c[0]=h=>x(t.current.name))},{default:i(()=>[p(" Delete this report ")]),_:1})])):y("",!0),c._lazyshow1||n(l).id==="bundle-client"?(c._lazyshow1=!0,o(),a(m,null,[T(e("iframe",{src:`${D}${t.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[A,n(l).id==="bundle-client"]])],64)):y("v-show-if",!0),c._lazyshow2||n(l).id==="bundle-nitro"?(c._lazyshow2=!0,o(),a(m,null,[T(e("iframe",{src:`${D}${t.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[A,n(l).id==="bundle-nitro"]])],64)):y("v-show-if",!0),c._lazyshow3||n(l).id==="vite-inspect"?(c._lazyshow3=!0,o(),a(m,null,[T(e("iframe",{src:`${D}${t.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[A,n(l).id==="vite-inspect"]])],64)):y("v-show-if",!0)])}}}),Re={class:"markdown-body"},Se=e("h1",null,"Build Analyze",-1),je=e("p",null,[p("DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command "),e("code",null,"nuxt build --analyze"),p(" and present the output data directly in DevTools for easy browsing and comparing.")],-1),Ee=[Se,je],Pe={__name:"analyze-build",setup(N,{expose:f}){return f({frontmatter:{}}),(l,b)=>(o(),a("div",Re,Ee))}},Ue={flex:"~ col"},Ge={flex:"~ gap-1 items-center","text-sm":"",op60:""},Le=e("div",{"i-carbon-time":""},null,-1),qe=e("div",{"flex-auto":""},null,-1),He=e("div",{"x-divider":""},null,-1),Ke={flex:"~ items-center justify-center",p4:""},Oe={flex:"~ col gap-1","w-250":"",p4:""},Je=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1),Me=e("p",{op50:""}," Enter the name of the build: ",-1),We=e("div",{my3:"","x-divider":""},null,-1),Ye=e("p",{op50:""}," The following command will be executed in your terminal: ",-1),Ze={flex:"~ gap-3",mt2:"","justify-end":""},ut=j({__name:"analyze-build",setup(N){const f=X(),v=ee(),l=te(),b=ne(),g=I(()=>{const u=b.query.slug;return v.value?.builds.find(d=>d.slug===u)??v.value?.builds[0]}),x=V(!1),t=V(""),c=I(()=>v.value?.builds.some(u=>u.name===t.value.trim()));async function z(){t.value=await R.generateAnalyzeBuildName(),await f.start()&&(C.value={name:t.value,processId:await R.startAnalyzeBuild(await U(),t.value)},x.value&&B())}function B(){C.value?.processId&&l.push(`/modules/terminals?id=${encodeURIComponent(C.value.processId)}`)}function h(u){return`${((u.endTime-u.startTime)/1e3).toFixed(1)}s`}return oe(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:z}]),(u,d)=>{const L=le,k=G,q=Fe,H=re,K=ue,O=ie,J=de,M=ce,W=me,Y=se,Z=Pe,Q=_e;return o(),a(m,null,[s(K,{"left-size":20},{left:i(()=>[e("div",Ue,[(o(!0),a(m,null,E(n(v)?.builds,r=>(o(),a(m,{key:r.slug},[s(L,{flex:"~ col gap1","hover:bg-active":"",p3:"",class:F(r.slug===n(g)?.slug?"text-primary bg-active":""),to:`?slug=${encodeURIComponent(r.slug)}`},{default:i(()=>[e("code",null,_(r.name),1),e("div",Ge,[Le,e("span",null,_(h(r)),1),qe,e("span",null,_(n(P)(new Date(r.endTime))),1)])]),_:2},1032,["class","to"]),He],64))),128)),e("div",Ke,[("processAnalyzeBuildInfo"in u?u.processAnalyzeBuildInfo:n(C))?(o(),w(k,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:d[1]||(d[1]=r=>B())},{default:i(()=>[p(" Building... ")]),_:1})):(o(),w(k,{key:0,n:"primary",icon:"carbon-edge-node",onClick:d[0]||(d[0]=r=>z())},{default:i(()=>[p(" Start a new build ")]),_:1}))])])]),right:i(()=>[n(g)?(o(),w(q,{key:0,current:n(g)},null,8,["current"])):(o(),w(H,{key:1}))]),_:1}),s(n(f),null,{default:i(({resolve:r})=>[s(Y,{"model-value":!0,onClose:$=>r(!1)},{default:i(()=>[e("div",Oe,[Je,Me,s(O,{modelValue:n(t),"onUpdate:modelValue":d[2]||(d[2]=$=>S(t)?t.value=$:null),placeholder:"Build name"},null,8,["modelValue"]),n(c)?(o(),w(J,{key:0,"n-orange":""},{default:i(()=>[p(" A build with the same name already exists, continue would overrides the previous build result. ")]),_:1})):y("",!0),We,Ye,s(M,{code:`npx nuxi analyze --no-serve --name=${n(t)}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),s(W,{modelValue:n(x),"onUpdate:modelValue":d[3]||(d[3]=$=>S(x)?x.value=$:null),mt2:"",n:"primary"},{default:i(()=>[p(" Navigate to terminal ")]),_:1},8,["modelValue"]),e("div",Ze,[s(k,{onClick:$=>r(!1)},{default:i(()=>[p(" Cancel ")]),_:2},1032,["onClick"]),s(k,{n:"solid primary",onClick:$=>r(!0)},{default:i(()=>[p(" Start ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),s(Q,null,{default:i(()=>[s(Z)]),_:1})],64)}}});export{ut as default};
@@ -1 +0,0 @@
1
- import{_ as M}from"./NPanelGrids.54ee09bc.js";import{_ as N}from"./AuthRequiredPanel.vue.19da182f.js";import{a as j,a0 as V,r as x,l as g,ag as $,ah as B,a3 as q,ai as E,aj as h,ak as I,al as L,e as D,o as a,D as P,C as W,am as F,an as C,y as A,u as t,c as l,w as b,q as O,ab as R,F as S,b as c,j as y,t as T,f as U,a6 as G}from"./entry.a0dd6aac.js";import{_ as X}from"./LaunchPage.vue.f137554e.js";import"./NMarkdown.vue.9f252ec4.js";import"./client.d6464981.js";const w=new Map,z=j({__name:"IframeView",props:{tab:{}},setup(k){const m=k,u=V(),r=x(),d=g(()=>m.tab.name),e=x(),o=$(B(r));q(()=>{const n=m.tab.view,i=n.persistent!==!1,f=["clipboard-write","clipboard-read"];if(w.get(d.value)&&i)e.value=w.get(d.value),e.value.style.visibility="visible";else{e.value=document.createElement("iframe"),e.value.setAttribute("allow",f.join("; ")),i&&w.set(d.value,e.value),e.value.src=n.src;try{e.value.style.opacity="0.01",e.value.onload=()=>{v(),s(),e.value.style.opacity="1"}}catch{e.value.style.opacity="1"}document.body.appendChild(e.value),E(_)}setTimeout(s,100)}),h(_),h(s),h(v),I(()=>{e.value&&(e.value.style.visibility="hidden")});function s(){if(!(!e.value||!e.value.contentWindow))try{const n=e.value.contentWindow.document.querySelector("html");n?.classList.toggle("dark",u.value==="dark"),n?.classList.toggle("light",u.value==="dark"),new MutationObserver(()=>{u.value=e.value?.contentWindow?.document.querySelector("html")?.classList.contains("dark")?"dark":"light"}).observe(n,{attributes:!0,attributeFilter:["class"]})}catch{}}const p=L();function v(){if(!(!e.value||!e.value.contentWindow))try{e.value.contentWindow.__NUXT_DEVTOOLS__=p.value}catch{}}function _(){e.value&&Object.assign(e.value.style,{position:"fixed",left:`${o.left}px`,top:`${o.top}px`,width:`${o.width}px`,height:`${o.height}px`,outline:"none"})}return(n,i)=>(a(),D("div",{ref_key:"anchor",ref:r,"h-full":"","w-full":""},null,512))}}),H={flex:"~ col gap2",mxa:"","items-center":""},J=c("div",{"i-carbon-queued":"",mb2:"","text-5xl":"",op50:""},null,-1),K={"text-xl":""},Q={"text-rose":""},Y=c("p",{op50:""}," It might because the module contributing this tab is not installed or enabled ",-1),Z=c("p",{mt8:"","animate-pulse":""}," Redirecting to overview page... ",-1),le=j({__name:"custom-[name]",setup(k){const m=P(),u=W(),r=g(()=>m.params.name),d=F(),e=g(()=>d.value.find(o=>o.name===r.value));return q(()=>{e.value?e.value.requireAuth&&!C.value&&A.requestForAuth():setTimeout(()=>{e.value||u.push("/modules/overview")},2e3)}),(o,s)=>{const p=M,v=N,_=z,n=X,i=G;return a(),D(S,null,[t(e)?O("",!0):(a(),l(p,{key:0},{default:b(()=>[c("div",H,[J,c("p",K,[y(" Tab "),c("code",Q,T(t(r)),1),y(" not found ")]),Y,Z])]),_:1})),t(e).requireAuth&&!("isDevAuthed"in o?o.isDevAuthed:t(C))?(a(),l(v,{key:1})):t(e).view.type==="iframe"?(a(),l(_,{key:2,tab:t(e)},null,8,["tab"])):t(e).view.type==="vnode"?(a(),l(R(t(e).view.vnode),{key:3})):t(e).view.type==="launch"?(a(),l(n,{key:4,icon:t(e).view.icon||t(e).icon,title:t(e).view.title||t(e).title,description:t(e).view.description,actions:t(e).view.actions,onAction:s[0]||(s[0]=f=>("rpc"in o?o.rpc:t(A)).customTabAction(t(e).name,f))},null,8,["icon","title","description","actions"])):(a(),l(p,{key:5},{default:b(()=>[U(i,{flex:"~ col","h-full":"","items-center":"","justify-center":""},{default:b(()=>[y(" Unknown tab type "+T(t(e).view),1)]),_:1})]),_:1}))],64)}}});export{le as default};
@@ -1 +0,0 @@
1
- import{aY as o,e as s,b as t,Z as a,o as n}from"./entry.a0dd6aac.js";const r={},c={"h-full":"","of-auto":"","n-panel-grids":""},l={"h-full":"","bg-base":""};function d(e,_){return n(),s("div",c,[t("div",l,[a(e.$slots,"default")])])}const i=o(r,[["render",d]]);export{i as default};