@nuxt/devtools 0.6.2 → 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 (134) hide show
  1. package/README.md +2 -4
  2. package/dist/chunks/module-main.mjs +25 -133
  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.d80827fd.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.b85270dd.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.de2cd5a6.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.53529111.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.8ff29308.js +1 -0
  23. package/dist/client/_nuxt/{NSwitch.vue.7f4e43b3.js → NSwitch.vue.840840dc.js} +1 -1
  24. package/dist/client/_nuxt/{NTip.vue.c99855ad.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.1e85c7f2.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.d94a4835.js → analyze-build.67bd8db6.js} +1 -1
  30. package/dist/client/_nuxt/{assets.cea82447.js → assets.36239ace.js} +3 -3
  31. package/dist/client/_nuxt/{client.aa60153e.js → client.495918a8.js} +1 -1
  32. package/dist/client/_nuxt/{components.67be79c1.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.24e006dd.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.ab8bf33a.js → imports.55b5830a.js} +1 -1
  45. package/dist/client/_nuxt/{index.31423b81.js → index.2421127a.js} +1 -1
  46. package/dist/client/_nuxt/index.b31d0db0.js +1 -0
  47. package/dist/client/_nuxt/{json-editor-vue.0e484aeb.js → json-editor-vue.d5db52dc.js} +1 -1
  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.a806949f.js → open-graph.d11fab80.js} +2 -2
  52. package/dist/client/_nuxt/overview.82760181.js +1 -0
  53. package/dist/client/_nuxt/{pages.9797a06b.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.c19cf62e.js → runtime-configs.834452b2.js} +1 -1
  57. package/dist/client/_nuxt/server-routes.20327313.js +9 -0
  58. package/dist/client/_nuxt/{settings.223347c0.js → settings.ef38f4f9.js} +1 -1
  59. package/dist/client/_nuxt/{state-components.7a725a3e.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.838c617b.js → terminals.e4fb811f.js} +2 -2
  63. package/dist/client/_nuxt/{unocss-runtime.8cb4743c.js → unocss-runtime.73092d93.js} +1 -1
  64. package/dist/client/_nuxt/{virtual-files.0f8a6122.js → virtual-files.071a4a48.js} +1 -1
  65. package/dist/client/index.html +2 -2
  66. package/dist/client/modules/analyze-build/index.html +2 -2
  67. package/dist/client/modules/assets/index.html +2 -2
  68. package/dist/client/modules/components/index.html +2 -2
  69. package/dist/client/modules/hooks/index.html +2 -2
  70. package/dist/client/modules/imports/index.html +2 -2
  71. package/dist/client/modules/middleware/index.html +2 -2
  72. package/dist/client/modules/modules/index.html +2 -2
  73. package/dist/client/modules/open-graph/index.html +2 -2
  74. package/dist/client/modules/overview/index.html +2 -2
  75. package/dist/client/modules/pages/index.html +2 -2
  76. package/dist/client/modules/payload/index.html +2 -2
  77. package/dist/client/modules/plugins/index.html +2 -2
  78. package/dist/client/modules/runtime-configs/index.html +2 -2
  79. package/dist/client/modules/server-routes/index.html +2 -2
  80. package/dist/client/modules/storage/index.html +2 -2
  81. package/dist/client/modules/terminals/index.html +2 -2
  82. package/dist/client/modules/virtual-files/index.html +2 -2
  83. package/dist/client/settings/index.html +2 -2
  84. package/dist/global-20ccb74c.d.ts +52 -0
  85. package/dist/module.d.ts +2 -0
  86. package/dist/module.json +1 -1
  87. package/dist/runtime/plugins/devtools.client.d.ts +0 -8
  88. package/dist/runtime/plugins/devtools.client.mjs +10 -84
  89. package/dist/runtime/plugins/view/FrameBox.vue +66 -35
  90. package/dist/runtime/plugins/view/Main.vue +19 -2
  91. package/dist/runtime/plugins/view/client.d.ts +8 -0
  92. package/dist/runtime/plugins/view/client.mjs +209 -1
  93. package/dist/runtime/plugins/view/state.d.ts +1 -4
  94. package/dist/runtime/plugins/view/state.mjs +2 -20
  95. package/dist/types.d.ts +2 -0
  96. package/package.json +14 -14
  97. package/dist/client/_nuxt/AuthRequiredPanel.vue.4f66b5dd.js +0 -1
  98. package/dist/client/_nuxt/Badge.2cc4687e.js +0 -1
  99. package/dist/client/_nuxt/CodeSnippets.vue.1e158b8f.js +0 -1
  100. package/dist/client/_nuxt/DurationDisplay.vue.a48b74dd.js +0 -1
  101. package/dist/client/_nuxt/FilepathItem.vue.df9b46ef.js +0 -1
  102. package/dist/client/_nuxt/HelpFab.vue.49173e4b.js +0 -1
  103. package/dist/client/_nuxt/NCheckbox.vue.df53e265.js +0 -1
  104. package/dist/client/_nuxt/NIconButton.vue.e211c1b6.js +0 -1
  105. package/dist/client/_nuxt/NIconTitle.vue.4e3340eb.js +0 -1
  106. package/dist/client/_nuxt/NMarkdown.vue.26c114a8.js +0 -1
  107. package/dist/client/_nuxt/NPanelGrids.fc7166ff.js +0 -1
  108. package/dist/client/_nuxt/NSectionBlock.0eaaa956.js +0 -1
  109. package/dist/client/_nuxt/NSelect.vue.94ec8f3c.js +0 -1
  110. package/dist/client/_nuxt/Navbar.vue.a50c38bf.js +0 -1
  111. package/dist/client/_nuxt/NpmVersionCheck.vue.029b0cde.js +0 -1
  112. package/dist/client/_nuxt/StateEditor.vue.4e5aa888.js +0 -1
  113. package/dist/client/_nuxt/__blank.8e143dfc.js +0 -1
  114. package/dist/client/_nuxt/custom-_name_.ed0df2f5.js +0 -1
  115. package/dist/client/_nuxt/default.29185309.js +0 -1
  116. package/dist/client/_nuxt/entry.ea777320.css +0 -1
  117. package/dist/client/_nuxt/entry.f3de3eb8.js +0 -19
  118. package/dist/client/_nuxt/error-404.09e25f4a.js +0 -1
  119. package/dist/client/_nuxt/error-404.2618a69f.css +0 -1
  120. package/dist/client/_nuxt/error-500.0bde1cc6.js +0 -1
  121. package/dist/client/_nuxt/error-500.12a2683b.css +0 -1
  122. package/dist/client/_nuxt/error-component.753dcd89.js +0 -3
  123. package/dist/client/_nuxt/full.e7e50a56.js +0 -1
  124. package/dist/client/_nuxt/hooks.c5f385b4.js +0 -1
  125. package/dist/client/_nuxt/index.686c37b5.js +0 -1
  126. package/dist/client/_nuxt/middleware.08e999fd.js +0 -1
  127. package/dist/client/_nuxt/modules.b435656d.js +0 -4
  128. package/dist/client/_nuxt/none.548277ee.js +0 -1
  129. package/dist/client/_nuxt/overview.08fa2255.js +0 -1
  130. package/dist/client/_nuxt/payload.f6049d4c.js +0 -1
  131. package/dist/client/_nuxt/plugins.7ff70558.js +0 -1
  132. package/dist/client/_nuxt/server-routes.34b80486.js +0 -9
  133. package/dist/client/_nuxt/storage.446005cc.js +0 -1
  134. 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
