@nuxt/devtools 0.8.5 → 1.0.0-beta.1

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 (127) hide show
  1. package/README.md +1 -5
  2. package/dist/chunks/module-main.mjs +189 -69
  3. package/dist/chunks/vscode.mjs +13 -11
  4. package/dist/client/200.html +17 -17
  5. package/dist/client/404.html +17 -17
  6. package/dist/client/_nuxt/{CodeDiff.vue.0e58df1f.js → CodeDiff.vue.09a831fc.js} +1 -1
  7. package/dist/client/_nuxt/{ComposableItem.vue.e263b9a9.js → ComposableItem.vue.770ce9d1.js} +1 -1
  8. package/dist/client/_nuxt/DataSchemaButton.vue.65a9244c.js +1 -0
  9. package/dist/client/_nuxt/{DataSchemaDrawer.6de1f238.js → DataSchemaDrawer.939e0d36.js} +2 -2
  10. package/dist/client/_nuxt/{DurationDisplay.vue.8da73fd3.js → DurationDisplay.vue.3abddd08.js} +1 -1
  11. package/dist/client/_nuxt/{FilepathItem.vue.7bd675c6.js → FilepathItem.vue.66158bcd.js} +1 -1
  12. package/dist/client/_nuxt/HelpFab.vue.074157ff.js +1 -0
  13. package/dist/client/_nuxt/LaunchPage.vue.20d8d836.js +1 -0
  14. package/dist/client/_nuxt/NBadge.532c6829.js +1 -0
  15. package/dist/client/_nuxt/NCheckbox.vue.83a6e70e.js +1 -0
  16. package/dist/client/_nuxt/{NCodeBlock.vue.84865d5b.js → NCodeBlock.vue.d4a74ca4.js} +1 -1
  17. package/dist/client/_nuxt/NDrawer.vue.f03c3dec.js +1 -0
  18. package/dist/client/_nuxt/{NDropdown.vue.d756d40c.js → NDropdown.vue.885f70c3.js} +1 -1
  19. package/dist/client/_nuxt/{NIconTitle.vue.b6d28480.js → NIconTitle.vue.5caf9fc5.js} +1 -1
  20. package/dist/client/_nuxt/NLink.vue.c05eef3c.js +1 -0
  21. package/dist/client/_nuxt/{NMarkdown.vue.d2063d22.js → NMarkdown.vue.52b3ce56.js} +1 -1
  22. package/dist/client/_nuxt/NNavbar.vue.0f176f87.js +1 -0
  23. package/dist/client/_nuxt/{NSectionBlock.42a3cefc.js → NSectionBlock.43816001.js} +1 -1
  24. package/dist/client/_nuxt/NSelect.vue.dcac9c73.js +1 -0
  25. package/dist/client/_nuxt/{NSelectTabs.vue.4a83d611.js → NSelectTabs.vue.411a7347.js} +1 -1
  26. package/dist/client/_nuxt/{NSwitch.vue.21018268.js → NSwitch.vue.aacb5de3.js} +1 -1
  27. package/dist/client/_nuxt/{NTip.vue.d193bf96.js → NTip.vue.7a94f00d.js} +1 -1
  28. package/dist/client/_nuxt/StateEditor.vue.e862f0c1.js +1 -0
  29. package/dist/client/_nuxt/analyze-build.2cdd206f.js +1 -0
  30. package/dist/client/_nuxt/assets.41fcf77e.js +16 -0
  31. package/dist/client/_nuxt/{client.d926285a.js → client.ab169146.js} +1 -1
  32. package/dist/client/_nuxt/components.81bb7f4d.js +98 -0
  33. package/dist/client/_nuxt/custom-_name_.3060f125.js +1 -0
  34. package/dist/client/_nuxt/{default.c4c43b40.js → default.de670135.js} +1 -1
  35. package/dist/client/_nuxt/entry.9effa704.js +27 -0
  36. package/dist/client/_nuxt/entry.ebd8706b.css +1 -0
  37. package/dist/client/_nuxt/{error-404.087131b3.js → error-404.b43ed6fa.js} +1 -1
  38. package/dist/client/_nuxt/{error-500.d1c41037.js → error-500.9a32d319.js} +1 -1
  39. package/dist/client/_nuxt/{full.478da439.js → full.44b6f3d9.js} +1 -1
  40. package/dist/client/_nuxt/hooks.85310903.js +1 -0
  41. package/dist/client/_nuxt/imports.3e92b5b9.js +1 -0
  42. package/dist/client/_nuxt/index.370f8c55.js +17 -0
  43. package/dist/client/_nuxt/index.780a9ee0.js +1 -0
  44. package/dist/client/_nuxt/json-editor-vue.724e0801.js +129 -0
  45. package/dist/client/_nuxt/{middleware.87876377.js → middleware.44a34c7b.js} +1 -1
  46. package/dist/client/_nuxt/modules.24081f84.js +2 -0
  47. package/dist/client/_nuxt/{none.cfaeed76.js → none.06949a5f.js} +1 -1
  48. package/dist/client/_nuxt/open-graph.6cf823d3.js +3 -0
  49. package/dist/client/_nuxt/overview.86a88207.js +1 -0
  50. package/dist/client/_nuxt/pages.23eb0566.js +1 -0
  51. package/dist/client/_nuxt/payload.1baa204b.js +1 -0
  52. package/dist/client/_nuxt/plugins.f261769b.js +1 -0
  53. package/dist/client/_nuxt/runtime-configs.a5615107.js +1 -0
  54. package/dist/client/_nuxt/server-routes.2022f4ba.js +9 -0
  55. package/dist/client/_nuxt/settings.ab7b45b3.js +1 -0
  56. package/dist/client/_nuxt/{state-components.c2201640.js → state-components.1d5849c5.js} +1 -1
  57. package/dist/client/_nuxt/state-modules.78318316.js +1 -0
  58. package/dist/client/_nuxt/storage-options.8ca9ecbc.js +1 -0
  59. package/dist/client/_nuxt/storage.cb6d643c.js +1 -0
  60. package/dist/client/_nuxt/{terminals.a1c82952.js → terminals.06dde221.js} +3 -3
  61. package/dist/client/_nuxt/timeline.5add59be.js +29 -0
  62. package/dist/client/_nuxt/{unocss-runtime.dedd4a37.js → unocss-runtime.1dfe0ac4.js} +2 -2
  63. package/dist/client/_nuxt/virtual-files.804fdba7.js +1 -0
  64. package/dist/client/index.html +17 -17
  65. package/dist/client/modules/analyze-build/index.html +17 -17
  66. package/dist/client/modules/assets/index.html +17 -17
  67. package/dist/client/modules/components/index.html +17 -17
  68. package/dist/client/modules/hooks/index.html +17 -17
  69. package/dist/client/modules/imports/index.html +17 -17
  70. package/dist/client/modules/middleware/index.html +17 -17
  71. package/dist/client/modules/modules/index.html +17 -17
  72. package/dist/client/modules/open-graph/index.html +17 -17
  73. package/dist/client/modules/overview/index.html +17 -17
  74. package/dist/client/modules/pages/index.html +17 -17
  75. package/dist/client/modules/payload/index.html +17 -17
  76. package/dist/client/modules/plugins/index.html +17 -17
  77. package/dist/client/modules/runtime-configs/index.html +17 -17
  78. package/dist/client/modules/server-routes/index.html +17 -17
  79. package/dist/client/modules/storage/index.html +17 -17
  80. package/dist/client/modules/terminals/index.html +17 -17
  81. package/dist/client/modules/timeline/index.html +17 -17
  82. package/dist/client/modules/virtual-files/index.html +17 -17
  83. package/dist/client/settings/index.html +17 -17
  84. package/dist/module.json +1 -1
  85. package/dist/module.mjs +1 -1
  86. package/dist/runtime/plugins/view/Main.vue +39 -10
  87. package/dist/runtime/plugins/view/client.mjs +2 -1
  88. package/dist/runtime/settings.d.ts +4 -0
  89. package/dist/runtime/settings.mjs +2 -0
  90. package/dist/shared/devtools.d18bab28.mjs +84 -0
  91. package/package.json +36 -35
  92. package/dist/client/_nuxt/Badge.15b76164.js +0 -1
  93. package/dist/client/_nuxt/DataSchemaButton.vue.41ad6158.js +0 -1
  94. package/dist/client/_nuxt/DrawerRight.vue.5bde5a0b.js +0 -1
  95. package/dist/client/_nuxt/HelpFab.vue.f082102a.js +0 -1
  96. package/dist/client/_nuxt/LaunchPage.vue.f8df9e2a.js +0 -1
  97. package/dist/client/_nuxt/NCheckbox.vue.fcd1d971.js +0 -1
  98. package/dist/client/_nuxt/NLink.vue.e0a3a39a.js +0 -1
  99. package/dist/client/_nuxt/NSelect.vue.e3495019.js +0 -1
  100. package/dist/client/_nuxt/Navbar.vue.bacddf14.js +0 -1
  101. package/dist/client/_nuxt/StateEditor.vue.5fea57d7.js +0 -1
  102. package/dist/client/_nuxt/analyze-build.7513704d.js +0 -1
  103. package/dist/client/_nuxt/assets.35017b46.js +0 -16
  104. package/dist/client/_nuxt/components.fc36eeef.js +0 -98
  105. package/dist/client/_nuxt/custom-_name_.50e8c68f.js +0 -1
  106. package/dist/client/_nuxt/entry.38bf3bdf.css +0 -1
  107. package/dist/client/_nuxt/entry.54b63325.js +0 -27
  108. package/dist/client/_nuxt/hooks.d9e8fd29.js +0 -1
  109. package/dist/client/_nuxt/imports.79d88ab3.js +0 -1
  110. package/dist/client/_nuxt/index.5e3c6999.js +0 -17
  111. package/dist/client/_nuxt/index.86b1fd88.js +0 -1
  112. package/dist/client/_nuxt/json-editor-vue.ce96762e.js +0 -129
  113. package/dist/client/_nuxt/modules.caf682af.js +0 -2
  114. package/dist/client/_nuxt/open-graph.cd0bdf97.js +0 -3
  115. package/dist/client/_nuxt/overview.14a73720.js +0 -1
  116. package/dist/client/_nuxt/pages.746eb038.js +0 -1
  117. package/dist/client/_nuxt/payload.913d1fd8.js +0 -1
  118. package/dist/client/_nuxt/plugins.5342d060.js +0 -1
  119. package/dist/client/_nuxt/runtime-configs.bf4f2459.js +0 -1
  120. package/dist/client/_nuxt/server-routes.8c094c9d.js +0 -9
  121. package/dist/client/_nuxt/settings.59f50baa.js +0 -1
  122. package/dist/client/_nuxt/state-modules.8816f603.js +0 -1
  123. package/dist/client/_nuxt/storage-options.b1a5fc25.js +0 -1
  124. package/dist/client/_nuxt/storage.713a7e46.js +0 -1
  125. package/dist/client/_nuxt/timeline.9cfa88d9.js +0 -29
  126. package/dist/client/_nuxt/virtual-files.7dc060d0.js +0 -1
  127. package/dist/shared/devtools.18eefaee.mjs +0 -78
