@nuxt/devtools 1.0.0-beta.2 → 1.0.0-beta.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.
- package/README.md +19 -3
- package/dist/chunks/module-main.mjs +20 -14
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/client/200.html +17 -17
- package/dist/client/404.html +17 -17
- package/dist/client/__blank/index.html +17 -17
- package/dist/client/_nuxt/{CodeDiff.vue.b74b0167.js → CodeDiff.vue.4fcef1e4.js} +1 -1
- package/dist/client/_nuxt/{ComposableItem.vue.66a98e20.js → ComposableItem.vue.b4d03c6d.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaButton.vue.b30dcd6f.js → DataSchemaButton.vue.18fef0d4.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaDrawer.d00941d6.js → DataSchemaDrawer.714650a4.js} +1 -1
- package/dist/client/_nuxt/{DurationDisplay.vue.5b7cc04d.js → DurationDisplay.vue.dd0f91f1.js} +1 -1
- package/dist/client/_nuxt/{FilepathItem.vue.6dd69314.js → FilepathItem.vue.a1b71b8d.js} +1 -1
- package/dist/client/_nuxt/{HelpFab.vue.314bc83b.js → HelpFab.vue.f0924b60.js} +1 -1
- package/dist/client/_nuxt/LaunchPage.vue.c617b6d5.js +1 -0
- package/dist/client/_nuxt/{NBadge.e849763e.js → NBadge.ff27dca2.js} +1 -1
- package/dist/client/_nuxt/NCheckbox.vue.b56304c9.js +1 -0
- package/dist/client/_nuxt/{NCodeBlock.vue.882d562f.js → NCodeBlock.vue.9ce69690.js} +2 -2
- package/dist/client/_nuxt/{NDrawer.vue.a4010d93.js → NDrawer.vue.2b176b54.js} +1 -1
- package/dist/client/_nuxt/NDropdown.vue.e90fcd0b.js +1 -0
- package/dist/client/_nuxt/{NIconTitle.vue.71113a3f.js → NIconTitle.vue.7b846ffe.js} +1 -1
- package/dist/client/_nuxt/{NLink.vue.a09685db.js → NLink.vue.9859bf11.js} +1 -1
- package/dist/client/_nuxt/{NMarkdown.vue.13c5f0c3.js → NMarkdown.vue.79860402.js} +1 -1
- package/dist/client/_nuxt/{NNavbar.vue.d9a029e0.js → NNavbar.vue.737ef1b1.js} +1 -1
- package/dist/client/_nuxt/NSectionBlock.acf7c6ed.js +1 -0
- package/dist/client/_nuxt/NSelect.vue.04805728.js +1 -0
- package/dist/client/_nuxt/NSelectTabs.vue.626ecbdd.js +1 -0
- package/dist/client/_nuxt/NSwitch.vue.ff927669.js +1 -0
- package/dist/client/_nuxt/{NTip.vue.3f5fb5a1.js → NTip.vue.c98a31a2.js} +1 -1
- package/dist/client/_nuxt/StateEditor.vue.1c34496c.js +1 -0
- package/dist/client/_nuxt/{__blank.f49c5a73.js → __blank.eaeade3a.js} +1 -1
- package/dist/client/_nuxt/{analyze-build.988e7c9e.js → analyze-build.92ac65df.js} +1 -1
- package/dist/client/_nuxt/assets.c6f47fab.js +16 -0
- package/dist/client/_nuxt/client.17f79a3c.js +1 -0
- package/dist/client/_nuxt/components.80a04311.js +98 -0
- package/dist/client/_nuxt/{custom-_name_.0e141ac3.js → custom-_name_.b17c1362.js} +1 -1
- package/dist/client/_nuxt/{default.a50dad07.js → default.201686e7.js} +1 -1
- package/dist/client/_nuxt/entry.909ad6c7.js +27 -0
- package/dist/client/_nuxt/entry.aac067b6.css +1 -0
- package/dist/client/_nuxt/{error-404.429edf81.js → error-404.18967c67.js} +1 -1
- package/dist/client/_nuxt/{error-500.9e83b20b.js → error-500.dcd91098.js} +1 -1
- package/dist/client/_nuxt/{full.c90b8ab9.js → full.a9db422e.js} +1 -1
- package/dist/client/_nuxt/{hooks.40588927.js → hooks.ad5f725f.js} +1 -1
- package/dist/client/_nuxt/{imports.7b590e48.js → imports.468b0281.js} +1 -1
- package/dist/client/_nuxt/index.86b321d0.js +1 -0
- package/dist/client/_nuxt/{index.8013a14e.js → index.dacd63c3.js} +1 -1
- package/dist/client/_nuxt/{json-editor-vue.465dc720.js → json-editor-vue.8a771ed0.js} +1 -1
- package/dist/client/_nuxt/modules.dc1dbdef.js +2 -0
- package/dist/client/_nuxt/{none.ab2b300f.js → none.37b64ac4.js} +1 -1
- package/dist/client/_nuxt/open-graph.03011848.js +3 -0
- package/dist/client/_nuxt/open-graph.484b1a77.css +1 -0
- package/dist/client/_nuxt/overview.acf4105d.js +1 -0
- package/dist/client/_nuxt/{pages.7f7e1a57.js → pages.061895e9.js} +1 -1
- package/dist/client/_nuxt/payload.b7f38f74.js +1 -0
- package/dist/client/_nuxt/{plugins.1f073986.js → plugins.59bd86e7.js} +1 -1
- package/dist/client/_nuxt/{runtime-configs.6d4dd513.js → runtime-configs.aaa20729.js} +1 -1
- package/dist/client/_nuxt/server-routes.c8d34f99.js +9 -0
- package/dist/client/_nuxt/settings.12ae4ad7.js +1 -0
- package/dist/client/_nuxt/{state-components.c2be3414.js → state-components.a78445e5.js} +1 -1
- package/dist/client/_nuxt/state-modules.199ca5da.js +1 -0
- package/dist/client/_nuxt/storage-options.aeaf572e.js +1 -0
- package/dist/client/_nuxt/{storage.8cd70b69.js → storage.f2e2d671.js} +1 -1
- package/dist/client/_nuxt/{terminals.ce3bbf0e.js → terminals.091a556d.js} +1 -1
- package/dist/client/_nuxt/timeline.1210bb98.js +29 -0
- package/dist/client/_nuxt/{unocss-runtime.41db0d67.js → unocss-runtime.c55f86fd.js} +1 -1
- package/dist/client/_nuxt/virtual-files.7767a81f.js +1 -0
- package/dist/client/index.html +17 -17
- package/dist/client/modules/analyze-build/index.html +17 -17
- package/dist/client/modules/assets/index.html +17 -17
- package/dist/client/modules/components/index.html +17 -17
- package/dist/client/modules/hooks/index.html +17 -17
- package/dist/client/modules/imports/index.html +17 -17
- package/dist/client/modules/modules/index.html +17 -17
- package/dist/client/modules/open-graph/index.html +17 -17
- package/dist/client/modules/overview/index.html +17 -17
- package/dist/client/modules/pages/index.html +17 -17
- package/dist/client/modules/payload/index.html +17 -17
- package/dist/client/modules/plugins/index.html +17 -17
- package/dist/client/modules/runtime-configs/index.html +17 -17
- package/dist/client/modules/server-routes/index.html +17 -17
- package/dist/client/modules/storage/index.html +17 -17
- package/dist/client/modules/terminals/index.html +17 -17
- package/dist/client/modules/timeline/index.html +17 -17
- package/dist/client/modules/virtual-files/index.html +17 -17
- package/dist/client/settings/index.html +17 -17
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/view/client.mjs +1 -1
- package/dist/shared/{devtools.d18bab28.mjs → devtools.ca660ec5.mjs} +31 -1
- package/package.json +7 -7
- package/dist/client/_nuxt/LaunchPage.vue.017c62ce.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.cf7e1e9d.js +0 -1
- package/dist/client/_nuxt/NDropdown.vue.3b1768f5.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.7f41e147.js +0 -1
- package/dist/client/_nuxt/NSelect.vue.e7f8c81a.js +0 -1
- package/dist/client/_nuxt/NSelectTabs.vue.ddc009ff.js +0 -1
- package/dist/client/_nuxt/NSwitch.vue.8d3010b0.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.162475d5.js +0 -1
- package/dist/client/_nuxt/assets.2b649247.js +0 -16
- package/dist/client/_nuxt/client.253674ec.js +0 -1
- package/dist/client/_nuxt/components.7583b49c.js +0 -98
- package/dist/client/_nuxt/entry.3dd66f35.js +0 -27
- package/dist/client/_nuxt/entry.960c025a.css +0 -1
- package/dist/client/_nuxt/index.90ae56cb.js +0 -1
- package/dist/client/_nuxt/middleware.72aa446e.js +0 -1
- package/dist/client/_nuxt/modules.d997669f.js +0 -2
- package/dist/client/_nuxt/open-graph.1cc10683.js +0 -3
- package/dist/client/_nuxt/overview.014aea35.js +0 -1
- package/dist/client/_nuxt/payload.58a8bb6b.js +0 -1
- package/dist/client/_nuxt/server-routes.b5fc14db.js +0 -9
- package/dist/client/_nuxt/settings.04d1166d.js +0 -1
- package/dist/client/_nuxt/state-modules.5bf4563c.js +0 -1
- package/dist/client/_nuxt/storage-options.2224e06b.js +0 -1
- package/dist/client/_nuxt/timeline.23647b38.js +0 -29
- package/dist/client/_nuxt/virtual-files.bc5e9072.js +0 -1
- package/dist/client/modules/middleware/index.html +0 -42
|
@@ -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.
|
|
6
|
-
<link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.
|
|
7
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.
|
|
5
|
+
<link rel="stylesheet" href="/__nuxt_devtools__/client/_nuxt/entry.aac067b6.css">
|
|
6
|
+
<link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.909ad6c7.js">
|
|
7
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.dacd63c3.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.ff0e7dcb.js">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/vitesse-light.c6996724.js">
|
|
@@ -18,24 +18,24 @@
|
|
|
18
18
|
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/vue-html.88dda4a8.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.e25d1410.js">
|
|
21
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/default.
|
|
22
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/full.
|
|
23
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/none.
|
|
21
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/default.201686e7.js">
|
|
22
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/full.a9db422e.js">
|
|
23
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/none.37b64ac4.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.
|
|
27
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NSelect.vue.
|
|
28
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NSwitch.vue.
|
|
29
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NDropdown.vue.
|
|
30
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NCodeBlock.vue.
|
|
31
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/client.
|
|
32
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NDrawer.vue.
|
|
33
|
-
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.
|
|
26
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/DataSchemaDrawer.714650a4.js">
|
|
27
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NSelect.vue.04805728.js">
|
|
28
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NSwitch.vue.ff927669.js">
|
|
29
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NDropdown.vue.e90fcd0b.js">
|
|
30
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NCodeBlock.vue.9ce69690.js">
|
|
31
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/client.17f79a3c.js">
|
|
32
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NDrawer.vue.2b176b54.js">
|
|
33
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.c55f86fd.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.
|
|
35
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-404.18967c67.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.
|
|
38
|
-
<script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.
|
|
37
|
+
<link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-500.dcd91098.js">
|
|
38
|
+
<script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.909ad6c7.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>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -114,7 +114,7 @@ export async function setupDevToolsClient({
|
|
|
114
114
|
}
|
|
115
115
|
return iframe;
|
|
116
116
|
}
|
|
117
|
-
function waitForClientInjection(retry =
|
|
117
|
+
function waitForClientInjection(retry = 20, timeout = 300) {
|
|
118
118
|
let lastError;
|
|
119
119
|
const test = () => {
|
|
120
120
|
try {
|
|
@@ -60,6 +60,36 @@ const defaultTabOptions = {
|
|
|
60
60
|
view: "grid"
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
|
+
const defaultAllowedExtensions = [
|
|
64
|
+
"png",
|
|
65
|
+
"jpg",
|
|
66
|
+
"jpeg",
|
|
67
|
+
"gif",
|
|
68
|
+
"svg",
|
|
69
|
+
"webp",
|
|
70
|
+
"ico",
|
|
71
|
+
"mp4",
|
|
72
|
+
"ogg",
|
|
73
|
+
"mp3",
|
|
74
|
+
"wav",
|
|
75
|
+
"mov",
|
|
76
|
+
"mkv",
|
|
77
|
+
"mpg",
|
|
78
|
+
"txt",
|
|
79
|
+
"ttf",
|
|
80
|
+
"woff",
|
|
81
|
+
"woff2",
|
|
82
|
+
"eot",
|
|
83
|
+
"json",
|
|
84
|
+
"js",
|
|
85
|
+
"jsx",
|
|
86
|
+
"ts",
|
|
87
|
+
"tsx",
|
|
88
|
+
"md",
|
|
89
|
+
"mdx",
|
|
90
|
+
"vue",
|
|
91
|
+
"webm"
|
|
92
|
+
];
|
|
63
93
|
|
|
64
94
|
const module = defineNuxtModule({
|
|
65
95
|
meta: {
|
|
@@ -81,4 +111,4 @@ const module = defineNuxtModule({
|
|
|
81
111
|
}
|
|
82
112
|
});
|
|
83
113
|
|
|
84
|
-
export { ROUTE_AUTH as R, WS_EVENT_NAME as W,
|
|
114
|
+
export { ROUTE_AUTH as R, WS_EVENT_NAME as W, defaultTabOptions as a, ROUTE_ANALYZE as b, ROUTE_CLIENT as c, defaultAllowedExtensions as d, ROUTE_AUTH_VERIFY as e, module as m };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "nuxt/devtools",
|
|
7
7
|
"exports": {
|
|
@@ -65,15 +65,15 @@
|
|
|
65
65
|
"vite-plugin-vue-inspector": "^4.0.0",
|
|
66
66
|
"which": "^3.0.1",
|
|
67
67
|
"ws": "^8.14.2",
|
|
68
|
-
"@nuxt/devtools-kit": "1.0.0-beta.
|
|
69
|
-
"@nuxt/devtools-wizard": "1.0.0-beta.
|
|
68
|
+
"@nuxt/devtools-kit": "1.0.0-beta.3",
|
|
69
|
+
"@nuxt/devtools-wizard": "1.0.0-beta.3"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@iconify-json/bxl": "^1.1.7",
|
|
73
73
|
"@iconify-json/carbon": "^1.1.21",
|
|
74
74
|
"@iconify-json/logos": "^1.1.37",
|
|
75
75
|
"@iconify-json/ri": "^1.1.12",
|
|
76
|
-
"@iconify-json/simple-icons": "^1.1.
|
|
76
|
+
"@iconify-json/simple-icons": "^1.1.75",
|
|
77
77
|
"@iconify-json/tabler": "^1.1.95",
|
|
78
78
|
"@nuxt/content": "^2.8.5",
|
|
79
79
|
"@nuxtjs/color-mode": "^3.3.0",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"json-editor-vue": "^0.10.19",
|
|
92
92
|
"markdown-it": "^13.0.2",
|
|
93
93
|
"markdown-it-link-attributes": "^4.0.1",
|
|
94
|
-
"nanoid": "^5.0.
|
|
94
|
+
"nanoid": "^5.0.2",
|
|
95
95
|
"nuxt": "^3.7.4",
|
|
96
96
|
"nuxt-vitest": "^0.11.0",
|
|
97
97
|
"quicktype-core": "^23.0.76",
|
|
@@ -102,12 +102,12 @@
|
|
|
102
102
|
"unplugin-vue-markdown": "^0.24.3",
|
|
103
103
|
"vanilla-jsoneditor": "^0.18.9",
|
|
104
104
|
"vis-data": "^7.1.7",
|
|
105
|
-
"vis-network": "^9.1.
|
|
105
|
+
"vis-network": "^9.1.8",
|
|
106
106
|
"vue-tsc": "^1.8.19",
|
|
107
107
|
"vue-virtual-scroller": "2.0.0-beta.8",
|
|
108
108
|
"xterm": "^5.3.0",
|
|
109
109
|
"xterm-addon-fit": "^0.8.0",
|
|
110
|
-
"@nuxt/devtools": "1.0.0-beta.
|
|
110
|
+
"@nuxt/devtools": "1.0.0-beta.3"
|
|
111
111
|
},
|
|
112
112
|
"scripts": {
|
|
113
113
|
"build": "pnpm dev:prepare && pnpm build:module && pnpm build:client && esno scripts/prepare.ts",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as x,h as a,j as o,A as y,o as t,i as r,k as i,t as l,p as m,m as w,n as C,aq as B,v as $,F as v,U as V,by as P,a2 as F,_ as I,al as L}from"./entry.3dd66f35.js";import{_ as T}from"./NMarkdown.vue.13c5f0c3.js";const j={"text-xl":""},q={flex:"~ gap2 wrap"},G=x({__name:"LaunchPage",props:{name:{},icon:{},title:{},description:{},actions:{}},emits:["action"],setup(_,{emit:p}){const d=_;function u(e,s){V("launch-page",{pageName:d.name}),e.handle?.(),p("action",s)}return(e,s)=>{const f=P,k=T,g=F,h=I,b=L,N=y;return t(),a(N,null,{default:o(()=>[r(b,{flex:"~ col gap2",mxa:"","min-w-100":"","items-center":"",p6:""},{default:o(()=>[r(f,{mb2:"","text-5xl":"",icon:e.icon||e.icon,title:e.title},null,8,["icon","title"]),i("h1",j,l(e.title),1),e.description?(t(),a(k,{key:0,mb2:"","mt--1":"","text-center":"","text-base":"",op50:"",markdown:e.description},null,8,["markdown"])):m("",!0),i("div",q,[(t(!0),w(v,null,C(e.actions,(n,c)=>(t(),a(h,B({key:c,n:"solid primary",disabled:n.pending,to:n.src,target:n.src?"_blank":void 0},n.attrs,{onClick:A=>u(n,c)}),{default:o(()=>[n.pending?(t(),a(g,{key:0,icon:"carbon-circle-dash","animate-spin":""})):m("",!0),$(" "+l(n.label),1)]),_:2},1040,["disabled","to","target","onClick"]))),128))])]),_:1})]),_:1})}}});export{G as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as i,a6 as r,o as p,m as b,I as u,bG as h,f as a,k as n,l as k,ac as f,i as m,a7 as v,G as _,a2 as x}from"./entry.3dd66f35.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,null],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(),b("label",{class:"n-checkbox hover:n-checkbox-hover select-none items-center n-disabled:n-disabled",checked:a(e)||null,disabled:o.disabled||null},[u(n("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>k(e)?e.value=l:null),type:"checkbox",class:"peer absolute op0",disabled:o.disabled,onKeypress:s[1]||(s[1]=f(l=>e.value=!a(e),["enter"]))},null,40,y),[[h,a(e)]]),n("span",B,[m(d,{class:"n-checkbox-icon scale-0 transform op0 n-transition n-checked:scale-100 n-checked:op100"})]),n("span",{class:_([a(e)?"":"op50","n-transition"])},[v(o.$slots,"default")],2)],8,V)}}});export{$ as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as i,a6 as p,r as c,aR as u,o as f,m,a7 as t,i as v,j as _,v as b,f as a,k,G as V,_ as B}from"./entry.3dd66f35.js";const $=i({__name:"NDropdown",props:{modelValue:{type:Boolean}},setup(r,{emit:l}){const e=p(r,"modelValue",l,{passive:!0}),s=c();return u(s,()=>{e.value=!1}),(o,n)=>{const d=B;return f(),m("div",{ref_key:"el",ref:s,class:"relative"},[t(o.$slots,"trigger",{enabled:a(e),click:()=>e.value=!a(e)},()=>[v(d,{onClick:n[0]||(n[0]=N=>e.value=!a(e))},{default:_(()=>[b(" Dropdown ")]),_:1})]),k("div",{class:V(["absolute z-10 border n-border-base rounded shadow n-transition n-bg-base",[a(e)?"op-100":"op0 pointer-events-none -translate-y-1"]])},[t(o.$slots,"default")],2)],512)}}});export{$ as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as g,a6 as y,m as r,k as o,G as n,i as B,j as S,f as i,F as c,I as $,J as b,a7 as s,p,o as l,v as u,t as v,h as k,y as w,z as C,a2 as N,q as I}from"./entry.3dd66f35.js";import{_ as x}from"./NIconTitle.vue.71113a3f.js";const _=t=>(w("data-v-cb964879"),t=t(),C(),t),V=["open"],z={"text-base":""},T={key:0,"text-sm":"",op50:""},D=_(()=>o("div",{class:"flex-auto"},null,-1)),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 f(e){a.value=e.target.open}return(e,d)=>{const m=N,h=x;return l(),r(c,null,[o("details",{open:i(a),onToggle:f},[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:S(()=>[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(),k(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,[$(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),[[b,i(a)]])],64)):p("v-show-if",!0)],40,V),F],64)}}});const J=I(j,[["__scopeId","data-v-cb964879"]]);export{J as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as p,a6 as f,o,m as l,a7 as n,h as m,p as t,I as b,bH as h,f as v,k,t as y,l as V,G as d,a2 as B}from"./entry.3dd66f35.js";const g=["disabled"],w={key:0,value:"",disabled:"",hidden:""},_=p({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(r,{emit:i}){const s=f(r,"modelValue",i,{passive:!0});return(e,a)=>{const c=B;return o(),l("div",{class:d(["n-select flex flex items-center border rounded px-2 py-1 focus-within:n-focus-base focus-within:border-context n-bg-base",e.disabled?"border-gray:10":"n-border-base"])},[n(e.$slots,"icon",{},()=>[e.icon?(o(),m(c,{key:0,icon:e.icon,class:"mr-0.4em text-1.1em op50"},null,8,["icon"])):t("",!0)]),b(k("select",{"onUpdate:modelValue":a[0]||(a[0]=u=>V(s)?s.value=u:null),disabled:e.disabled,class:d(["w-full flex-auto n-bg-base !outline-none",e.disabled?"appearance-none":""])},[e.placeholder?(o(),l("option",w,y(e.placeholder),1)):t("",!0),n(e.$slots,"default")],10,g),[[h,v(s)]])],2)}}});export{_};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as c,a6 as m,o as s,m as t,F as v,n as f,G as d,f as o,k as r,t as _,I as g,aI as y,l as V}from"./entry.3dd66f35.js";const h={class:"n-select-tabs flex flex-inline flex-wrap items-center border n-border-base rounded n-bg-base"},k=["disabled","title"],x=["disabled","value","title"],C=c({__name:"NSelectTabs",props:{modelValue:{default:void 0},disabled:{type:Boolean,default:!1},options:{}},setup(i,{emit:b}){const a=m(i,"modelValue",b,{passive:!0});return(l,n)=>(s(),t("fieldset",h,[(s(!0),t(v,null,f(l.options,(e,p)=>(s(),t("label",{key:e.label,disabled:l.disabled,class:d(["relative n-border-base hover:n-bg-active px-0.5em py-0.1em",[p?"border-l n-border-base ml--1px":"",e.value===o(a)?"n-bg-active":""]]),title:e.label},[r("div",{class:d([e.value===o(a)?"":"op35"])},_(e.label),3),g(r("input",{"onUpdate:modelValue":n[0]||(n[0]=u=>V(a)?a.value=u:null),type:"radio",disabled:l.disabled,value:e.value,title:e.label,class:"absolute inset-0 op-0.1"},null,8,x),[[y,o(a)]])],10,k))),128))]))}});export{C as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as i,a6 as c,o as r,m as u,I as h,bG as p,f as l,k as t,l as b,ac as f,a7 as v}from"./entry.3dd66f35.js";const k=["checked","disabled"],m=["disabled"],w=t("div",{class:"n-switch-slider n-checked:n-switch-slider-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition"},[t("div",{class:"n-checked:n-switch-thumb-checked n-switch-thumb n-transition"})],-1),B=i({__name:"NSwitch",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(d,{emit:o}){const e=c(d,"modelValue",o,{passive:!0});return(a,s)=>(r(),u("label",{class:"n-switch n-switch-base hover:n-switch-hover n-disabled:n-disabled",checked:l(e)||null,disabled:a.disabled||null},[h(t("input",{"onUpdate:modelValue":s[0]||(s[0]=n=>b(e)?e.value=n:null),type:"checkbox",class:"peer absolute op0",disabled:a.disabled,onKeypress:s[1]||(s[1]=f(n=>e.value=!l(e),["enter"]))},null,40,m),[[p,l(e)]]),w,v(a.$slots,"default")],8,k))}});export{B as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as V,a6 as B,ah as _,r as w,b6 as O,bd as C,ab as $,o as i,m as p,k as u,G as c,f as a,t as J,p as l,a7 as D,ba as P,bb as R,F as j,I as z,i as F,h as v,aq as G,be as M,l as U,av as A,_ as E}from"./entry.3dd66f35.js";import{_ as q}from"./DataSchemaButton.vue.b30dcd6f.js";import{U as I}from"./json-editor-vue.465dc720.js";const T=["open"],Y={flex:"~ gap2","select-none":"","items-center":"",px4:""},Q=V({__name:"StateEditor",props:{name:{},open:{type:Boolean},state:{},readonly:{type:Boolean}},emits:["update:open"],setup(b,{emit:g}){const s=b,n=B(s,"open",g,{passive:!0}),k=_(),o=w(),d=O(s.name,"$9Gvv2FGyYa");s.state?o.value=JSON.parse(JSON.stringify(s.state)):(typeof s.state=="number"||typeof s.state!="string")&&(o.value=s.state);const m=C(o,e=>{typeof e!="number"&&typeof e!="string"?f(e,s.state):d.value=e},{deep:!0});function f(e,r){for(const t in e)e[t]===null?r[t]=null:Array.isArray(e[t])?r[t]=e[t].slice():typeof e[t]=="object"?f(e[t],r[t]):r[t]=e[t]}async function h(){m.pause(),o.value=JSON.parse(JSON.stringify(s.state)),await A(),m.resume()}return(e,r)=>{const t=E,S=q,N=$("tooltip");return i(),p("div",{class:"state-editor-details",open:e.name?a(n):!0},[u("div",Y,[e.name?(i(),p("button",{key:0,flex:"~","cursor-pointer":"","items-center":"",class:c(a(n)?"":"op50"),onClick:r[0]||(r[0]=y=>n.value=!a(n))},[u("div",{"i-carbon-chevron-right":"",transition:"",class:c(a(n)?"rotate-90 op0":"")},null,2),u("code",{px3:"",py1:"","font-mono":"",class:c(a(n)?"bg-[#8881] rounded-t":"rounded hover:bg-active")},J(e.name),3)],2)):l("",!0),D(e.$slots,"actions",P(R({isOpen:a(n),name:e.name,state:a(d)}))),a(n)?(i(),p(j,{key:1},[z(F(t,{title:"Refresh View",icon:"carbon-renew",border:!1,onClick:h},null,512),[[N,"Refresh View",void 0,{bottom:!0}]]),a(o)?(i(),v(S,{key:0,getter:()=>({name:e.name,input:JSON.stringify(a(o))})},null,8,["getter"])):l("",!0)],64)):l("",!0)]),a(n)||!e.name?(i(),v(a(I),G({key:0,modelValue:a(o),"onUpdate:modelValue":r[1]||(r[1]=y=>U(o)?o.value=y:null)},e.$attrs,{class:["json-editor-vue",[a(k).value==="dark"?"jse-theme-dark":"",(e.name,"")]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":"readonly"in e?e.readonly:a(M),indentation:2,"tab-size":2}),null,16,["modelValue","class","read-only"])):l("",!0)],8,T)}}});export{Q as _};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{d as X,r as F,Y as q,o as s,m as c,i as d,f as t,k as e,v as C,F as B,n as Z,h as I,j as b,p as E,G as Y,Z as U,a0 as de,a1 as pe,U as me,K as G,L as H,_ as ee,a2 as ne,W as oe,a as P,a3 as fe,a4 as ve,a5 as se,t as N,a6 as le,a7 as he,l as R,a8 as _e,b as te,a9 as ge,e as xe,aa as be,ab as ae,I as W,ac as we,ad as ye,X as $e,ae as ke,af as Ce,ag as Pe}from"./entry.3dd66f35.js";import{_ as Ae}from"./NNavbar.vue.d9a029e0.js";import{_ as De}from"./NSectionBlock.7f41e147.js";import{_ as Ve}from"./FilepathItem.vue.6dd69314.js";import{_ as Ne,u as Fe}from"./storage-options.2224e06b.js";import{_ as Se}from"./NDrawer.vue.a4010d93.js";import{D as Ie}from"./constants.2cc6e981.js";import"./NIconTitle.vue.71113a3f.js";import"./NCodeBlock.vue.882d562f.js";import"./client.253674ec.js";const Te={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},je={for:"drop-zone-input","text-3xl":""},Ue={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},Ee=e("div",{px6:"",py6:""},[e("h1",{"text-2xl":""}," Upload "),e("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1),Le={grid:"~ cols-minmax-8rem","overflow-auto":"",p6:""},Be={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},Me=["src"],ze={flex:"~ gap1","items-center":""},Oe={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Re=X({__name:"AssetDropZone",props:{folder:{type:String,required:!0}},setup(T){const a=T,p=F(!1),n=F(),m=F([]),h=["image","video"];function A(r){n.value=r.target,p.value=!0}function u(r){r.target===n.value&&(p.value=!1)}function $(r){r.preventDefault()}function K(r){r.preventDefault(),L(r.dataTransfer.files)}function L(r){const g=Array.from(r||[]);if(g.length){const v=[],k=m.value.map(f=>f.name);for(const f of g)if(k.includes(f.name)){let l=1;const[D,i]=f.name.split(".");for(;k.includes(`${D} (${l}).${i}`);)l++;const o=`${D}-${l}.${i}`,z=new Blob([f],{type:f.type}),O=new File([z],o,{lastModified:Date.now()});v.push(O),k.push(o)}else f.type===""?U({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}):h.some(l=>f.type.includes(l))?v.push(f):U({message:`"${f.type}" file type is not allowed`,icon:"carbon:face-dissatisfied",classes:"text-orange"});m.value=[...m.value,...v]}}async function x(){if(de.value||pe.value)return;me("assets:upload");const r=[];for(const g of m.value){const v=new FileReader;v.readAsDataURL(g);const f=(await new Promise(l=>{v.onload=()=>l(v.result)})).split(";base64,").pop();r.push({path:g.name,encoding:"base64",content:f})}await G.writeStaticAssets(await H(),[...r],a.folder).then(()=>{j(),U({message:"Files uploaded successfully!",icon:"i-carbon:checkmark"})}).catch(g=>{console.error(g),j(),U({message:`Error uploading files: ${g}`,icon:"i-carbon-warning",classes:"text-red"})}),p.value=!1}function _(r){m.value?.splice(r,1)}function w(r){return URL.createObjectURL(r)}function M(r,g){const[v,k]=r.name.split("."),f=g.replace(/\.\w+$/,""),l=`${f}.${k}`;return f.length===0?(alert("File name must be at least 1 characters long"),v):(Object.defineProperty(r,"name",{value:l,writable:!1}),m.value.splice(m.value.indexOf(r),1,r),r)}function S(){m.value=[]}function j(){p.value=!1,S()}return q("dragenter",A),q("dragleave",u),q("dragover",$),q("drop",K),(r,g)=>{const v=ee,k=ne,f=oe;return s(),c("div",{fixed:"","bottom-0":"","left-13":"","right-0":"","top-0":"","z-10":"","backdrop-blur-20":"","transition-all":"",class:Y(t(p)?"opacity-100 visible":"opacity-0 invisible")},[d(v,{icon:"carbon-close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",border:!1,onClick:j}),t(m)?.length?(s(),c("div",Ue,[Ee,e("div",Le,[(s(!0),c(B,null,Z(t(m),(l,D)=>(s(),c("div",{key:l.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[e("div",Be,[e("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:w(l)},null,8,Me)]),e("div",ze,[d(f,{n:"xs","h-full":"","flex-auto":"","model-value":l.name,"onUpdate:modelValue":i=>M(l,i.target.value)},null,8,["model-value","onUpdate:modelValue"]),d(v,{n:"red",icon:"carbon-trash-can","h-full":"","flex-none":"",title:"Remove file",onClick:i=>_(D)},null,8,["onClick"])])]))),128))]),e("div",Oe,[t(m).length?(s(),I(v,{key:0,n:"red",onClick:S},{default:b(()=>[d(k,{icon:"carbon-clean"}),C(" Clear ")]),_:1})):E("",!0),d(v,{disabled:!t(m).length,n:"primary solid",onClick:x},{default:b(()=>[d(k,{icon:"carbon-cloud-upload"}),C(" Upload ")]),_:1},8,["disabled"])])])):(s(),c("div",Te,[e("label",je,[d(k,{icon:"carbon-cloud-upload","mr-2":""}),C(" Drop files here or click to select ")]),e("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:g[0]||(g[0]=l=>L(l.target.files))},null,32)]))],2)}}}),Ke=X({__name:"AssetFontPreview",props:{asset:{}},setup(T){const a=T,p=P(()=>`devtools-assets-${fe(a.asset)}`);return ve(P(()=>`
|
|
2
|
-
@font-face {
|
|
3
|
-
font-family: '${p.value}';
|
|
4
|
-
src: url('${a.asset.publicPath}');
|
|
5
|
-
}
|
|
6
|
-
`)),(n,m)=>(s(),c("div",{"of-hidden":"",style:se({fontFamily:`'${t(p)}'`})}," Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz ",4))}}),Xe={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},Ge=["src"],Ze={key:2,"i-carbon-document":"","text-3xl":"",op20:""},We={key:3,"w-full":"","self-start":"",p4:""},qe=["textContent"],Ye={key:4},He=["src","autoplay","controls"],Je={key:5},Qe={key:0,"i-carbon-volume-up":"","text-3xl":"",op20:""},et=["src"],tt={key:6,"i-carbon-help":"","text-3xl":"",op20:""},ie=X({__name:"AssetPreview",props:{asset:{},textContent:{},detail:{type:Boolean}},setup(T){return(a,p)=>{const n=Ke;return s(),c("div",Xe,[a.asset.type==="image"?(s(),c("img",{key:0,src:a.asset.publicPath},null,8,Ge)):a.asset.type==="font"?(s(),I(n,{key:a.asset.publicPath,asset:a.asset,"self-stretch":"",p2:"","text-2xl":""},null,8,["asset"])):a.asset.type==="text"&&!a.textContent?(s(),c("div",Ze)):a.asset.type==="text"&&a.textContent?(s(),c("div",We,[e("pre",{"max-h-10rem":"","of-hidden":"","text-xs":"","font-mono":"",textContent:N(a.textContent)},null,8,qe)])):a.asset.type==="video"?(s(),c("div",Ye,[e("video",{src:a.asset.publicPath,autoplay:a.detail,controls:a.detail},null,8,He)])):a.asset.type==="audio"?(s(),c("div",Je,[a.detail?(s(),c("audio",{key:1,src:a.asset.publicPath,controls:""},null,8,et)):(s(),c("div",Qe))])):(s(),c("div",tt))])}}}),nt={flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},ot={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},st=X({__name:"AssetGridItem",props:{asset:{},folder:{}},setup(T){const a=T,p=P(()=>a.folder&&a.asset.path.startsWith(a.folder)?a.asset.path.slice(a.folder.length):a.asset.path);return(n,m)=>{const h=ie;return s(),c("button",nt,[d(h,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:n.asset},null,8,["asset"]),e("div",ot,N(t(p)),1)])}}}),re=X({__name:"AssetListItem",props:{item:{},index:{default:0},modelValue:{}},setup(T,{emit:a}){const p=T,n=le(p,"modelValue",a,{passive:!0}),m=P(()=>p.item?.children?.length),h=F(!0),A=P(()=>m.value?"i-carbon-folder":p.item.type==="image"?"i-carbon-image":p.item.type==="video"?"i-carbon-video":p.item.type==="audio"?"i-carbon-volume-up":p.item.type==="font"?"i-carbon-text-small-caps":p.item.type==="text"?"i-carbon-document":p.item.type==="json"?"i-carbon-json":"i-carbon-document-blank");return(u,$)=>{const K=ne,L=re;return s(),c("div",null,[e("button",{flex:"~ gap-2","w-full":"","items-center":"",hover:"bg-active",px4:"",py1:"",style:se({paddingLeft:`calc(1rem + ${u.index*1.5}em)`}),class:Y({"bg-active":!t(m)&&t(n)?.filePath===u.item?.filePath}),border:"b base",onClick:$[0]||($[0]=x=>t(m)?h.value=!t(h):n.value=u.item)},[e("div",{class:Y(t(A))},null,2),e("span",{class:Y({"flex items-center":t(m)}),"flex-auto":"","text-start":"","text-sm":"","font-mono":""},N(u.item.path),3),t(m)?(s(),I(K,{key:0,icon:"carbon:chevron-right","transform-rotate":t(h)?90:0,transition:""},null,8,["transform-rotate"])):E("",!0)],6),t(h)?he(u.$slots,"default",{key:0},()=>[(s(!0),c(B,null,Z(u.item?.children,x=>(s(),I(L,{key:x.filepath,modelValue:t(n),"onUpdate:modelValue":$[1]||($[1]=_=>R(n)?n.value=_:null),item:x,index:u.index+1},null,8,["modelValue","item","index"]))),128))]):E("",!0)])}}}),lt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},at=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Preview "),e("div",{"x-divider":""})],-1),it={flex:"~","items-center":"","justify-center":""},rt=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Details "),e("div",{"x-divider":""})],-1),ct={"max-w-full":"","w-full":"","table-fixed":""},ut=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1),dt={flex:"~ gap-1","w-full":"","items-center":""},pt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1),mt={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},ft={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},vt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1),ht={capitalize:""},_t=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1),gt={key:0},xt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1),bt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1),wt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1),yt={op70:""},$t=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Actions "),e("div",{"x-divider":""})],-1),kt={flex:"~ gap2 wrap"},Ct=e("div",{"flex-auto":""},null,-1),Pt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},At=e("span",null," Are you sure you want to delete this asset? ",-1),Dt={flex:"~ gap2 wrap justify-center"},Vt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},Nt={flex:"~ gap2 wrap justify-center"},Ft={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},St=["onKeydown"],It={flex:"","justify-end":"","gap-4":""},Tt=X({__name:"AssetDetails",props:{modelValue:{}},setup(T,{emit:a}){const n=le(T,"modelValue",a,{passive:!0}),m=_e(),h=te(()=>{if(n.value.type==="image")return G.getImageMeta(n.value.filePath)}),A=F(!1),u=F(),$=F(0),K=te(async()=>{if(n.value.type!=="text")return;$.value;const i=await G.getTextAssetContent(n.value.filePath);return u.value=i,i});async function L(){if(K.value!==u.value)try{await G.writeStaticAssets(await H(),[{path:n.value.path,content:u.value,override:!0}],""),A.value=!1,$.value++,U({message:"Updated",icon:"i-carbon-checkmark",classes:"text-green"})}catch{U({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const x=ge(),_=P(()=>(x.value?._installedModules||[]).some(o=>o.meta?.name==="@nuxt/image"||o.meta?.name==="@nuxt/image-edge")),w=P(()=>{const i=[];if(n.value.type==="image"){const o=h.value?.width?`
|
|
7
|
-
width="${h.value.width}"
|
|
8
|
-
height="${h.value.height}" `:" ";return i.push({lang:"vue-html",code:`<img${o}
|
|
9
|
-
src="${n.value.publicPath}"
|
|
10
|
-
/>`,name:"Plain Image"}),_.value&&i.push({lang:"vue-html",code:`<NuxtImg${o}
|
|
11
|
-
src="${n.value.publicPath}"
|
|
12
|
-
/>`,name:"Nuxt Img",docs:"https://image.nuxt.com/usage/nuxt-img"},{lang:"vue-html",code:`<NuxtPicture${o}
|
|
13
|
-
src="${n.value.publicPath}"
|
|
14
|
-
/>`,name:"Nuxt Picture",docs:"https://image.nuxt.com/usage/nuxt-picture"}),i}return i.push({lang:"html",code:`<a download href="${n.value.publicPath}">
|
|
15
|
-
Download ${n.value.path.split("/").slice(-1)[0]}
|
|
16
|
-
</a>`,name:"Download link"}),i}),M=xe(),S=be(()=>n.value.mtime),j=P(()=>{const i=n.value.size;return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(2)} KB`:`${(i/1024/1024).toFixed(2)} MB`}),r=P(()=>{if(!h.value?.width||!h.value?.height)return"";const i=(z,O)=>O?i(O,z%O):z,o=i(h.value.width,h.value.height);return o>3?`${h.value.width/o}:${h.value.height/o}`:""}),g=P(()=>["image","text","video","audio","font"].includes(n.value.type)),v=F(!1);async function k(){try{await G.deleteStaticAsset(await H(),n.value.filePath),n.value=void 0,v.value=!1,U({message:"Asset deleted",icon:"i-carbon-checkmark",classes:"text-green"})}catch{U({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}const f=F(!1),l=F("");async function D(){const i=n.value.filePath.split("/"),o=i.slice(-1)[0].split(".").slice(0,-1).join(".");if(!l.value||l.value===o)return U({message:"Please enter a new name",icon:"i-carbon-warning",classes:"text-orange"});try{const z=i.slice(-1)[0].split(".").slice(-1)[0],O=`${i.slice(0,-1).join("/")}/${l.value}.${z}`;await G.renameStaticAsset(await H(),n.value.filePath,O),n.value=void 0,f.value=!1,U({message:"Asset renamed",icon:"i-carbon-checkmark",classes:"text-green"})}catch{U({message:"Something went wrong!",icon:"i-carbon-warning",classes:"text-red"})}}return(i,o)=>{const z=ie,O=Ve,V=ee,ce=Ne,J=$e,ue=oe,Q=ae("tooltip");return s(),c(B,null,[e("div",lt,[t(g)?(s(),c(B,{key:0},[at,e("div",it,[d(z,{detail:"","max-h-80":"","min-h-20":"","min-w-20":"","w-auto":"",rounded:"",border:"~ base",asset:t(n),"text-content":t(K)},null,8,["asset","text-content"])])],64)):E("",!0),rt,e("table",ct,[e("tbody",null,[e("tr",null,[ut,e("td",null,[e("div",dt,[d(O,{filepath:t(n).filePath,"text-left":""},null,8,["filepath"]),W(d(V,{"flex-none":"",title:"Open in Editor",icon:"carbon-launch",border:!1,onClick:o[0]||(o[0]=y=>t(m)(t(n).filePath))},null,512),[[Q,"Open in Editor"]])])])]),e("tr",null,[pt,e("td",null,[e("div",mt,[e("div",ft,N(t(n).publicPath),1),W(d(V,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",border:!1,onClick:o[1]||(o[1]=y=>t(M)(t(n).publicPath))},null,512),[[Q,"Copy public path"]]),W(d(V,{"flex-none":"",to:t(n).publicPath,icon:"carbon-launch",target:"_blank",border:!1,title:"Open in browser"},null,8,["to"]),[[Q,"Open in browser"]])])])]),e("tr",null,[vt,e("td",ht,N(t(n).type),1)]),t(h)?.width?(s(),c(B,{key:0},[e("tr",null,[_t,e("td",null,N(t(h).width)+" x "+N(t(h).height),1)]),t(r)?(s(),c("tr",gt,[xt,e("td",null,N(t(r)),1)])):E("",!0)],64)):E("",!0),e("tr",null,[bt,e("td",null,N(t(j)),1)]),e("tr",null,[wt,e("td",null,[C(N(new Date(t(n).mtime).toLocaleString())+" ",1),e("span",yt,"("+N(t(S))+")",1)])])])]),$t,e("div",kt,[d(V,{to:t(n).publicPath,download:"",target:"_blank",icon:"carbon-download",n:"green"},{default:b(()=>[C(" Download ")]),_:1},8,["to"]),t(n).type==="text"?(s(),I(V,{key:0,icon:"carbon-edit",n:"cyan",onClick:o[2]||(o[2]=y=>A.value=!t(A))},{default:b(()=>[C(" Edit ")]),_:1})):E("",!0),d(V,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:o[3]||(o[3]=y=>f.value=!t(f))},{default:b(()=>[C(" Rename ")]),_:1}),d(V,{icon:"carbon-delete",n:"red",onClick:o[4]||(o[4]=y=>v.value=!t(v))},{default:b(()=>[C(" Delete ")]),_:1})]),Ct,t(w).length?(s(),I(ce,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":t(w)},null,8,["code-snippets"])):E("",!0)]),d(J,{modelValue:t(v),"onUpdate:modelValue":o[6]||(o[6]=y=>R(v)?v.value=y:null)},{default:b(()=>[e("div",Pt,[At,e("div",Dt,[d(V,{icon:"carbon-close",onClick:o[5]||(o[5]=y=>v.value=!1)},{default:b(()=>[C(" Cancel ")]),_:1}),d(V,{icon:"carbon-delete",n:"red",onClick:k},{default:b(()=>[C(" Delete ")]),_:1})])])]),_:1},8,["modelValue"]),d(J,{modelValue:t(f),"onUpdate:modelValue":o[9]||(o[9]=y=>R(f)?f.value=y:null)},{default:b(()=>[e("div",Vt,[d(ue,{modelValue:t(l),"onUpdate:modelValue":o[7]||(o[7]=y=>R(l)?l.value=y:null),placeholder:"New name",n:"blue"},null,8,["modelValue"]),e("div",Nt,[d(V,{icon:"carbon-close",onClick:o[8]||(o[8]=y=>f.value=!1)},{default:b(()=>[C(" Cancel ")]),_:1}),d(V,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:D},{default:b(()=>[C(" Rename ")]),_:1})])])]),_:1},8,["modelValue"]),t(n).type==="text"?(s(),I(J,{key:0,modelValue:t(A),"onUpdate:modelValue":o[12]||(o[12]=y=>R(A)?A.value=y:null)},{default:b(()=>[e("div",Ft,[W(e("textarea",{"onUpdate:modelValue":o[10]||(o[10]=y=>R(u)?u.value=y:null),placeholder:"Item value...",class:"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none",onKeydown:we(L,["enter"])},null,40,St),[[ye,t(u)]]),e("div",It,[d(V,{icon:"carbon-close",onClick:o[11]||(o[11]=y=>A.value=!1)},{default:b(()=>[C(" Cancel ")]),_:1}),d(V,{icon:"carbon:save",n:"primary",onClick:L},{default:b(()=>[C(" save ")]),_:1})])])]),_:1},8,["modelValue"])):E("",!0)],64)}}}),jt={"h-full":"","of-auto":""},Ut={"flex-none":"",flex:"~ gap2 items-center"},Et={op50:""},Lt={key:0},Bt={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},Mt={key:1,p2:"",grid:"~ cols-minmax-8rem"},zt={key:1},Jt=X({__name:"assets",setup(T){const a=ke(),p=F(""),n=P(()=>new Ce(a.value||[],{keys:["path"]})),m=P(()=>p.value?n.value.search(p.value).map(_=>_.item):a.value||[]),h=P(()=>{const x={};for(const _ of m.value){const w=`${_.path.split("/").slice(0,-1).join("/")}/`;x[w]||(x[w]=[]),x[w].push(_)}return Object.entries(x).sort(([_],[w])=>_.localeCompare(w))}),A=P(()=>{const x={path:"public",children:[]},_=(w,M,S)=>{const[j,...r]=M;let g=w.children.find(v=>v.path===j);g||(g={...S,path:j,children:[]},w.children.push(g)),r.length>1?_(g,r,S):r.length===1&&g.children.push({...S,path:r[0]})};return m.value.forEach(w=>{const M=w.path.split("/").filter(S=>S!=="");_(x,M,w)}),x.children}),u=F(),{view:$}=Fe("assets");function K(){$.value=$.value==="list"?"grid":"list"}Pe("Escape",()=>{u.value=void 0});const L=F();return(x,_)=>{const w=ee,M=Ae,S=Re,j=st,r=De,g=re,v=Tt,k=Se,f=ae("tooltip");return s(),c("div",jt,[d(M,{ref_key:"navbar",ref:L,search:t(p),"onUpdate:search":_[0]||(_[0]=l=>R(p)?p.value=l:null),pb2:""},{actions:b(()=>[e("div",Ut,[W(d(w,{"text-lg":"",border:!1,icon:t($)==="grid"?"i-carbon-list":"i-carbon-grid",title:"Toggle view",onClick:K},null,8,["icon"]),[[f,"Toggle View",void 0,{"bottom-end":!0}]])])]),default:b(()=>[e("div",Et,[t(p)?(s(),c("span",Lt,N(t(m).length)+" matched · ",1)):E("",!0),e("span",null,N(t(a)?.length)+" assets in total",1)])]),_:1},8,["search"]),d(S,{folder:"/"}),t($)==="grid"?(s(),c(B,{key:0},[t(h).length>1?(s(!0),c(B,{key:0},Z(t(h),([l,D])=>(s(),I(r,{key:l,text:l,description:`${D.length} items`,open:D.length<=("DETAILS_MAX_ITEMS"in x?x.DETAILS_MAX_ITEMS:t(Ie)),padding:!1},{default:b(()=>[e("div",Bt,[(s(!0),c(B,null,Z(D,i=>(s(),I(j,{key:i.path,asset:i,folder:l,onClick:o=>u.value=i},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(s(),c("div",Mt,[(s(!0),c(B,null,Z(t(m),l=>(s(),I(j,{key:l.path,asset:l,onClick:D=>u.value=l},null,8,["asset","onClick"]))),128))]))],64)):(s(),c("div",zt,[(s(!0),c(B,null,Z(t(A),(l,D)=>(s(),I(g,{key:D,modelValue:t(u),"onUpdate:modelValue":_[1]||(_[1]=i=>R(u)?u.value=i:null),item:l},null,8,["modelValue","item"]))),128))])),d(k,{"model-value":!!t(u),"auto-close":"","w-120":"",top:t(L),onClose:_[3]||(_[3]=l=>u.value=void 0)},{default:b(()=>[t(u)?(s(),I(v,{key:0,modelValue:t(u),"onUpdate:modelValue":_[2]||(_[2]=l=>R(u)?u.value=l:null)},null,8,["modelValue"])):E("",!0)]),_:1},8,["model-value","top"])])}}});export{Jt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bo as f,bD as r}from"./entry.3dd66f35.js";let o;const n=[];function s(i){if(n.push(i),!(typeof window>"u"))return window.__NUXT_DEVTOOLS__&&n.forEach(e=>e(window.__NUXT_DEVTOOLS__)),Object.defineProperty(window,"__NUXT_DEVTOOLS__",{set(e){e&&n.forEach(t=>t(e))},get(){return o.value},configurable:!0}),()=>{n.splice(n.indexOf(i),1)}}function u(){o||(o=f(),s(e));function i(){r(o)}function e(t){o.value=t,t.host&&t.host.hooks.hook("host:update:reactivity",i)}return o}const c=u();export{c as d};
|