- }
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.2",
4
+ "version": "0.6.3",
5
5
  "license": "MIT",
6
6
  "repository": "nuxt/devtools",
7
7
  "exports": {
@@ -30,12 +30,12 @@
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",
@@ -53,7 +53,7 @@
53
53
  "picocolors": "^1.0.0",
54
54
  "pkg-types": "^1.0.3",
55
55
  "rc9": "^2.1.1",
56
- "semver": "^7.5.2",
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,8 +61,8 @@
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.2",
65
- "@nuxt/devtools-wizard": "0.6.2"
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",
@@ -73,14 +73,14 @@
73
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",
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
84
  "@vueuse/nuxt": "^10.2.0",
85
85
  "esno": "^0.16.3",
86
86
  "flatted": "^3.2.7",
@@ -90,7 +90,7 @@
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
95
  "ofetch": "^1.1.1",
96
96
  "ohash": "^1.1.2",
@@ -100,7 +100,7 @@
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",
103
+ "unocss": "^0.53.3",
104
104
  "vanilla-jsoneditor": "^0.17.8",
105
105
  "vis-data": "^7.1.6",
106
106
  "vis-network": "^9.1.6",
@@ -109,7 +109,7 @@
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.2"
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 b,a3 as x,an as n,bd as _,y as l,r as m,u as c,c as g,w as d,Z as w,o as A,f as s,b as e,j as i,H as N,aO as T,aV as V,be as q,h as B,J as C,a6 as D}from"./entry.f3de3eb8.js";import{_ as P}from"./NIconButton.vue.e211c1b6.js";import{_ as $}from"./NPanelGrids.fc7166ff.js";const I=e("h3",{class:"mb2 text-lg font-medium leading-6",flex:"~ items-center gap-1","text-orange":""},[e("span",{class:"i-carbon-information-square"}),i(" Permissions required ")],-1),K=e("p",null," This operation requires permissions for running command and access files from the browser. ",-1),S=e("p",null,[i(" A request is sent to the server."),e("br"),i(" Please check your terminal for the instructions and then come back. ")],-1),j={flex:"~ gap-3",mt2:"","justify-end":""},F=e("p",null,"Or you can manually paste the token here:",-1),M=["onSubmit"],G=b({__name:"AuthRequiredPanel",setup(O){x(async()=>{n.value||_.value&&await l.verifyAuthToken(_.value)&&(n.value=!0),n.value||l.requestForAuth()});const o=m(""),r=m(!1);async function u(){const t=o.value.trim();r.value=!1,await l.verifyAuthToken(t).then(a=>{a?(n.value=!0,q(t)):r.value=!0})}return(t,a)=>{const f=B,p=C,h=P,v=D,k=$;return("isDevAuthed"in t?t.isDevAuthed:c(n))?w(t.$slots,"default",{key:1}):(A(),g(k,{key:0},{default:d(()=>[s(v,{flex:"~ col gap-2",mxa:"","items-center":"",p6:"","text-center":""},{default:d(()=>[I,K,S,e("div",j,[s(f,{disabled:"",icon:"i-carbon-time"},{default:d(()=>[i(" Waiting for authorization... ")]),_:1})]),F,e("form",{flex:"~ inline gap-2 items-center",onSubmit:V(u,["prevent"])},[s(p,{modelValue:c(o),"onUpdate:modelValue":a[0]||(a[0]=y=>N(o)?o.value=y:null),placeholder:"Enter token here",n:c(r)?"red":void 0,onKeydown:T(u,["enter"])},null,8,["modelValue","n","onKeydown"]),s(h,{icon:"i-carbon-arrow-right",onClick:u})],40,M)]),_:1})]),_:1}))}}});export{G as _};
@@ -1 +0,0 @@
1
- import{aY as n,o,e as s,Z as t}from"./entry.f3de3eb8.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.de2cd5a6.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.f3de3eb8.js";import{a as V}from"./editor.24e006dd.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.f3de3eb8.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.24e006dd.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.f3de3eb8.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.e211c1b6.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.f3de3eb8.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,bj 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.f3de3eb8.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.f3de3eb8.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.f3de3eb8.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.aa60153e.js";import{a as t,u as a,o as e,c as r,ab as s,t as d}from"./entry.f3de3eb8.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.f3de3eb8.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.f3de3eb8.js";import{_ as I}from"./NIconTitle.vue.4e3340eb.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 u,ar as p,e as t,Z as l,v as f,bk as m,u as b,b as h,t as v,q as n,H as _,o as s,c as k,P as V}from"./entry.f3de3eb8.js";const y={class:"n-text-input flex flex items-center border n-border-base rounded px-2 py-1 focus-within:n-focus-base focus-within:border-context n-bg-base"},B=["disabled"],w={key:0,value:"",disabled:"",hidden:""},g=u({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(d,{emit:i}){const o=p(d,"modelValue",i,{passive:!0});return(e,a)=>{const r=V;return s(),t("div",y,[l(e.$slots,"icon",{},()=>[e.icon?(s(),k(r,{key:0,icon:e.icon,class:"mr-0.4em text-1.1em op50"},null,8,["icon"])):n("",!0)]),f(h("select",{"onUpdate:modelValue":a[0]||(a[0]=c=>_(o)?o.value=c:null),disabled:e.disabled,class:"w-full flex-auto n-bg-base !outline-none"},[e.placeholder?(s(),t("option",w,v(e.placeholder),1)):n("",!0),l(e.$slots,"default")],8,B),[[m,b(o)]])])}}});export{g 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.f3de3eb8.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.2cc4687e.js";import{_ as E}from"./NCodeBlock.vue.de2cd5a6.js";import{_ as F}from"./NCheckbox.vue.df53e265.js";import{_ as q}from"./NTip.vue.c99855ad.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.f3de3eb8.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.e211c1b6.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.f3de3eb8.js";import{U as R}from"./json-editor-vue.0e484aeb.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.fc7166ff.js";import{a as n,c as t,w as _,o as a,b as s}from"./entry.f3de3eb8.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{_ as M}from"./NPanelGrids.fc7166ff.js";import{_ as N}from"./AuthRequiredPanel.vue.4f66b5dd.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.f3de3eb8.js";import{_ as X}from"./LaunchPage.vue.b85270dd.js";import"./NIconButton.vue.e211c1b6.js";import"./NMarkdown.vue.26c114a8.js";import"./client.aa60153e.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,s=n.persistent!==!1,f=["clipboard-write","clipboard-read"];if(w.get(d.value)&&s)e.value=w.get(d.value),e.value.style.visibility="visible";else{e.value=document.createElement("iframe"),e.value.setAttribute("allow",f.join("; ")),s&&w.set(d.value,e.value),e.value.src=n.src;try{e.value.style.opacity="0.01",e.value.onload=()=>{v(),i(),e.value.style.opacity="1"}}catch{e.value.style.opacity="1"}document.body.appendChild(e.value),E(_)}setTimeout(i,100)}),h(_),h(i),h(v),I(()=>{e.value&&(e.value.style.visibility="hidden")});function i(){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,s)=>(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),ce=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,i)=>{const p=M,v=N,_=z,n=X,s=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:i[0]||(i[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(s,{flex:"~ col","h-full":"","items-center":"","justify-center":""},{default:b(()=>[y(" Unknown tab type "+T(t(e).view),1)]),_:1})]),_:1}))],64)}}});export{ce as default};
@@ -1 +0,0 @@
1
- import{aY as o,e as s,b as t,Z as a,o as n}from"./entry.f3de3eb8.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};