@@ -0,0 +1,84 @@
1
+ import { defineNuxtModule } from '@nuxt/kit';
2
+ import { isGlobalInstall } from '../dirs.mjs';
3
+
4
+ const r=Object.create(null),t=e=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?r:globalThis),s=new Proxy(r,{get(e,o){return t()[o]??r[o]},has(e,o){const i=t();return o in i||o in r},set(e,o,i){const p=t(!0);return p[o]=i,!0},deleteProperty(e,o){if(!o)return !1;const i=t(!0);return delete i[o],!0},ownKeys(){const e=t(!0);return Object.keys(e)}}),E=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",d=[["APPVEYOR"],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"]];function B(){if(globalThis.process?.env)for(const e of d){const o=e[1]||e[0];if(globalThis.process?.env[o])return {name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}const I=B(),U=I.name;function n(e){return e?e!=="false":!1}const l=globalThis.process?.platform||"",T=n(s.CI)||I.ci!==!1,a=n(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);n(s.DEBUG);const c=E==="test"||n(s.TEST);n(s.MINIMAL)||T||c||!a;const C=/^win/i.test(l);!n(s.NO_COLOR)&&(n(s.FORCE_COLOR)||C&&s.TERM!=="dumb"||a&&s.TERM&&s.TERM==="dumb"||T);const R=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(R?.split(".")[0])||null;const Y=globalThis.process||Object.create(null),L={versions:{}};new Proxy(Y,{get(e,o){if(o==="env")return s;if(o in e)return e[o];if(o in L)return L[o]}});const _=!!globalThis.Netlify,O=!!globalThis.EdgeRuntime,D=globalThis.navigator?.userAgent==="Cloudflare-Workers",A=!!globalThis.Deno,u=!!globalThis.__lagon__,N=globalThis.process?.release?.name==="node",S=!!globalThis.Bun||!!globalThis.process?.versions?.bun,b=!!globalThis.fastly,K=[[_,"netlify"],[O,"edge-light"],[D,"workerd"],[A,"deno"],[u,"lagon"],[N,"node"],[S,"bun"],[b,"fastly"]];function F(){const e=K.find(o=>o[0]);if(e)return {name:e[1]}}const g=F();g?.name||"";
5
+
6
+ const ROUTE_PATH = "/__nuxt_devtools__";
7
+ const ROUTE_CLIENT = `${ROUTE_PATH}/client`;
8
+ const ROUTE_AUTH = `${ROUTE_PATH}/auth`;
9
+ const ROUTE_AUTH_VERIFY = `${ROUTE_PATH}/auth-verify`;
10
+ const ROUTE_ANALYZE = `${ROUTE_PATH}/analyze`;
11
+ const WS_EVENT_NAME = "nuxt:devtools:rpc";
12
+ const isSandboxed = U === "stackblitz" || U === "codesandbox";
13
+ const defaultOptions = {
14
+ enabled: void 0,
15
+ // determine multiple conditions
16
+ componentInspector: true,
17
+ viteInspect: true,
18
+ vscode: {
19
+ enabled: true,
20
+ startOnBoot: false,
21
+ port: 3080,
22
+ reuseExistingServer: true
23
+ },
24
+ disableAuthorization: isSandboxed
25
+ };
26
+ const defaultTabOptions = {
27
+ behavior: {
28
+ telemetry: null
29
+ },
30
+ ui: {
31
+ componentsView: "list",
32
+ componentsGraphShowNodeModules: false,
33
+ componentsGraphShowGlobalComponents: true,
34
+ componentsGraphShowPages: false,
35
+ componentsGraphShowLayouts: false,
36
+ componentsGraphShowWorkspace: true,
37
+ interactionCloseOnOutsideClick: false,
38
+ showExperimentalFeatures: false,
39
+ showHelpButtons: true,
40
+ showPanel: null,
41
+ scale: 1,
42
+ minimizePanelInactive: 5e3,
43
+ hiddenTabs: [],
44
+ pinnedTabs: [],
45
+ hiddenTabCategories: [],
46
+ sidebarExpanded: false,
47
+ sidebarScrollable: false
48
+ },
49
+ serverRoutes: {
50
+ selectedRoute: null,
51
+ view: "tree",
52
+ inputDefaults: {
53
+ query: [],
54
+ body: [],
55
+ headers: []
56
+ },
57
+ sendFrom: "app"
58
+ },
59
+ assets: {
60
+ view: "grid"
61
+ }
62
+ };
63
+
64
+ const module = defineNuxtModule({
65
+ meta: {
66
+ name: "@nuxt/devtools",
67
+ configKey: "devtools"
68
+ },
69
+ defaults: defaultOptions,
70
+ setup(options, nuxt) {
71
+ if (typeof options === "boolean")
72
+ options = { enabled: options };
73
+ if (options.enabled === false)
74
+ return;
75
+ if (isGlobalInstall()) {
76
+ const globalOptions = nuxt.options.devtoolsGlobal || {};
77
+ if (options.enabled !== true && !globalOptions.projects?.includes(nuxt.options.rootDir))
78
+ return;
79
+ }
80
+ return import('../chunks/module-main.mjs').then(function (n) { return n.m; }).then(({ enableModule }) => enableModule(options, nuxt));
81
+ }
82
+ });
83
+
84
+ export { ROUTE_AUTH as R, WS_EVENT_NAME as W, ROUTE_ANALYZE as a, ROUTE_CLIENT as b, ROUTE_AUTH_VERIFY as c, defaultTabOptions as d, module as m };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/devtools",
3
3
  "type": "module",
4
- "version": "0.8.5",
4
+ "version": "1.0.0-beta.1",
5
5
  "license": "MIT",
6
6
  "repository": "nuxt/devtools",
7
7
  "exports": {
@@ -25,27 +25,29 @@
25
25
  "dist"
26
26
  ],
27
27
  "peerDependencies": {
28
- "nuxt": "^3.7.3",
28
+ "nuxt": "^3.7.4",
29
29
  "vite": "*"
30
30
  },
31
31
  "dependencies": {
32
32
  "@antfu/utils": "^0.7.6",
33
- "@nuxt/kit": "^3.7.3",
33
+ "@nuxt/kit": "^3.7.4",
34
34
  "birpc": "^0.2.14",
35
35
  "consola": "^3.2.3",
36
+ "destr": "^2.0.1",
36
37
  "error-stack-parser-es": "^0.1.1",
37
38
  "execa": "^7.2.0",
38
39
  "fast-glob": "^3.3.1",
39
40
  "flatted": "^3.2.9",
40
41
  "get-port-please": "^3.1.1",
41
42
  "global-dirs": "^3.0.1",
42
- "h3": "^1.8.1",
43
+ "h3": "^1.8.2",
43
44
  "hookable": "^5.5.3",
44
45
  "image-meta": "^0.1.1",
45
46
  "is-installed-globally": "^0.4.0",
46
- "launch-editor": "^2.6.0",
47
- "local-pkg": "^0.4.3",
47
+ "launch-editor": "^2.6.1",
48
+ "local-pkg": "^0.5.0",
48
49
  "magicast": "^0.3.0",
50
+ "nitropack": "^2.6.3",
49
51
  "nypm": "^0.3.3",
50
52
  "ofetch": "^1.3.3",
51
53
  "ohash": "^1.1.3",
@@ -54,64 +56,63 @@
54
56
  "perfect-debounce": "^1.0.0",
55
57
  "pkg-types": "^1.0.3",
56
58
  "rc9": "^2.1.1",
59
+ "scule": "^1.0.0",
57
60
  "semver": "^7.5.4",
58
- "simple-git": "^3.19.1",
61
+ "simple-git": "^3.20.0",
59
62
  "sirv": "^2.0.3",
60
- "unimport": "^3.3.0",
61
- "vite-plugin-inspect": "^0.7.38",
62
- "vite-plugin-vue-inspector": "^3.7.1",
63
- "wait-on": "^7.0.1",
63
+ "unimport": "^3.4.0",
64
+ "vite-plugin-inspect": "^0.7.40",
65
+ "vite-plugin-vue-inspector": "^4.0.0",
64
66
  "which": "^3.0.1",
65
67
  "ws": "^8.14.2",
66
- "@nuxt/devtools-wizard": "0.8.5",
67
- "@nuxt/devtools-kit": "0.8.5"
68
+ "@nuxt/devtools-kit": "1.0.0-beta.1",
69
+ "@nuxt/devtools-wizard": "1.0.0-beta.1"
68
70
  },
69
71
  "devDependencies": {
70
72
  "@iconify-json/bxl": "^1.1.7",
71
73
  "@iconify-json/carbon": "^1.1.21",
72
74
  "@iconify-json/logos": "^1.1.37",
73
75
  "@iconify-json/ri": "^1.1.12",
74
- "@iconify-json/simple-icons": "^1.1.71",
75
- "@iconify-json/tabler": "^1.1.91",
76
- "@nuxt/content": "^2.8.2",
76
+ "@iconify-json/simple-icons": "^1.1.74",
77
+ "@iconify-json/tabler": "^1.1.94",
78
+ "@nuxt/content": "^2.8.5",
77
79
  "@nuxtjs/color-mode": "^3.3.0",
78
80
  "@parcel/watcher": "^2.3.0",
79
- "@types/markdown-it-link-attributes": "^3.0.1",
81
+ "@types/markdown-it-link-attributes": "^3.0.2",
80
82
  "@types/ua-parser-js": "^0.7.37",
81
- "@unocss/nuxt": "^0.56.0",
82
- "@unocss/preset-icons": "^0.56.0",
83
- "@unocss/preset-uno": "^0.56.0",
84
- "@unocss/runtime": "^0.56.0",
85
- "@vueuse/nuxt": "^10.4.1",
83
+ "@unocss/nuxt": "^0.56.5",
84
+ "@unocss/preset-icons": "^0.56.5",
85
+ "@unocss/preset-uno": "^0.56.5",
86
+ "@unocss/runtime": "^0.56.5",
87
+ "@vueuse/nuxt": "^10.5.0",
86
88
  "esno": "^0.17.0",
87
89
  "floating-vue": "2.0.0-beta.24",
88
90
  "fuse.js": "^6.6.2",
89
- "json-editor-vue": "^0.10.16",
90
- "markdown-it": "^13.0.1",
91
+ "json-editor-vue": "^0.10.19",
92
+ "markdown-it": "^13.0.2",
91
93
  "markdown-it-link-attributes": "^4.0.1",
92
94
  "nanoid": "^5.0.1",
93
- "nuxt": "^3.7.3",
94
- "nuxt-vitest": "^0.10.5",
95
- "quicktype-core": "^23.0.75",
96
- "shikiji": "^0.6.8",
97
- "splitpanes": "^3.1.5",
95
+ "nuxt": "^3.7.4",
96
+ "nuxt-vitest": "^0.11.0",
97
+ "quicktype-core": "^23.0.76",
98
+ "shikiji": "^0.6.9",
98
99
  "theme-vitesse": "^0.7.3",
99
100
  "ua-parser-js": "^1.0.36",
100
- "unocss": "^0.56.0",
101
+ "unocss": "^0.56.5",
101
102
  "unplugin-vue-markdown": "^0.24.3",
102
- "vanilla-jsoneditor": "^0.18.4",
103
+ "vanilla-jsoneditor": "^0.18.8",
103
104
  "vis-data": "^7.1.7",
104
- "vis-network": "^9.1.6",
105
- "vue-tsc": "^1.8.11",
105
+ "vis-network": "^9.1.7",
106
+ "vue-tsc": "^1.8.18",
106
107
  "vue-virtual-scroller": "2.0.0-beta.8",
107
108
  "xterm": "^5.3.0",
108
109
  "xterm-addon-fit": "^0.8.0",
109
- "@nuxt/devtools": "0.8.5"
110
+ "@nuxt/devtools": "1.0.0-beta.1"
110
111
  },
111
112
  "scripts": {
112
113
  "build": "pnpm dev:prepare && pnpm build:module && pnpm build:client && esno scripts/prepare.ts",
113
114
  "build:client": "nuxi generate client",
114
- "build:module": "nuxt-build-module",
115
+ "build:module": "nuxt-build-module build",
115
116
  "dev": "nuxi dev client",
116
117
  "dev:playground": "pnpm build && nuxi dev playground",
117
118
  "dev:prepare": "nuxi prepare client"
@@ -1 +0,0 @@
1
- import{q as n,o,m as s,a6 as t}from"./entry.54b63325.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{d as c,u as s,aa as r,I as i,o as p,h as _,_ as u}from"./entry.54b63325.js";const h=c({__name:"DataSchemaButton",props:{getter:{type:Function}},setup(m){const t=s();return(n,e)=>{const o=u,a=r("tooltip");return i((p(),_(o,{title:"Generate Data Schema",icon:"carbon:container-services",onClick:e[0]||(e[0]=l=>t.value=n.getter())},null,512)),[[a,"Generate Data Schema"]])}}});export{h as _};
@@ -1 +0,0 @@
1
- import{d as c,r as u,bo as m,aQ as f,h as d,j as p,aP as _,o as s,m as b,i as v,k as g,a6 as h,aq as k,f as x,p as y,_ as B}from"./entry.54b63325.js";const C={relative:"","h-full":"","w-full":"","of-auto":""},V={inheritAttrs:!1},N=c({...V,__name:"DrawerRight",props:{modelValue:{type:Boolean},navbar:{},autoClose:{type:Boolean}},emits:["close"],setup(r,{emit:l}){const o=r,t=u(),{height:n}=m(()=>o.navbar,void 0,{box:"border-box"});return f(t,()=>{o.modelValue&&o.autoClose&&l("close")},{ignore:["a","button","summary",'[role="dialog"]']}),(e,a)=>{const i=B;return s(),d(_,{"enter-active-class":"duration-200 ease-in","enter-from-class":"transform translate-x-1/1","enter-to-class":"opacity-100","leave-active-class":"duration-200 ease-out","leave-from-class":"opacity-100","leave-to-class":"transform translate-x-1/1"},{default:p(()=>[e.modelValue?(s(),b("div",k({key:0,ref_key:"el",ref:t,border:"l base",flex:"~ col gap-1",absolute:"","bottom-0":"","right-0":"","z-10":"","z-20":"","of-auto":"","text-sm":"","glass-effect":"",style:{top:`${x(n)}px`}},e.$attrs),[v(i,{absolute:"","right-2":"","top-2":"","z-20":"","text-xl":"",icon:"carbon-close",onClick:a[0]||(a[0]=$=>e.$emit("close"))}),g("div",C,[h(e.$slots,"default")])],16)):y("",!0)]),_:3})}}});export{N as _};
@@ -1 +0,0 @@
1
- import{d as c,r as _,f as o,m as s,k as d,i as a,j as i,aP as u,F as m,p as n,o as l,a6 as v,ak as k,_ as g}from"./entry.54b63325.js";const h=d("div",{"i-ri:question-mark":""},null,-1),x=[h],y={key:0,border:"l base",class:"prose",pos:"fixed bottom-0 right-0 top-0","z-200":"","h-full":"","w-150":"","overflow-auto":"",px8:"",py4:"","bg-base":""},B=c({__name:"HelpFab",setup(w){const e=_(!1),{showHelpButtons:p}=k();return(b,t)=>{const f=g;return o(p)?(l(),s(m,{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))},x),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,[v(b.$slots,"default"),a(f,{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{B as _};
@@ -1 +0,0 @@
1
- import{d as k,h as o,j as a,A as b,o as t,i as r,k as i,t as c,p as l,m as g,n as h,aq as N,v as w,F as x,bw as C,a1 as y,E as B,al as $}from"./entry.54b63325.js";import{_ as V}from"./NMarkdown.vue.d2063d22.js";const v={"text-xl":""},P={flex:"~ gap2 wrap"},T=k({__name:"LaunchPage",props:{icon:{},title:{},description:{},actions:{}},emits:["action"],setup(E){return(e,F)=>{const _=C,m=V,p=y,d=B,u=$,f=b;return t(),o(f,null,{default:a(()=>[r(u,{flex:"~ col gap2",mxa:"","min-w-100":"","items-center":"",p6:""},{default:a(()=>[r(_,{mb2:"","text-5xl":"",icon:e.icon||e.icon,title:e.title},null,8,["icon","title"]),i("h1",v,c(e.title),1),e.description?(t(),o(m,{key:0,mb2:"","mt--1":"","text-center":"","text-base":"",op50:"",markdown:e.description},null,8,["markdown"])):l("",!0),i("div",P,[(t(!0),g(x,null,h(e.actions,(n,s)=>(t(),o(d,N({key:s,n:"solid primary",disabled:n.pending,to:n.src,target:n.src?"_blank":void 0},n.attrs,{onClick:()=>{n.handle?.(),e.$emit("action",s)}}),{default:a(()=>[n.pending?(t(),o(p,{key:0,icon:"carbon-circle-dash","animate-spin":""})):l("",!0),w(" "+c(n.label),1)]),_:2},1040,["disabled","to","target","onClick"]))),128))])]),_:1})]),_:1})}}});export{T as _};
@@ -1 +0,0 @@
1
- import{d as i,a5 as r,o as p,m as b,I as u,bD as h,f as a,k as n,l as k,ab as f,i as m,a6 as v,G as _,a1 as x}from"./entry.54b63325.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(),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 n,o as a,h as o,j as s,a6 as r,aq as t,as as p,f as i,x as l}from"./entry.54b63325.js";const c=n({__name:"NLink",props:{to:{},href:{},target:{}},setup(_){return(e,f)=>(a(),o(p(e.href||e.target?"a":i(l)),t(e.$props,{class:"n-link n-transition hover:n-link-hover n-link-base"}),{default:s(()=>[r(e.$slots,"default")]),_:3},16))}});export{c as _};
@@ -1 +0,0 @@
1
- import{d as u,a5 as p,o as s,m as l,a6 as t,h as f,p as n,I as m,bE as b,f as h,k as _,t as v,l as k,a1 as V}from"./entry.54b63325.js";const y={class:"n-select 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(),l("div",y,[t(e.$slots,"icon",{},()=>[e.icon?(s(),f(r,{key:0,icon:e.icon,class:"mr-0.4em text-1.1em op50"},null,8,["icon"])):n("",!0)]),m(_("select",{"onUpdate:modelValue":a[0]||(a[0]=c=>k(o)?o.value=c:null),disabled:e.disabled,class:"w-full flex-auto n-bg-base !outline-none"},[e.placeholder?(s(),l("option",w,v(e.placeholder),1)):n("",!0),t(e.$slots,"default")],8,B),[[b,h(o)]])])}}});export{g as _};
@@ -1 +0,0 @@
1
- import{d as r,m as c,k as d,a6 as s,G as n,o as i,i as p,V as u}from"./entry.54b63325.js";const f={flex:"~ gap4","items-center":""},g=r({__name:"Navbar",props:{search:{type:String,default:void 0},noPadding:{type:Boolean,default:!1}},emits:["update:search"],setup(a,{emit:t}){function o(e){t("update:search",e.target.value)}return(e,m)=>{const l=u;return i(),c("div",{flex:"~ col gap2",border:"b base","flex-1":"","navbar-glass":"",class:n([{p4:!a.noPadding}])},[d("div",f,[s(e.$slots,"search",{},()=>[p(l,{placeholder:"Search...",icon:"carbon-search",n:"primary","flex-auto":"",class:n({"px-5 py-2":!a.noPadding}),value:a.search,onInput:o},null,8,["class","value"])]),s(e.$slots,"actions")]),s(e.$slots,"default")],2)}}});export{g as _};
@@ -1 +0,0 @@
1
- import{d as V,a5 as B,ag as _,r as w,b6 as O,ba as C,aa as $,o as i,m as p,k as u,G as c,f as a,t as J,p as l,a6 as R,aR as D,aS as P,F as j,I as z,i as F,h as v,aq as G,bb as M,l as U,av as A,_ as E}from"./entry.54b63325.js";import{_ as I}from"./DataSchemaButton.vue.41ad6158.js";import{U as q}from"./json-editor-vue.ce96762e.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 S(){m.pause(),o.value=JSON.parse(JSON.stringify(s.state)),await A(),m.resume()}return(e,r)=>{const t=E,h=I,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),R(e.$slots,"actions",D(P({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",onClick:S},null,512),[[N,"Refresh View",void 0,{bottom:!0}]]),a(o)?(i(),v(h,{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(q),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 +0,0 @@
1
- import{d as j,a as V,r as F,o,m as i,k as e,F as c,n as E,G as S,f as n,t as m,p as b,H as G,i as r,j as a,v as _,I as A,J as D,K as P,L,E as U,M as X,N as ee,O as te,P as ne,Q as oe,R as le,S as ie,U as k,h as w,l as R,V as se,W as ae,A as re}from"./entry.54b63325.js";import{_ as ue}from"./FilepathItem.vue.7bd675c6.js";import{_ as de}from"./NTip.vue.d193bf96.js";import{_ as ce}from"./NCodeBlock.vue.84865d5b.js";import{_ as me}from"./NCheckbox.vue.fcd1d971.js";import{_ as _e}from"./HelpFab.vue.f082102a.js";import"./client.d926285a.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:""},be=e("div",{"flex-auto":""},null,-1),$e={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},xe=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),I="/__nuxt_devtools__/analyze/",Fe=j({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(C){const p=C,f=V(()=>{const t=[{name:"Overview",id:"overview"}];return p.current.features.bundleClient&&t.push({name:"Client Bundle",id:"bundle-client"}),p.current.features.bundleNitro&&t.push({name:"Nitro Bundle",id:"bundle-nitro"}),p.current.features.viteInspect&&t.push({name:"Vite Inspect",id:"vite-inspect"}),t}),l=F(f.value[0]);function $(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 P.clearAnalyzeBuilds(await L(),[t])}return(t,u)=>{const z=ue,N=U;return o(),i("div",pe,[e("div",fe,[(o(!0),i(c,null,E(n(f),(v,T)=>(o(),i("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:S(v.id===n(l).id?"":"border-b"),onClick:d=>l.value=v},[e("div",{class:S(v.id===n(l).id?"":"op30")},m(v.name),3)],10,ve))),128)),he]),n(l).id==="overview"?(o(),i("div",ye,[be,e("div",$e,[xe,e("div",null,[ge,e("div",null,m(t.current.name),1)]),we,e("div",null,[ze,e("div",null,m(g(t.current)),1)]),t.current.size?.clientBundle?(o(),i(c,{key:0},[Be,e("div",null,[ke,e("div",null,m($(t.current.size.clientBundle)),1)])],64)):b("",!0),t.current.size.nitroBundle?(o(),i(c,{key:1},[Ce,e("div",null,[Ne,e("div",null,m($(t.current.size.nitroBundle)),1)])],64)):b("",!0),Te,e("div",null,[Ae,e("div",null,m(n(G)(new Date(t.current.endTime))),1)]),De,e("div",null,[Ie,r(z,{filepath:t.current.analyzeDir},null,8,["filepath"])])]),Ve,r(N,{n:"rose",icon:"carbon-delete",onClick:u[0]||(u[0]=v=>x(t.current.name))},{default:a(()=>[_(" Delete this report ")]),_:1})])):b("",!0),u._lazyshow1||n(l).id==="bundle-client"?(u._lazyshow1=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="bundle-client"]])],64)):b("v-show-if",!0),u._lazyshow2||n(l).id==="bundle-nitro"?(u._lazyshow2=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="bundle-nitro"]])],64)):b("v-show-if",!0),u._lazyshow3||n(l).id==="vite-inspect"?(u._lazyshow3=!0,o(),i(c,null,[A(e("iframe",{src:`${I}${t.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[D,n(l).id==="vite-inspect"]])],64)):b("v-show-if",!0)])}}}),Se={class:"markdown-body"},Pe=e("h1",null,"Build Analyze",-1),Re=e("p",null,[_("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"),_(" and present the output data directly in DevTools for easy browsing and comparing.")],-1),je=[Pe,Re],Ee={__name:"analyze-build",setup(C,{expose:p}){return p({frontmatter:{}}),(l,$)=>(o(),i("div",Se,je))}},Ge={flex:"~ col"},Le=["onClick"],Ue={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},Oe=e("div",{"i-carbon-time":""},null,-1),He=e("div",{"flex-auto":""},null,-1),Ke=e("div",{"x-divider":""},null,-1),Me={flex:"~ items-center justify-center wrap",p4:""},We={flex:"~ col gap-1","w-250":"",p4:""},Je=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1),Qe=e("p",{op50:""}," Enter the name of the build: ",-1),Ye=e("div",{my3:"","x-divider":""},null,-1),Ze=e("p",{op50:""}," The following command will be executed in your terminal: ",-1),qe={flex:"~ gap-3",mt2:"","justify-end":""},st=j({__name:"analyze-build",setup(C){const p=X(),f=ee(),l=te(),$=ne("analyze-build:slug",""),g=V(()=>f.value?.builds.find(d=>d.slug===$.value)??f.value?.builds[0]),x=F(!1),t=F(""),u=V(()=>f.value?.builds.some(d=>d.name===t.value.trim()));async function z(){t.value=await P.generateAnalyzeBuildName(),await p.start()&&(k.value={name:t.value,processId:await P.startAnalyzeBuild(await L(),t.value)},x.value&&v())}const N=oe();function v(){k.value?.processId&&(N.value=k.value.processId,l.push("/modules/terminals"))}function T(d){return`${((d.endTime-d.startTime)/1e3).toFixed(1)}s`}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:z}]),(d,h)=>{const B=U,O=Fe,H=re,K=ie,M=se,W=de,J=ce,Q=me,Y=ae,Z=Ee,q=_e;return o(),i(c,null,[r(K,{"left-size":30},{left:a(()=>[e("div",Ge,[(o(!0),i(c,null,E(n(f)?.builds,s=>(o(),i(c,{key:s.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:S(s.slug===n(g)?.slug?"text-primary bg-active":""),onClick:y=>$.value=s.slug},[e("code",null,m(s.name),1),e("div",Ue,[Oe,e("span",null,m(T(s)),1),He,e("span",null,m(n(G)(new Date(s.endTime))),1)])],10,Le),Ke],64))),128)),e("div",Me,[("processAnalyzeBuildInfo"in d?d.processAnalyzeBuildInfo:n(k))?(o(),w(B,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:h[1]||(h[1]=s=>v())},{default:a(()=>[_(" Building... ")]),_:1})):(o(),w(B,{key:0,n:"primary",icon:"carbon-edge-node",onClick:h[0]||(h[0]=s=>z())},{default:a(()=>[_(" Start a new build ")]),_:1}))])])]),right:a(()=>[n(g)?(o(),w(O,{key:0,current:n(g)},null,8,["current"])):(o(),w(H,{key:1}))]),_:1}),r(n(p),null,{default:a(({resolve:s})=>[r(Y,{"model-value":!0,onClose:y=>s(!1)},{default:a(()=>[e("div",We,[Je,Qe,r(M,{modelValue:n(t),"onUpdate:modelValue":h[2]||(h[2]=y=>R(t)?t.value=y:null),placeholder:"Build name"},null,8,["modelValue"]),n(u)?(o(),w(W,{key:0,"n-orange":""},{default:a(()=>[_(" A build with the same name already exists, continue would overrides the previous build result. ")]),_:1})):b("",!0),Ye,Ze,r(J,{code:`npx nuxi analyze --no-serve --name=${n(t)}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),r(Q,{modelValue:n(x),"onUpdate:modelValue":h[3]||(h[3]=y=>R(x)?x.value=y:null),mt2:"",n:"primary"},{default:a(()=>[_(" Navigate to terminal ")]),_:1},8,["modelValue"]),e("div",qe,[r(B,{onClick:y=>s(!1)},{default:a(()=>[_(" Cancel ")]),_:2},1032,["onClick"]),r(B,{n:"solid primary",onClick:y=>s(!0)},{default:a(()=>[_(" Start ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),r(q,null,{default:a(()=>[r(Z)]),_:1})],64)}}});export{st as default};
@@ -1,16 +0,0 @@
1
- import{d as X,r as I,X as q,o as s,m as c,i as d,f as t,k as e,v as k,F as B,n as Z,h as N,j as x,p as S,G as Y,Y as U,Z as me,a0 as fe,K as G,L as H,_ as te,a1 as oe,V as se,E as ae,a as A,a2 as ve,a3 as he,a4 as le,t as V,a5 as ie,a6 as _e,l as R,a7 as ge,b as ne,a8 as xe,e as be,a9 as we,aa as re,I as W,ab as ye,ac as $e,W as ke,ad as Ce,ae as Pe,af as Ae}from"./entry.54b63325.js";import{_ as De}from"./Navbar.vue.bacddf14.js";import{_ as Ve}from"./NSectionBlock.42a3cefc.js";import{_ as Ie}from"./FilepathItem.vue.7bd675c6.js";import{_ as Ne,u as Fe}from"./storage-options.b1a5fc25.js";import{_ as Se}from"./DrawerRight.vue.5bde5a0b.js";import{D as Te}from"./constants.4e5eba24.js";import"./NIconTitle.vue.b6d28480.js";import"./NCodeBlock.vue.84865d5b.js";import"./client.d926285a.js";const je={key:0,"h-full":"","w-full":"",flex:"","items-center":"","justify-center":""},Ee={for:"drop-zone-input","text-3xl":""},Ue={key:1,relative:"","h-full":"","w-full":"",grid:"~ rows-[max-content_1fr_max-content]"},Le=e("div",{px6:"",py6:""},[e("h1",{"text-2xl":""}," Upload "),e("p",{"text-sm":"",op50:""}," Drag and drop files to upload ")],-1),Be={grid:"~ cols-minmax-8rem","overflow-auto":"",p6:""},ze={flex:"","items-center":"","justify-center":"","of-hidden":"",rounded:"","rounded-t-lg":"","bg-active":"","object-cover":"",class:"aspect-1/1",border:"~ base"},Me=["src"],Oe={flex:"~ gap1","items-center":""},Re={flex:"~ gap-2","items-center":"","justify-center":"",p8:""},Ke=X({__name:"DropZone",props:{folder:{type:String,required:!0}},setup(T){const a=T,p=I(!1),n=I(),m=I([]),v=["image","video"];function D(i){n.value=i.target,p.value=!0}function u(i){i.target===n.value&&(p.value=!1)}function C(i){i.preventDefault()}function K(i){i.preventDefault(),L(i.dataTransfer.files)}function L(i){const g=Array.from(i||[]);if(g.length){const _=[],P=m.value.map(f=>f.name);for(const f of g)if(P.includes(f.name)){let r=1;const[y,l]=f.name.split(".");for(;P.includes(`${y} (${r}).${l}`);)r++;const o=`${y}-${r}.${l}`,M=new Blob([f],{type:f.type}),O=new File([M],o,{lastModified:Date.now()});_.push(O),P.push(o)}else f.type===""?U({message:"Folders are not supported yet",icon:"carbon:face-dissatisfied",classes:"text-orange"}):v.some(r=>f.type.includes(r))?_.push(f):U({message:`"${f.type}" file type is not allowed`,icon:"carbon:face-dissatisfied",classes:"text-orange"});m.value=[...m.value,..._]}}async function b(){if(me.value||fe.value)return;const i=[];for(const g of m.value){const _=new FileReader;_.readAsDataURL(g);const f=(await new Promise(r=>{_.onload=()=>r(_.result)})).split(";base64,").pop();i.push({path:g.name,encoding:"base64",content:f})}await G.writeStaticAssets(await H(),[...i],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 h(i){m.value?.splice(i,1)}function w(i){return URL.createObjectURL(i)}function z(i,g){const[_,P]=i.name.split("."),f=g.replace(/\.\w+$/,""),r=`${f}.${P}`;return f.length===0?(alert("File name must be at least 1 characters long"),_):(Object.defineProperty(i,"name",{value:r,writable:!1}),m.value.splice(m.value.indexOf(i),1,i),i)}function F(){m.value=[]}function j(){p.value=!1,F()}return q("dragenter",D),q("dragleave",u),q("dragover",C),q("drop",K),(i,g)=>{const _=te,P=oe,f=se,r=ae;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(_,{icon:"carbon-close",absolute:"","right-5":"","top-5":"","z-20":"","text-xl":"",onClick:j}),t(m)?.length?(s(),c("div",Ue,[Le,e("div",Be,[(s(!0),c(B,null,Z(t(m),(y,l)=>(s(),c("div",{key:y.name,flex:"~ col gap-2",relative:"","h-50":"","w-40":"","items-center":""},[e("div",ze,[e("img",{"h-full":"","w-full":"","rounded-t-lg":"","object-cover":"",src:w(y)},null,8,Me)]),e("div",Oe,[d(f,{n:"xs","flex-auto":"","model-value":y.name,"onUpdate:modelValue":o=>z(y,o.target.value)},null,8,["model-value","onUpdate:modelValue"]),d(_,{icon:"carbon-delete","flex-none":"",title:"Remove file",onClick:o=>h(l)},null,8,["onClick"])])]))),128))]),e("div",Re,[t(m).length?(s(),N(r,{key:0,n:"red",onClick:F},{default:x(()=>[d(P,{icon:"carbon-clean"}),k(" Clear ")]),_:1})):S("",!0),d(r,{disabled:!t(m).length,n:"primary solid",onClick:b},{default:x(()=>[d(P,{icon:"carbon-cloud-upload"}),k(" Upload ")]),_:1},8,["disabled"])])])):(s(),c("div",je,[e("label",Ee,[d(P,{icon:"carbon-cloud-upload","mr-2":""}),k(" Drop files here or click to select ")]),e("input",{id:"drop-zone-input",type:"file",multiple:"",hidden:"",onChange:g[0]||(g[0]=y=>L(y.target.files))},null,32)]))],2)}}}),Xe=X({__name:"AssetFontPreview",props:{asset:{}},setup(T){const a=T,p=A(()=>`devtools-assets-${ve(a.asset)}`);return he(A(()=>`
2
- @font-face {
3
- font-family: '${p.value}';
4
- src: url('${a.asset.publicPath}');
5
- }
6
- `)),(n,m)=>(s(),c("div",{"of-hidden":"",style:le({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))}}),Ge={flex:"","items-center":"","justify-center":"","of-hidden":"","bg-active":"","object-cover":"",p1:""},Ze=["src"],We={key:2,"i-carbon-document":"","text-3xl":"",op20:""},qe={key:3,"w-full":"","self-start":"",p4:""},Ye=["textContent"],He={key:4},Je=["src","autoplay","controls"],Qe={key:5},et={key:0,"i-carbon-volume-up":"","text-3xl":"",op20:""},tt=["src"],nt={key:6,"i-carbon-help":"","text-3xl":"",op20:""},ce=X({__name:"AssetPreview",props:{asset:{},textContent:{},detail:{type:Boolean}},setup(T){return(a,p)=>{const n=Xe;return s(),c("div",Ge,[a.asset.type==="image"?(s(),c("img",{key:0,src:a.asset.publicPath},null,8,Ze)):a.asset.type==="font"?(s(),N(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",We)):a.asset.type==="text"&&a.textContent?(s(),c("div",qe,[e("pre",{"max-h-10rem":"","of-hidden":"","text-xs":"","font-mono":"",textContent:V(a.textContent)},null,8,Ye)])):a.asset.type==="video"?(s(),c("div",He,[e("video",{src:a.asset.publicPath,autoplay:a.detail,controls:a.detail},null,8,Je)])):a.asset.type==="audio"?(s(),c("div",Qe,[a.detail?(s(),c("audio",{key:1,src:a.asset.publicPath,controls:""},null,8,tt)):(s(),c("div",et))])):(s(),c("div",nt))])}}}),ot={flex:"~ col gap-1",hover:"bg-active","items-center":"","of-hidden":"",rounded:"",p2:""},st={"w-full":"","of-hidden":"",truncate:"","ws-nowrap":"","text-center":"","text-xs":""},at=X({__name:"AssetGridItem",props:{asset:{},folder:{}},setup(T){const a=T,p=A(()=>a.folder&&a.asset.path.startsWith(a.folder)?a.asset.path.slice(a.folder.length):a.asset.path);return(n,m)=>{const v=ce;return s(),c("button",ot,[d(v,{"h-30":"","w-30":"",rounded:"",border:"~ base",asset:n.asset},null,8,["asset"]),e("div",st,V(t(p)),1)])}}}),ue=X({__name:"AssetListItem",props:{item:{},index:{default:0},modelValue:{}},setup(T,{emit:a}){const p=T,n=ie(p,"modelValue",a,{passive:!0}),m=A(()=>p.item?.children?.length),v=I(!0),D=A(()=>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,C)=>{const K=oe,L=ue;return s(),c("div",null,[e("button",{flex:"~ gap-2","w-full":"","items-center":"",hover:"bg-active",px4:"",py1:"",style:le({paddingLeft:`calc(1rem + ${u.index*1.5}em)`}),class:Y({"bg-active":!t(m)&&t(n)?.filePath===u.item?.filePath}),border:"b base",onClick:C[0]||(C[0]=b=>t(m)?v.value=!t(v):n.value=u.item)},[e("div",{class:Y(t(D))},null,2),e("span",{class:Y({"flex items-center":t(m)}),"flex-auto":"","text-start":"","text-sm":"","font-mono":""},V(u.item.path),3),t(m)?(s(),N(K,{key:0,icon:"carbon:chevron-right","transform-rotate":t(v)?90:0,transition:""},null,8,["transform-rotate"])):S("",!0)],6),t(v)?_e(u.$slots,"default",{key:0},()=>[(s(!0),c(B,null,Z(u.item?.children,b=>(s(),N(L,{key:b.filepath,modelValue:t(n),"onUpdate:modelValue":C[1]||(C[1]=h=>R(n)?n.value=h:null),item:b,index:u.index+1},null,8,["modelValue","item","index"]))),128))]):S("",!0)])}}}),lt={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p4:""},it=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Preview "),e("div",{"x-divider":""})],-1),rt={flex:"~","items-center":"","justify-center":""},ct=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Details "),e("div",{"x-divider":""})],-1),ut={"max-w-full":"","w-full":"","table-fixed":""},dt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Filepath ",-1),pt={flex:"~ gap-1","w-full":"","items-center":""},mt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Public Path ",-1),ft={flex:"~ gap-1","w-full":"","items-center":"","of-hidden":""},vt={"flex-auto":"","of-hidden":"",truncate:"","ws-pre":"","font-mono":""},ht=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Type ",-1),_t={capitalize:""},gt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Image Size ",-1),xt={key:0},bt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Aspect Ratio ",-1),wt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," File size ",-1),yt=e("td",{"w-30":"","ws-nowrap":"",pr5:"","text-right":"",op50:""}," Last modified ",-1),$t={op70:""},kt=e("div",{flex:"~ gap2","mb--2":"","items-center":"",op50:""},[e("div",{"x-divider":""}),e("div",{"flex-none":""}," Actions "),e("div",{"x-divider":""})],-1),Ct={flex:"~ gap2 wrap"},Pt=e("div",{"flex-auto":""},null,-1),At={flex:"~ col gap-4","min-h-full":"","w-full":"","of-hidden":"",p8:""},Dt=e("span",null," Are you sure you want to delete this asset? ",-1),Vt={flex:"~ gap2 wrap justify-center"},It={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"],Tt={flex:"","justify-end":"","gap-4":""},jt=X({__name:"AssetDetails",props:{modelValue:{}},setup(T,{emit:a}){const n=ie(T,"modelValue",a,{passive:!0}),m=ge(),v=ne(()=>{if(n.value.type==="image")return G.getImageMeta(n.value.filePath)}),D=I(!1),u=I(),C=I(0),K=ne(async()=>{if(n.value.type!=="text")return;C.value;const l=await G.getTextAssetContent(n.value.filePath);return u.value=l,l});async function L(){if(K.value!==u.value)try{await G.writeStaticAssets(await H(),[{path:n.value.path,content:u.value,override:!0}],""),D.value=!1,C.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 b=xe(),h=A(()=>(b.value?._installedModules||[]).some(o=>o.meta?.name==="@nuxt/image"||o.meta?.name==="@nuxt/image-edge")),w=A(()=>{const l=[];if(n.value.type==="image"){const o=v.value?.width?`
7
- width="${v.value.width}"
8
- height="${v.value.height}" `:" ";return l.push({lang:"vue-html",code:`<img${o}
9
- src="${n.value.publicPath}"
10
- />`,name:"Plain Image"}),h.value&&l.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"}),l}return l.push({lang:"html",code:`<a download href="${n.value.publicPath}">
15
- Download ${n.value.path.split("/").slice(-1)[0]}
16
- </a>`,name:"Download link"}),l}),z=be(),F=we(()=>n.value.mtime),j=A(()=>{const l=n.value.size;return l<1024?`${l} B`:l<1024*1024?`${(l/1024).toFixed(2)} KB`:`${(l/1024/1024).toFixed(2)} MB`}),i=A(()=>{if(!v.value?.width||!v.value?.height)return"";const l=(M,O)=>O?l(O,M%O):M,o=l(v.value.width,v.value.height);return o>3?`${v.value.width/o}:${v.value.height/o}`:""}),g=A(()=>["image","text","video","audio","font"].includes(n.value.type)),_=I(!1);async function P(){try{await G.deleteStaticAsset(await H(),n.value.filePath),n.value=void 0,_.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=I(!1),r=I("");async function y(){const l=n.value.filePath.split("/"),o=l.slice(-1)[0].split(".").slice(0,-1).join(".");if(!r.value||r.value===o)return U({message:"Please enter a new name",icon:"i-carbon-warning",classes:"text-orange"});try{const M=l.slice(-1)[0].split(".").slice(-1)[0],O=`${l.slice(0,-1).join("/")}/${r.value}.${M}`;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(l,o)=>{const M=ce,O=Ie,J=te,E=ae,de=Ne,Q=ke,pe=se,ee=re("tooltip");return s(),c(B,null,[e("div",lt,[t(g)?(s(),c(B,{key:0},[it,e("div",rt,[d(M,{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)):S("",!0),ct,e("table",ut,[e("tbody",null,[e("tr",null,[dt,e("td",null,[e("div",pt,[d(O,{filepath:t(n).filePath,"text-left":""},null,8,["filepath"]),W(d(J,{"flex-none":"",title:"Open in Editor",icon:"carbon-launch",onClick:o[0]||(o[0]=$=>t(m)(t(n).filePath))},null,512),[[ee,"Open in Editor"]])])])]),e("tr",null,[mt,e("td",null,[e("div",ft,[e("div",vt,V(t(n).publicPath),1),W(d(J,{"flex-none":"",title:"Copy public path",icon:"carbon-copy",onClick:o[1]||(o[1]=$=>t(z)(t(n).publicPath))},null,512),[[ee,"Copy public path"]]),W(d(J,{"flex-none":"",to:t(n).publicPath,icon:"carbon-launch",target:"_blank",title:"Open in browser"},null,8,["to"]),[[ee,"Open in browser"]])])])]),e("tr",null,[ht,e("td",_t,V(t(n).type),1)]),t(v)?.width?(s(),c(B,{key:0},[e("tr",null,[gt,e("td",null,V(t(v).width)+" x "+V(t(v).height),1)]),t(i)?(s(),c("tr",xt,[bt,e("td",null,V(t(i)),1)])):S("",!0)],64)):S("",!0),e("tr",null,[wt,e("td",null,V(t(j)),1)]),e("tr",null,[yt,e("td",null,[k(V(new Date(t(n).mtime).toLocaleString())+" ",1),e("span",$t,"("+V(t(F))+")",1)])])])]),kt,e("div",Ct,[d(E,{to:t(n).publicPath,download:"",target:"_blank",icon:"carbon-download",n:"green"},{default:x(()=>[k(" Download ")]),_:1},8,["to"]),t(n).type==="text"?(s(),N(E,{key:0,icon:"carbon-edit",n:"cyan",onClick:o[2]||(o[2]=$=>D.value=!t(D))},{default:x(()=>[k(" Edit ")]),_:1})):S("",!0),d(E,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:o[3]||(o[3]=$=>f.value=!t(f))},{default:x(()=>[k(" Rename ")]),_:1}),d(E,{icon:"carbon-delete",n:"red",onClick:o[4]||(o[4]=$=>_.value=!t(_))},{default:x(()=>[k(" Delete ")]),_:1}),t(n).type==="image"?(s(),N(E,{key:1,disabled:"",icon:"carbon-image-service"},{default:x(()=>[k(" Optimize image (Coming soon) ")]),_:1})):S("",!0)]),Pt,t(w).length?(s(),N(de,{key:1,border:"t base","mx--4":"","mb--4":"","code-snippets":t(w)},null,8,["code-snippets"])):S("",!0)]),d(Q,{modelValue:t(_),"onUpdate:modelValue":o[6]||(o[6]=$=>R(_)?_.value=$:null)},{default:x(()=>[e("div",At,[Dt,e("div",Vt,[d(E,{icon:"carbon-close",onClick:o[5]||(o[5]=$=>_.value=!1)},{default:x(()=>[k(" Cancel ")]),_:1}),d(E,{icon:"carbon-delete",n:"red",onClick:P},{default:x(()=>[k(" Delete ")]),_:1})])])]),_:1},8,["modelValue"]),d(Q,{modelValue:t(f),"onUpdate:modelValue":o[9]||(o[9]=$=>R(f)?f.value=$:null)},{default:x(()=>[e("div",It,[d(pe,{modelValue:t(r),"onUpdate:modelValue":o[7]||(o[7]=$=>R(r)?r.value=$:null),placeholder:"New name",n:"blue"},null,8,["modelValue"]),e("div",Nt,[d(E,{icon:"carbon-close",onClick:o[8]||(o[8]=$=>f.value=!1)},{default:x(()=>[k(" Cancel ")]),_:1}),d(E,{icon:"carbon-text-annotation-toggle",n:"blue",onClick:y},{default:x(()=>[k(" Rename ")]),_:1})])])]),_:1},8,["modelValue"]),t(n).type==="text"?(s(),N(Q,{key:0,modelValue:t(D),"onUpdate:modelValue":o[12]||(o[12]=$=>R(D)?D.value=$:null)},{default:x(()=>[e("div",Ft,[W(e("textarea",{"onUpdate:modelValue":o[10]||(o[10]=$=>R(u)?u.value=$:null),placeholder:"Item value...",class:"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none",onKeydown:ye(L,["enter"])},null,40,St),[[$e,t(u)]]),e("div",Tt,[d(E,{icon:"carbon-close",onClick:o[11]||(o[11]=$=>D.value=!1)},{default:x(()=>[k(" Cancel ")]),_:1}),d(E,{icon:"carbon:save",n:"primary",onClick:L},{default:x(()=>[k(" save ")]),_:1})])])]),_:1},8,["modelValue"])):S("",!0)],64)}}}),Et={"h-full":"","of-auto":""},Ut={"flex-none":"",flex:"~ gap2 items-center"},Lt={op50:""},Bt={key:0},zt={"mt--4":"",px2:"",grid:"~ cols-minmax-8rem"},Mt={key:1,p2:"",grid:"~ cols-minmax-8rem"},Ot={key:1},Qt=X({__name:"assets",setup(T){const a=Ce(),p=I(""),n=A(()=>new Pe(a.value||[],{keys:["path"]})),m=A(()=>p.value?n.value.search(p.value).map(h=>h.item):a.value||[]),v=A(()=>{const b={};for(const h of m.value){const w=`${h.path.split("/").slice(0,-1).join("/")}/`;b[w]||(b[w]=[]),b[w].push(h)}return Object.entries(b).sort(([h],[w])=>h.localeCompare(w))}),D=A(()=>{const b={path:"public",children:[]},h=(w,z,F)=>{const[j,...i]=z;let g=w.children.find(_=>_.path===j);g||(g={...F,path:j,children:[]},w.children.push(g)),i.length>1?h(g,i,F):i.length===1&&g.children.push({...F,path:i[0]})};return m.value.forEach(w=>{const z=w.path.split("/").filter(F=>F!=="");h(b,z,w)}),b.children}),u=I(),{view:C}=Fe("assets");function K(){C.value=C.value==="list"?"grid":"list"}Ae("Escape",()=>{u.value=void 0});const L=I();return(b,h)=>{const w=te,z=De,F=Ke,j=at,i=Ve,g=ue,_=jt,P=Se,f=re("tooltip");return s(),c("div",Et,[d(z,{ref_key:"navbar",ref:L,search:t(p),"onUpdate:search":h[0]||(h[0]=r=>R(p)?p.value=r:null),pb2:""},{actions:x(()=>[e("div",Ut,[W(d(w,{"text-lg":"",icon:t(C)==="grid"?"i-carbon-list":"i-carbon-grid",title:"Toggle view",onClick:K},null,8,["icon"]),[[f,"Toggle View",void 0,{"bottom-end":!0}]])])]),default:x(()=>[e("div",Lt,[t(p)?(s(),c("span",Bt,V(t(m).length)+" matched · ",1)):S("",!0),e("span",null,V(t(a)?.length)+" assets in total",1)])]),_:1},8,["search"]),d(F,{folder:"/"}),t(C)==="grid"?(s(),c(B,{key:0},[t(v).length>1?(s(!0),c(B,{key:0},Z(t(v),([r,y])=>(s(),N(i,{key:r,text:r,description:`${y.length} items`,open:y.length<=("DETAILS_MAX_ITEMS"in b?b.DETAILS_MAX_ITEMS:t(Te)),padding:!1},{default:x(()=>[e("div",zt,[(s(!0),c(B,null,Z(y,l=>(s(),N(j,{key:l.path,asset:l,folder:r,onClick:o=>u.value=l},null,8,["asset","folder","onClick"]))),128))])]),_:2},1032,["text","description","open"]))),128)):(s(),c("div",Mt,[(s(!0),c(B,null,Z(t(m),r=>(s(),N(j,{key:r.path,asset:r,onClick:y=>u.value=r},null,8,["asset","onClick"]))),128))]))],64)):(s(),c("div",Ot,[(s(!0),c(B,null,Z(t(D),(r,y)=>(s(),N(g,{key:y,modelValue:t(u),"onUpdate:modelValue":h[1]||(h[1]=l=>R(u)?u.value=l:null),item:r},null,8,["modelValue","item"]))),128))])),d(P,{"model-value":!!t(u),"auto-close":"","w-120":"",navbar:t(L),onClose:h[3]||(h[3]=r=>u.value=void 0)},{default:x(()=>[t(u)?(s(),N(_,{key:0,modelValue:t(u),"onUpdate:modelValue":h[2]||(h[2]=r=>R(u)?u.value=r:null)},null,8,["modelValue"])):S("",!0)]),_:1},8,["model-value","navbar"])])}}});export{Qt as default};