@nuxt/devtools 4.0.0-alpha.17 → 4.0.0-alpha.18
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/dist/_nuxt/{CodeDiff-DgjeLx6z.js.map.json → CodeDiff-C5IA82Lq.js.map.json} +1 -1
- package/dist/_nuxt/{CodeSnippets-CgfcaS4Z.js.map.json → CodeSnippets-iUZQ267m.js.map.json} +1 -1
- package/dist/_nuxt/{ComposableItem-BWQR7_fI.js.map.json → ComposableItem-K51Uhl0G.js.map.json} +1 -1
- package/dist/_nuxt/{DataSchemaButton-CqEfc2TV.js.map.json → DataSchemaButton-DdHHdnES.js.map.json} +1 -1
- package/dist/_nuxt/{DataSchemaDrawer-Xj8YzNJN.js.map.json → DataSchemaDrawer-2qqeTeF6.js.map.json} +1 -1
- package/dist/_nuxt/{FilepathItem-D75bkTSa.js.map.json → FilepathItem-D6jrZnIo.js.map.json} +1 -1
- package/dist/_nuxt/{HelpFab-CH7NlsDf.js.map.json → HelpFab-xcWoP6o_.js.map.json} +1 -1
- package/dist/_nuxt/{LaunchPage-ByG-3KVi.js.map.json → LaunchPage-DVRrHA9i.js.map.json} +1 -1
- package/dist/_nuxt/{NCheckbox-OMIu_LTG.js.map.json → NCheckbox-Cq1GuyrF.js.map.json} +1 -1
- package/dist/_nuxt/{NDrawer-C6Opm19C.js.map.json → NDrawer-C_ZAB3z9.js.map.json} +1 -1
- package/dist/_nuxt/{NDropdown-DseEG3tA.js.map.json → NDropdown-CzJi2B9y.js.map.json} +1 -1
- package/dist/_nuxt/NIcon-B-t2-q1r.js.map.json +1 -0
- package/dist/_nuxt/{NLink-Rsxlt1NN.js.map.json → NLink-DIWpT2C-.js.map.json} +1 -1
- package/dist/_nuxt/{NNavbar-CS-Z1Cle.js.map.json → NNavbar-BShfBHAc.js.map.json} +1 -1
- package/dist/_nuxt/{NSectionBlock-C7kcMkbf.js.map.json → NSectionBlock-Cm4pPEIM.js.map.json} +1 -1
- package/dist/_nuxt/{NSelect-geGP1eOG.js.map.json → NSelect-9Nk3v_sQ.js.map.json} +1 -1
- package/dist/_nuxt/{NSelectTabs-nUMnNQy-.js.map.json → NSelectTabs-D8amX2yN.js.map.json} +1 -1
- package/dist/_nuxt/{NSplitPane-Bh0o_t5e.js.map.json → NSplitPane-CWyIovAp.js.map.json} +1 -1
- package/dist/_nuxt/{NTip-DRnTpLjG.js.map.json → NTip-BVi1j0Ir.js.map.json} +1 -1
- package/dist/_nuxt/{ServerRouteInputs-BhIrPxPN.js.map.json → ServerRouteInputs-lclUilqu.js.map.json} +1 -1
- package/dist/_nuxt/{StacktraceList-B-ehJIQ-.js.map.json → StacktraceList-BUhKgrAv.js.map.json} +1 -1
- package/dist/_nuxt/{StateEditor-Yqdbqk_c.js.map.json → StateEditor-D_NCPzZq.js.map.json} +1 -1
- package/dist/_nuxt/{__blank-BM2yOFO6.js.map.json → __blank-BgoalQAL.js.map.json} +1 -1
- package/dist/_nuxt/{analyze-build-Cemp_oBq.js.map.json → analyze-build-DSk_N3wx.js.map.json} +1 -1
- package/dist/_nuxt/assets-6seYEHqs.js.map.json +1 -0
- package/dist/_nuxt/{components-BJnHweOE.js.map.json → components-CTVOL1-D.js.map.json} +1 -1
- package/dist/_nuxt/custom-_name_-DRWuAoZa.js.map.json +1 -0
- package/dist/_nuxt/{debug-BcJZ8M6i.js.map.json → debug-CpWOyAbK.js.map.json} +1 -1
- package/dist/_nuxt/entry-uV9FV_26.js.map.json +1 -0
- package/dist/_nuxt/{error-404-dySA7T2P.js.map.json → error-404-BN7jSsJU.js.map.json} +1 -1
- package/dist/_nuxt/{error-500-2Ody89Er.js.map.json → error-500-CX60RT79.js.map.json} +1 -1
- package/dist/_nuxt/{error-hGc4cWUU.js.map.json → error-YOq9ydYM.js.map.json} +1 -1
- package/dist/_nuxt/{head-BTCtirw3.js.map.json → head-Q3WHkZN-.js.map.json} +1 -1
- package/dist/_nuxt/{hooks-BVzlIVXR.js.map.json → hooks-Dfejz2-5.js.map.json} +1 -1
- package/dist/_nuxt/{imports-B3k4BZF7.js.map.json → imports-CCepJr4G.js.map.json} +1 -1
- package/dist/_nuxt/{modules-Ck915TxZ.js.map.json → modules-CDEu6e8J.js.map.json} +1 -1
- package/dist/_nuxt/nuxt-B-ZgUV2U.js.map.json +1 -0
- package/dist/_nuxt/{nuxt-link-C-BBeF5l.js.map.json → nuxt-link-X36zPJaC.js.map.json} +1 -1
- package/dist/_nuxt/{open-graph-ll_bjX_m.js.map.json → open-graph-RnltEfE1.js.map.json} +1 -1
- package/dist/_nuxt/overview-0981_RjH.js.map.json +1 -0
- package/dist/_nuxt/{pages-BddDWJsZ.js.map.json → pages-BJY0ZMcV.js.map.json} +1 -1
- package/dist/_nuxt/{pages-CrUWMxGz.js.map.json → pages-Dv_rq-A5.js.map.json} +1 -1
- package/dist/_nuxt/{pages-DWELoQlh.js.map.json → pages-c-R2EyNA.js.map.json} +1 -1
- package/dist/_nuxt/{payload-29bFuqLh.js.map.json → payload-EEc-a5Rs.js.map.json} +1 -1
- package/dist/_nuxt/{plugins-fmmRaH-S.js.map.json → plugins-DBU4EaVz.js.map.json} +1 -1
- package/dist/_nuxt/{ready-BQ1fhXgL.js.map.json → ready-B0tgRAWs.js.map.json} +1 -1
- package/dist/_nuxt/{runtime-configs-iL68LNkj.js.map.json → runtime-configs-eyjqyWy0.js.map.json} +1 -1
- package/dist/_nuxt/server-routes-CmFWvg0q.js.map.json +1 -0
- package/dist/_nuxt/server-tasks-y13wW_sS.js.map.json +1 -0
- package/dist/_nuxt/{settings-Qa45tU8e.js.map.json → settings-CQHWdQH5.js.map.json} +1 -1
- package/dist/_nuxt/{state-components-CksF081b.js.map.json → state-components-BtOK14JS.js.map.json} +1 -1
- package/dist/_nuxt/state-modules-B1t4RCwZ.js.map.json +1 -0
- package/dist/_nuxt/{state-tabs-m1o-BX5R.js.map.json → state-tabs-DgyOko_b.js.map.json} +1 -1
- package/dist/_nuxt/storage-CL3RFmxG.js.map.json +1 -0
- package/dist/_nuxt/{timeline-Dukbqafi.js.map.json → timeline-CrhB_ydt.js.map.json} +1 -1
- package/dist/_nuxt/utils-DdQYVRed.js.map.json +1 -0
- package/dist/_nuxt/{virtual-files-BQJM45QE.js.map.json → virtual-files-WqYqMpE0.js.map.json} +1 -1
- package/dist/_nuxt/virtual_nuxt_node_modules_.cache_nuxt_.nuxt_fetch.server-pxhz0pzP.js.map.json +1 -0
- package/dist/chunks/module-main.mjs +59 -40
- package/dist/index.mjs.map.json +1 -1
- package/dist/module.json +1 -1
- package/dist/runtime/shared/hooks.d.ts +10 -2
- package/dist/server.mjs.map.json +1 -1
- package/package.json +20 -20
- package/dist/_nuxt/AuthRequiredPanel-znjaI7oT.js.map.json +0 -1
- package/dist/_nuxt/NIcon-cjduOh_B.js.map.json +0 -1
- package/dist/_nuxt/assets-rTFAaows.js.map.json +0 -1
- package/dist/_nuxt/custom-_name_-DI8dnRDD.js.map.json +0 -1
- package/dist/_nuxt/entry-DZwY6FLS.js.map.json +0 -1
- package/dist/_nuxt/nuxt-C5VITehY.js.map.json +0 -1
- package/dist/_nuxt/overview-CyqDmfdE.js.map.json +0 -1
- package/dist/_nuxt/server-routes-Dy5_Ljmu.js.map.json +0 -1
- package/dist/_nuxt/server-tasks-CD-7IPFD.js.map.json +0 -1
- package/dist/_nuxt/state-modules-CyH4hWeN.js.map.json +0 -1
- package/dist/_nuxt/storage-BylO3p9r.js.map.json +0 -1
- package/dist/_nuxt/utils-BfB0tRbX.js.map.json +0 -1
package/dist/_nuxt/{analyze-build-Cemp_oBq.js.map.json → analyze-build-DSk_N3wx.js.map.json}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"analyze-build-Cemp_oBq.js","mappings":";;;;;;;;;;;;;;;;AAUA,IAAM,cAAc;AAEpB,IAAA,kEAA4B,8BAAiB;CAC3C,QAAQ;CACR,mBAAmB;CACnB,OAAO;EACL,SAAS,CAAC;EACV,MAAM,CAAC;CACT;CACA,MAA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,sBAAsB;QACjC,YAAY,qBAAqB;QACjC,wBAAwB,WAAiB,qBAAuB,QAAQ;QACxE,KAAK;QACL,GAAG;OACL,GAAG;QACD,SAAS,cAAe,CACtB,gBAAiB,2BAA2B,CAC9C,CAAC;QACD,GAAG;OACL,GAAG,GAAG,CAAC,cAAc,qBAAqB,CAAC;OAC3C,YAAa,OAAO;QAClB,MAAM;QACN,KAAK;QACL,eAAe;OACjB,GAAG,CACD,YAAa,oBAAoB,EAC/B,UAAU,WAAiB,QAAQ,KAAK,EAC1C,GAAG;QACD,SAAS,cAAe,CACtB,gBAAiB,UAAU,CAC7B,CAAC;QACD,GAAG;OACL,GAAG,GAAG,CAAC,SAAS,CAAC,GACjB,YAAa,oBAAoB;QAC/B,GAAG;QACH,UAAU,WAAiB,QAAQ,IAAI;OACzC,GAAG;QACD,SAAS,cAAe,CACtB,gBAAiB,SAAS,CAC5B,CAAC;QACD,GAAG;OACL,GAAG,GAAG,CAAC,SAAS,CAAC,CACnB,CAAC;MACH,CAAC,CACH,CAAC;MACD,GAAG;KACL,GAAG,MAAM,CAAC,SAAS,CAAC,CACtB;IAEJ,CAAC;IACD,GAAG;GACL,GAAG,OAAO,CAAC;GACX,MAAM,mBAAoB,oBAAoB,MAAM;IAClD,SAAS,SAAU,GAAG,OAAO,SAAS,aAAa;KACjD,IAAI,OACF,MAAM,mBAAoB,6BAA6B,MAAM,MAAM,SAAS,QAAQ,CAAC;UAErF,OAAO,CACL,YAAa,2BAA2B,CAC1C;IAEJ,CAAC;IACD,GAAG;GACL,GAAG,OAAO,CAAC;GACX,MAAM,UAAU;EAClB;CACA;AAEA,CAAC","names":[],"sources":["../../../../../../../../components/BuildAnalyzeDetails.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/BuildAnalyzeDetails.vue","../../../../../../../../components/docs/analyze-build.md","../../../../../../../../pages/modules/analyze-build.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../pages/modules/analyze-build.vue"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveComponent as _resolveComponent, withCtx as _withCtx, createTextVNode as _createTextVNode, mergeProps as _mergeProps } from \"vue\"\nimport { ssrRenderClass as _ssrRenderClass, ssrRenderComponent as _ssrRenderComponent, ssrRenderAttr as _ssrRenderAttr, ssrRenderAttrs as _ssrRenderAttrs, ssrInterpolate as _ssrInterpolate, ssrRenderList as _ssrRenderList } from \"vue/server-renderer\"\n\nimport type { AnalyzeBuildMeta } from '../../src/types'\nimport { formatTimeAgo } from '@vueuse/core'\nimport { computed, ref } from 'vue'\nimport { useRuntimeConfig } from '#imports'\nimport { rpc } from '~/composables/rpc'\n\nconst CLIENT_BASE = '/__nuxt_devtools__/client'\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'BuildAnalyzeDetails',\n __ssrInlineRender: true,\n props: {\n current: {},\n prev: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst runtimeConfig = useRuntimeConfig()\nconst ROUTE_ANALYZE = `${runtimeConfig.app.baseURL.replace(CLIENT_BASE, '/')}/__nuxt_devtools__/analyze/`.replace(/\\/+/g, '/')\n\nconst tabs = computed(() => {\n const items = [\n { name: 'Overview', id: 'overview' },\n ]\n if (props.current.features.bundleClient)\n items.push({ name: 'Client Bundle', id: 'bundle-client' })\n if (props.current.features.bundleNitro)\n items.push({ name: 'Nitro Bundle', id: 'bundle-nitro' })\n if (props.current.features.viteInspect)\n items.push({ name: 'Vite Inspect', id: 'vite-inspect' })\n\n return items\n})\n\nconst selectedTab = ref(tabs.value[0])\n\nfunction getDuration(build: AnalyzeBuildMeta) {\n return `${((build.endTime - build.startTime) / 1000).toFixed(1)}s`\n}\n\nfunction formatFileSize(bytes: number) {\n if (bytes < 1024)\n return `${bytes}B`\n if (bytes < 1024 * 1024)\n return `${(bytes / 1024).toFixed(1)}KB`\n if (bytes < 1024 * 1024 * 1024)\n return `${(bytes / 1024 / 1024).toFixed(1)}MB`\n return `${(bytes / 1024 / 1024 / 1024).toFixed(1)}GB`\n}\n\nasync function clear(name: string) {\n return rpc.clearAnalyzeBuilds([name])\n}\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_FilepathItem = _resolveComponent(\"FilepathItem\")!\n const _component_NButton = _resolveComponent(\"NButton\")!\n\n _push(`<div${_ssrRenderAttrs(_mergeProps({\n \"h-full\": \"\",\n grid: \"~ rows-[max-content_1fr]\"\n }, _attrs))}><div flex=\"~ wrap\" w-full><!--[-->`)\n _ssrRenderList(tabs.value, (tab, idx) => {\n _push(`<button px4 py2 border=\"r base\" hover=\"bg-active\" class=\"${\n _ssrRenderClass(tab.id === selectedTab.value?.id ? '' : 'border-b')\n }\"><div class=\"${\n _ssrRenderClass(tab.id === selectedTab.value?.id ? '' : 'op30' )\n }\">${\n _ssrInterpolate(tab.name)\n }</div></button>`)\n })\n _push(`<!--]--><div border=\"b base\" flex-auto></div></div>`)\n if (selectedTab.value?.id === 'overview') {\n _push(`<div flex=\"~ col gap-4 items-center justify-center\" p4><div flex-auto></div><div grid=\"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center\" w-100><div i-carbon-commit text-xl></div><div><div text-sm op50> Name </div><div>${\n _ssrInterpolate(__props.current.name)\n }</div></div><div i-carbon-time text-xl></div><div><div text-sm op50> Build duration </div><div>${\n _ssrInterpolate(getDuration(__props.current))\n }</div></div>`)\n if (__props.current.size?.clientBundle) {\n _push(`<!--[--><div i-carbon-cics-program text-xl></div><div><div text-sm op50> Client bundle size </div><div>${_ssrInterpolate(formatFileSize(__props.current.size.clientBundle))}</div></div><!--]-->`)\n } else {\n _push(`<!---->`)\n }\n if (__props.current.size?.nitroBundle) {\n _push(`<!--[--><div i-carbon-bare-metal-server text-xl></div><div><div text-sm op50> Nitro bundle size </div><div>${_ssrInterpolate(formatFileSize(__props.current.size.nitroBundle))}</div></div><!--]-->`)\n } else {\n _push(`<!---->`)\n }\n _push(`<div i-carbon-edge-node text-xl></div><div><div text-sm op50> Built </div><div>${_ssrInterpolate(_unref(formatTimeAgo)(new Date(__props.current.endTime)))}</div></div><div i-carbon:folder-parent text-xl></div><div><div text-sm op50> Report Path </div>`)\n _push(_ssrRenderComponent(_component_FilepathItem, {\n filepath: __props.current.analyzeDir\n }, null, _parent))\n _push(`</div></div><div flex-auto></div>`)\n _push(_ssrRenderComponent(_component_NButton, {\n n: \"rose\",\n icon: \"carbon-delete\",\n onClick: ($event: any) => (clear(__props.current.name))\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Delete this report `)\n } else {\n return [\n _createTextVNode(\" Delete this report \")\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(`</div>`)\n } else {\n _push(`<!---->`)\n }\n _push(`<iframe${\n _ssrRenderAttr(\"src\", `${_unref(ROUTE_ANALYZE)}${__props.current.slug}/client.html`)\n } h-full w-full></iframe><iframe${\n _ssrRenderAttr(\"src\", `${_unref(ROUTE_ANALYZE)}${__props.current.slug}/nitro.html`)\n } h-full w-full></iframe><iframe${\n _ssrRenderAttr(\"src\", `${_unref(ROUTE_ANALYZE)}${__props.current.slug}/.vite-inspect/`)\n } h-full w-full></iframe></div>`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { AnalyzeBuildMeta } from '../../src/types'\nimport { formatTimeAgo } from '@vueuse/core'\nimport { computed, ref } from 'vue'\nimport { useRuntimeConfig } from '#imports'\nimport { rpc } from '~/composables/rpc'\n\nconst props = defineProps<{\n current: AnalyzeBuildMeta\n prev?: AnalyzeBuildMeta\n}>()\n\nconst runtimeConfig = useRuntimeConfig()\nconst CLIENT_BASE = '/__nuxt_devtools__/client'\nconst ROUTE_ANALYZE = `${runtimeConfig.app.baseURL.replace(CLIENT_BASE, '/')}/__nuxt_devtools__/analyze/`.replace(/\\/+/g, '/')\n\nconst tabs = computed(() => {\n const items = [\n { name: 'Overview', id: 'overview' },\n ]\n if (props.current.features.bundleClient)\n items.push({ name: 'Client Bundle', id: 'bundle-client' })\n if (props.current.features.bundleNitro)\n items.push({ name: 'Nitro Bundle', id: 'bundle-nitro' })\n if (props.current.features.viteInspect)\n items.push({ name: 'Vite Inspect', id: 'vite-inspect' })\n\n return items\n})\n\nconst selectedTab = ref(tabs.value[0])\n\nfunction getDuration(build: AnalyzeBuildMeta) {\n return `${((build.endTime - build.startTime) / 1000).toFixed(1)}s`\n}\n\nfunction formatFileSize(bytes: number) {\n if (bytes < 1024)\n return `${bytes}B`\n if (bytes < 1024 * 1024)\n return `${(bytes / 1024).toFixed(1)}KB`\n if (bytes < 1024 * 1024 * 1024)\n return `${(bytes / 1024 / 1024).toFixed(1)}MB`\n return `${(bytes / 1024 / 1024 / 1024).toFixed(1)}GB`\n}\n\nasync function clear(name: string) {\n return rpc.clearAnalyzeBuilds([name])\n}\n</script>\n\n<template>\n <div h-full grid=\"~ rows-[max-content_1fr]\">\n <div flex=\"~ wrap\" w-full>\n <template v-for=\"tab, idx of tabs\" :key=\"idx\">\n <button\n px4 py2 border=\"r base\"\n hover=\"bg-active\"\n :class=\"tab.id === selectedTab?.id ? '' : 'border-b'\"\n @click=\"selectedTab = tab\"\n >\n <div :class=\"tab.id === selectedTab?.id ? '' : 'op30' \">\n {{ tab.name }}\n </div>\n </button>\n </template>\n <div border=\"b base\" flex-auto />\n </div>\n <div\n v-if=\"selectedTab?.id === 'overview'\"\n flex=\"~ col gap-4 items-center justify-center\" p4\n >\n <div flex-auto />\n <div grid=\"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center\" w-100>\n <div i-carbon-commit text-xl />\n <div>\n <div text-sm op50>\n Name\n </div>\n <div>{{ current.name }}</div>\n </div>\n <div i-carbon-time text-xl />\n <div>\n <div text-sm op50>\n Build duration\n </div>\n <div>{{ getDuration(current) }}</div>\n </div>\n <template v-if=\"current.size?.clientBundle\">\n <div i-carbon-cics-program text-xl />\n <div>\n <div text-sm op50>\n Client bundle size\n </div>\n <div>{{ formatFileSize(current.size.clientBundle) }}</div>\n </div>\n </template>\n <template v-if=\"current.size?.nitroBundle\">\n <div i-carbon-bare-metal-server text-xl />\n <div>\n <div text-sm op50>\n Nitro bundle size\n </div>\n <div>{{ formatFileSize(current.size.nitroBundle) }}</div>\n </div>\n </template>\n <div i-carbon-edge-node text-xl />\n <div>\n <div text-sm op50>\n Built\n </div>\n <div>{{ formatTimeAgo(new Date(current.endTime)) }}</div>\n </div>\n <div i-carbon:folder-parent text-xl />\n <div>\n <div text-sm op50>\n Report Path\n </div>\n <FilepathItem :filepath=\"current.analyzeDir\" />\n </div>\n </div>\n <div flex-auto />\n <NButton n=\"rose\" icon=\"carbon-delete\" @click=\"clear(current.name)\">\n Delete this report\n </NButton>\n </div>\n <iframe\n v-lazy-show=\"selectedTab?.id === 'bundle-client'\"\n :src=\"`${ROUTE_ANALYZE}${current.slug}/client.html`\"\n h-full w-full\n />\n <iframe\n v-lazy-show=\"selectedTab?.id === 'bundle-nitro'\"\n :src=\"`${ROUTE_ANALYZE}${current.slug}/nitro.html`\"\n h-full w-full\n />\n <iframe\n v-lazy-show=\"selectedTab?.id === 'vite-inspect'\"\n :src=\"`${ROUTE_ANALYZE}${current.slug}/.vite-inspect/`\"\n h-full w-full\n />\n </div>\n</template>\n","# Build Analyze\n\nDevTools 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 `nuxt build --analyze` and present the output data directly in DevTools for easy browsing and comparing.\n","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, unref as _unref, withCtx as _withCtx, createTextVNode as _createTextVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createBlock as _createBlock, toDisplayString as _toDisplayString, createVNode as _createVNode, createCommentVNode as _createCommentVNode } from \"vue\"\nimport { ssrRenderClass as _ssrRenderClass, ssrRenderComponent as _ssrRenderComponent, ssrInterpolate as _ssrInterpolate, ssrRenderList as _ssrRenderList } from \"vue/server-renderer\"\n\nimport type { AnalyzeBuildMeta } from '~/../src/types'\nimport { createTemplatePromise, formatTimeAgo } from '@vueuse/core'\nimport { computed, ref } from 'vue'\nimport { definePageMeta } from '#imports'\nimport { satisfyNuxtVersion } from '~/composables/npm'\nimport { rpc } from '~/composables/rpc'\nimport { useAnalyzeBuildInfo } from '~/composables/state'\nimport { registerCommands } from '~/composables/state-commands'\nimport { telemetry } from '~/composables/telemetry'\nimport { useSessionState } from '~/composables/utils'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'analyze-build',\n __ssrInlineRender: true,\n setup(__props) {\n\ndefinePageMeta({\n icon: 'carbon-edge-node',\n title: 'Build Analyze',\n layout: 'full',\n category: 'analyze',\n show() {\n return satisfyNuxtVersion('^3.5.0')\n },\n})\n\nconst PromiseConfirm = createTemplatePromise<boolean>()\n\nconst info = useAnalyzeBuildInfo()\nconst slug = useSessionState<string>('analyze-build:slug', '')\n\nconst selected = computed(() => info.value?.builds.find(b => b.slug === slug.value) ?? info.value?.builds[0])\n\nconst shouldRevealTerminal = ref(false)\n\nconst buildNameInput = ref('')\nconst buildNameConflicted = computed(() => info.value?.builds.some(b => b.name === buildNameInput.value.trim()))\nasync function start() {\n buildNameInput.value = await rpc.generateAnalyzeBuildName()\n\n if (!await PromiseConfirm.start())\n return\n\n telemetry('analyze-build:start')\n\n // `startAnalyzeBuild` refreshes `getAnalyzeBuildInfo` as soon as the session\n // registers, so `info.isBuilding` / `info.activeSessionId` drive the UI. It\n // also returns the id so we can reveal the dock immediately.\n const sessionId = await rpc.startAnalyzeBuild(buildNameInput.value)\n if (shouldRevealTerminal.value)\n rpc.revealTerminal(sessionId)\n}\n\nfunction getDuration(build: AnalyzeBuildMeta) {\n return `${((build.endTime - build.startTime) / 1000).toFixed(1)}s`\n}\n\nfunction revealTerminal() {\n if (info.value?.activeSessionId)\n rpc.revealTerminal(info.value.activeSessionId)\n}\n\nregisterCommands(() => [\n {\n id: 'action:analyze-build: start',\n title: 'Start a new analyze build',\n icon: 'i-carbon-edge-node',\n action: start,\n },\n])\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NSplitPane = _resolveComponent(\"NSplitPane\")!\n const _component_NButton = _resolveComponent(\"NButton\")!\n const _component_BuildAnalyzeDetails = _resolveComponent(\"BuildAnalyzeDetails\")!\n const _component_NPanelGrids = _resolveComponent(\"NPanelGrids\")!\n const _component_NDialog = _resolveComponent(\"NDialog\")!\n const _component_NTextInput = _resolveComponent(\"NTextInput\")!\n const _component_NTip = _resolveComponent(\"NTip\")!\n const _component_NCodeBlock = _resolveComponent(\"NCodeBlock\")!\n const _component_NCheckbox = _resolveComponent(\"NCheckbox\")!\n const _component_HelpFab = _resolveComponent(\"HelpFab\")!\n const _component_DocsAnalyzeBuild = _resolveComponent(\"DocsAnalyzeBuild\")!\n\n _push(`<!--[-->`)\n _push(_ssrRenderComponent(_component_NSplitPane, { \"left-size\": 30 }, {\n left: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div flex=\"~ col\"${_scopeId}><!--[-->`)\n _ssrRenderList(_unref(info)?.builds, (build) => {\n _push(`<!--[--><button flex=\"~ col gap1\" p3 hover:bg-active class=\"${\n _ssrRenderClass(build.slug === selected.value?.slug ? 'text-primary bg-active' : '')\n }\"${\n _scopeId\n }><code${\n _scopeId\n }>${\n _ssrInterpolate(build.name)\n }</code><div flex=\"~ gap-1 items-center wrap\" w-full text-sm op60${\n _scopeId\n }><div i-carbon-time${\n _scopeId\n }></div><span${\n _scopeId\n }>${\n _ssrInterpolate(getDuration(build))\n }</span><div flex-auto${\n _scopeId\n }></div><span${\n _scopeId\n }>${\n _ssrInterpolate(_unref(formatTimeAgo)(new Date(build.endTime)))\n }</span></div></button><div x-divider${\n _scopeId\n }></div><!--]-->`)\n })\n _push(`<!--]--><div flex=\"~ items-center justify-center wrap\" p4${_scopeId}>`)\n if (!_unref(info)?.isBuilding) {\n _push(_ssrRenderComponent(_component_NButton, {\n n: \"primary\",\n icon: \"carbon-edge-node\",\n onClick: ($event: any) => (start())\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Start a new build `)\n } else {\n return [\n _createTextVNode(\" Start a new build \")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n } else {\n _push(_ssrRenderComponent(_component_NButton, {\n n: \"primary\",\n icon: \"carbon-circle-dash animate-spin\",\n title: \"Open the output in the Terminals dock\",\n onClick: ($event: any) => (revealTerminal())\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Building... `)\n } else {\n return [\n _createTextVNode(\" Building... \")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n }\n _push(`</div></div>`)\n } else {\n return [\n _createVNode(\"div\", { flex: \"~ col\" }, [\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(_unref(info)?.builds, (build) => {\n return (_openBlock(), _createBlock(_Fragment, {\n key: build.slug\n }, [\n _createVNode(\"button\", {\n flex: \"~ col gap1\",\n p3: \"\",\n \"hover:bg-active\": \"\",\n class: build.slug === selected.value?.slug ? 'text-primary bg-active' : '',\n onClick: ($event: any) => (slug.value = build.slug)\n }, [\n _createVNode(\"code\", null, _toDisplayString(build.name), 1),\n _createVNode(\"div\", {\n flex: \"~ gap-1 items-center wrap\",\n \"w-full\": \"\",\n \"text-sm\": \"\",\n op60: \"\"\n }, [\n _createVNode(\"div\", { \"i-carbon-time\": \"\" }),\n _createVNode(\"span\", null, _toDisplayString(getDuration(build)), 1),\n _createVNode(\"div\", { \"flex-auto\": \"\" }),\n _createVNode(\"span\", null, _toDisplayString(_unref(formatTimeAgo)(new Date(build.endTime))), 1)\n ])\n ], 10, [\"onClick\"]),\n _createVNode(\"div\", { \"x-divider\": \"\" })\n ], 64))\n }), 128)),\n _createVNode(\"div\", {\n flex: \"~ items-center justify-center wrap\",\n p4: \"\"\n }, [\n (!_unref(info)?.isBuilding)\n ? (_openBlock(), _createBlock(_component_NButton, {\n key: 0,\n n: \"primary\",\n icon: \"carbon-edge-node\",\n onClick: ($event: any) => (start())\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Start a new build \")\n ]),\n _: 1\n }, 8, [\"onClick\"]))\n : (_openBlock(), _createBlock(_component_NButton, {\n key: 1,\n n: \"primary\",\n icon: \"carbon-circle-dash animate-spin\",\n title: \"Open the output in the Terminals dock\",\n onClick: ($event: any) => (revealTerminal())\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Building... \")\n ]),\n _: 1\n }, 8, [\"onClick\"]))\n ])\n ])\n ]\n }\n }),\n right: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n if (selected.value) {\n _push(_ssrRenderComponent(_component_BuildAnalyzeDetails, { current: selected.value }, null, _parent, _scopeId))\n } else {\n _push(_ssrRenderComponent(_component_NPanelGrids, null, null, _parent, _scopeId))\n }\n } else {\n return [\n (selected.value)\n ? (_openBlock(), _createBlock(_component_BuildAnalyzeDetails, {\n key: 0,\n current: selected.value\n }, null, 8, [\"current\"]))\n : (_openBlock(), _createBlock(_component_NPanelGrids, { key: 1 }))\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(_ssrRenderComponent(_unref(PromiseConfirm), null, {\n default: _withCtx(({ resolve }, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NDialog, {\n \"model-value\": true,\n onClose: ($event: any) => (resolve(false))\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div flex=\"~ col gap-1\" w-250 p4${\n _scopeId\n }><h3 class=\"text-lg font-medium leading-6\" mb2${\n _scopeId\n }> Start analyze build? </h3><p op50${\n _scopeId\n }> Enter the name of the build: </p>`)\n _push(_ssrRenderComponent(_component_NTextInput, {\n modelValue: buildNameInput.value,\n \"onUpdate:modelValue\": ($event: any) => ((buildNameInput).value = $event),\n placeholder: \"Build name\"\n }, null, _parent, _scopeId))\n if (buildNameConflicted.value) {\n _push(_ssrRenderComponent(_component_NTip, { \"n-orange\": \"\" }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` A build with the same name already exists, continue would overrides the previous build result. `)\n } else {\n return [\n _createTextVNode(\" A build with the same name already exists, continue would overrides the previous build result. \")\n ]\n }\n }),\n _: 2\n }, _parent, _scopeId))\n } else {\n _push(`<!---->`)\n }\n _push(`<div my3 x-divider${\n _scopeId\n }></div><p op50${\n _scopeId\n }> The following command will be executed in your terminal: </p>`)\n _push(_ssrRenderComponent(_component_NCodeBlock, {\n code: `npx nuxi analyze --no-serve --name=${buildNameInput.value}`,\n lang: \"bash\",\n px4: \"\",\n py2: \"\",\n border: \"~ base rounded\",\n lines: false\n }, null, _parent, _scopeId))\n _push(_ssrRenderComponent(_component_NCheckbox, {\n modelValue: shouldRevealTerminal.value,\n \"onUpdate:modelValue\": ($event: any) => ((shouldRevealTerminal).value = $event),\n mt2: \"\",\n n: \"primary\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Open the Terminals dock `)\n } else {\n return [\n _createTextVNode(\" Open the Terminals dock \")\n ]\n }\n }),\n _: 2\n }, _parent, _scopeId))\n _push(`<div flex=\"~ gap-3\" mt2 justify-end${_scopeId}>`)\n _push(_ssrRenderComponent(_component_NButton, {\n onClick: ($event: any) => (resolve(false))\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Cancel `)\n } else {\n return [\n _createTextVNode(\" Cancel \")\n ]\n }\n }),\n _: 2\n }, _parent, _scopeId))\n _push(_ssrRenderComponent(_component_NButton, {\n n: \"solid primary\",\n onClick: ($event: any) => (resolve(true))\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Start `)\n } else {\n return [\n _createTextVNode(\" Start \")\n ]\n }\n }),\n _: 2\n }, _parent, _scopeId))\n _push(`</div></div>`)\n } else {\n return [\n _createVNode(\"div\", {\n flex: \"~ col gap-1\",\n \"w-250\": \"\",\n p4: \"\"\n }, [\n _createVNode(\"h3\", {\n class: \"text-lg font-medium leading-6\",\n mb2: \"\"\n }, \" Start analyze build? \"),\n _createVNode(\"p\", { op50: \"\" }, \" Enter the name of the build: \"),\n _createVNode(_component_NTextInput, {\n modelValue: buildNameInput.value,\n \"onUpdate:modelValue\": ($event: any) => ((buildNameInput).value = $event),\n placeholder: \"Build name\"\n }, null, 8, [\"modelValue\", \"onUpdate:modelValue\"]),\n (buildNameConflicted.value)\n ? (_openBlock(), _createBlock(_component_NTip, {\n key: 0,\n \"n-orange\": \"\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" A build with the same name already exists, continue would overrides the previous build result. \")\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n _createVNode(\"div\", {\n my3: \"\",\n \"x-divider\": \"\"\n }),\n _createVNode(\"p\", { op50: \"\" }, \" The following command will be executed in your terminal: \"),\n _createVNode(_component_NCodeBlock, {\n code: `npx nuxi analyze --no-serve --name=${buildNameInput.value}`,\n lang: \"bash\",\n px4: \"\",\n py2: \"\",\n border: \"~ base rounded\",\n lines: false\n }, null, 8, [\"code\"]),\n _createVNode(_component_NCheckbox, {\n modelValue: shouldRevealTerminal.value,\n \"onUpdate:modelValue\": ($event: any) => ((shouldRevealTerminal).value = $event),\n mt2: \"\",\n n: \"primary\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Open the Terminals dock \")\n ]),\n _: 1\n }, 8, [\"modelValue\", \"onUpdate:modelValue\"]),\n _createVNode(\"div\", {\n flex: \"~ gap-3\",\n mt2: \"\",\n \"justify-end\": \"\"\n }, [\n _createVNode(_component_NButton, {\n onClick: ($event: any) => (resolve(false))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Cancel \")\n ]),\n _: 1\n }, 8, [\"onClick\"]),\n _createVNode(_component_NButton, {\n n: \"solid primary\",\n onClick: ($event: any) => (resolve(true))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Start \")\n ]),\n _: 1\n }, 8, [\"onClick\"])\n ])\n ])\n ]\n }\n }),\n _: 2\n }, _parent, _scopeId))\n } else {\n return [\n _createVNode(_component_NDialog, {\n \"model-value\": true,\n onClose: ($event: any) => (resolve(false))\n }, {\n default: _withCtx(() => [\n _createVNode(\"div\", {\n flex: \"~ col gap-1\",\n \"w-250\": \"\",\n p4: \"\"\n }, [\n _createVNode(\"h3\", {\n class: \"text-lg font-medium leading-6\",\n mb2: \"\"\n }, \" Start analyze build? \"),\n _createVNode(\"p\", { op50: \"\" }, \" Enter the name of the build: \"),\n _createVNode(_component_NTextInput, {\n modelValue: buildNameInput.value,\n \"onUpdate:modelValue\": ($event: any) => ((buildNameInput).value = $event),\n placeholder: \"Build name\"\n }, null, 8, [\"modelValue\", \"onUpdate:modelValue\"]),\n (buildNameConflicted.value)\n ? (_openBlock(), _createBlock(_component_NTip, {\n key: 0,\n \"n-orange\": \"\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" A build with the same name already exists, continue would overrides the previous build result. \")\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n _createVNode(\"div\", {\n my3: \"\",\n \"x-divider\": \"\"\n }),\n _createVNode(\"p\", { op50: \"\" }, \" The following command will be executed in your terminal: \"),\n _createVNode(_component_NCodeBlock, {\n code: `npx nuxi analyze --no-serve --name=${buildNameInput.value}`,\n lang: \"bash\",\n px4: \"\",\n py2: \"\",\n border: \"~ base rounded\",\n lines: false\n }, null, 8, [\"code\"]),\n _createVNode(_component_NCheckbox, {\n modelValue: shouldRevealTerminal.value,\n \"onUpdate:modelValue\": ($event: any) => ((shouldRevealTerminal).value = $event),\n mt2: \"\",\n n: \"primary\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Open the Terminals dock \")\n ]),\n _: 1\n }, 8, [\"modelValue\", \"onUpdate:modelValue\"]),\n _createVNode(\"div\", {\n flex: \"~ gap-3\",\n mt2: \"\",\n \"justify-end\": \"\"\n }, [\n _createVNode(_component_NButton, {\n onClick: ($event: any) => (resolve(false))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Cancel \")\n ]),\n _: 1\n }, 8, [\"onClick\"]),\n _createVNode(_component_NButton, {\n n: \"solid primary\",\n onClick: ($event: any) => (resolve(true))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Start \")\n ]),\n _: 1\n }, 8, [\"onClick\"])\n ])\n ])\n ]),\n _: 2\n }, 1032, [\"onClose\"])\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(_ssrRenderComponent(_component_HelpFab, null, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_DocsAnalyzeBuild, null, null, _parent, _scopeId))\n } else {\n return [\n _createVNode(_component_DocsAnalyzeBuild)\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(`<!--]-->`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { AnalyzeBuildMeta } from '~/../src/types'\nimport { createTemplatePromise, formatTimeAgo } from '@vueuse/core'\nimport { computed, ref } from 'vue'\nimport { definePageMeta } from '#imports'\nimport { satisfyNuxtVersion } from '~/composables/npm'\nimport { rpc } from '~/composables/rpc'\nimport { useAnalyzeBuildInfo } from '~/composables/state'\nimport { registerCommands } from '~/composables/state-commands'\nimport { telemetry } from '~/composables/telemetry'\nimport { useSessionState } from '~/composables/utils'\n\ndefinePageMeta({\n icon: 'carbon-edge-node',\n title: 'Build Analyze',\n layout: 'full',\n category: 'analyze',\n show() {\n return satisfyNuxtVersion('^3.5.0')\n },\n})\n\nconst PromiseConfirm = createTemplatePromise<boolean>()\n\nconst info = useAnalyzeBuildInfo()\nconst slug = useSessionState<string>('analyze-build:slug', '')\n\nconst selected = computed(() => info.value?.builds.find(b => b.slug === slug.value) ?? info.value?.builds[0])\n\nconst shouldRevealTerminal = ref(false)\n\nconst buildNameInput = ref('')\nconst buildNameConflicted = computed(() => info.value?.builds.some(b => b.name === buildNameInput.value.trim()))\nasync function start() {\n buildNameInput.value = await rpc.generateAnalyzeBuildName()\n\n if (!await PromiseConfirm.start())\n return\n\n telemetry('analyze-build:start')\n\n // `startAnalyzeBuild` refreshes `getAnalyzeBuildInfo` as soon as the session\n // registers, so `info.isBuilding` / `info.activeSessionId` drive the UI. It\n // also returns the id so we can reveal the dock immediately.\n const sessionId = await rpc.startAnalyzeBuild(buildNameInput.value)\n if (shouldRevealTerminal.value)\n rpc.revealTerminal(sessionId)\n}\n\nfunction getDuration(build: AnalyzeBuildMeta) {\n return `${((build.endTime - build.startTime) / 1000).toFixed(1)}s`\n}\n\nfunction revealTerminal() {\n if (info.value?.activeSessionId)\n rpc.revealTerminal(info.value.activeSessionId)\n}\n\nregisterCommands(() => [\n {\n id: 'action:analyze-build: start',\n title: 'Start a new analyze build',\n icon: 'i-carbon-edge-node',\n action: start,\n },\n])\n</script>\n\n<template>\n <NSplitPane :left-size=\"30\">\n <template #left>\n <div flex=\"~ col\">\n <template v-for=\"build of info?.builds\" :key=\"build.slug\">\n <button\n flex=\"~ col gap1\" p3 hover:bg-active\n :class=\"build.slug === selected?.slug ? 'text-primary bg-active' : ''\"\n @click=\"slug = build.slug\"\n >\n <code>{{ build.name }}</code>\n <div flex=\"~ gap-1 items-center wrap\" w-full text-sm op60>\n <div i-carbon-time />\n <span>{{ getDuration(build) }}</span>\n <div flex-auto />\n <span>{{ formatTimeAgo(new Date(build.endTime)) }}</span>\n </div>\n </button>\n <div x-divider />\n </template>\n <div flex=\"~ items-center justify-center wrap\" p4>\n <NButton v-if=\"!info?.isBuilding\" n=\"primary\" icon=\"carbon-edge-node\" @click=\"start()\">\n Start a new build\n </NButton>\n <NButton v-else n=\"primary\" icon=\"carbon-circle-dash animate-spin\" title=\"Open the output in the Terminals dock\" @click=\"revealTerminal()\">\n Building...\n </NButton>\n </div>\n </div>\n </template>\n <template #right>\n <BuildAnalyzeDetails v-if=\"selected\" :current=\"selected\" />\n <NPanelGrids v-else />\n </template>\n </NSplitPane>\n\n <PromiseConfirm v-slot=\"{ resolve }\">\n <NDialog :model-value=\"true\" @close=\"resolve(false)\">\n <div flex=\"~ col gap-1\" w-250 p4>\n <h3 class=\"text-lg font-medium leading-6\" mb2>\n Start analyze build?\n </h3>\n <p op50>\n Enter the name of the build:\n </p>\n <NTextInput\n v-model=\"buildNameInput\"\n placeholder=\"Build name\"\n />\n <NTip v-if=\"buildNameConflicted\" n-orange>\n A build with the same name already exists, continue would overrides the previous build result.\n </NTip>\n <div my3 x-divider />\n <p op50>\n The following command will be executed in your terminal:\n </p>\n <NCodeBlock\n :code=\"`npx nuxi analyze --no-serve --name=${buildNameInput}`\"\n lang=\"bash\" px4 py2 border=\"~ base rounded\"\n :lines=\"false\"\n />\n <NCheckbox v-model=\"shouldRevealTerminal\" mt2 n=\"primary\">\n Open the Terminals dock\n </NCheckbox>\n\n <div flex=\"~ gap-3\" mt2 justify-end>\n <NButton @click=\"resolve(false)\">\n Cancel\n </NButton>\n <NButton n=\"solid primary\" @click=\"resolve(true)\">\n Start\n </NButton>\n </div>\n </div>\n </NDialog>\n </PromiseConfirm>\n\n <HelpFab>\n <DocsAnalyzeBuild />\n </HelpFab>\n</template>\n"],"version":3}
|
|
1
|
+
{"file":"analyze-build-DSk_N3wx.js","mappings":";;;;;;;;;;;;;;;;AAUA,IAAM,cAAc;AAEpB,IAAA,kEAA4B,8BAAiB;CAC3C,QAAQ;CACR,mBAAmB;CACnB,OAAO;EACL,SAAS,CAAC;EACV,MAAM,CAAC;CACT;CACA,MAAM,SAAc;EAEtB,MAAM,QAAQ;EAGd,MAAM,gBAAgB,GADA,iBACG,CAAA,CAAc,IAAI,QAAQ,QAAQ,aAAa,GAAG,EAAE,6BAA6B,QAAQ,QAAQ,GAAG;EAE7H,MAAM,OAAO,eAAe;GAC1B,MAAM,QAAQ,CACZ;IAAE,MAAM;IAAY,IAAI;GAAW,CACrC;GACA,IAAI,MAAM,QAAQ,SAAS,cACzB,MAAM,KAAK;IAAE,MAAM;IAAiB,IAAI;GAAgB,CAAC;GAC3D,IAAI,MAAM,QAAQ,SAAS,aACzB,MAAM,KAAK;IAAE,MAAM;IAAgB,IAAI;GAAe,CAAC;GACzD,IAAI,MAAM,QAAQ,SAAS,aACzB,MAAM,K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,oBAAoB;QAC/B,GAAG;QACH,UAAU,WAAiB,QAAQ,IAAI;OACzC,GAAG;QACD,SAAS,cAAe,CACtB,gBAAiB,SAAS,CAC5B,CAAC;QACD,GAAG;OACL,GAAG,GAAG,CAAC,SAAS,CAAC,CACnB,CAAC;MACH,CAAC,CACH,CAAC;MACD,GAAG;KACL,GAAG,MAAM,CAAC,SAAS,CAAC,CACtB;IAEJ,CAAC;IACD,GAAG;GACL,GAAG,OAAO,CAAC;GACX,MAAM,mBAAoB,oBAAoB,MAAM;IAClD,SAAS,SAAU,GAAG,OAAO,SAAS,aAAa;KACjD,IAAI,OACF,MAAM,mBAAoB,6BAA6B,MAAM,MAAM,SAAS,QAAQ,CAAC;UAErF,OAAO,CACL,YAAa,2BAA2B,CAC1C;IAEJ,CAAC;IACD,GAAG;GACL,GAAG,OAAO,CAAC;GACX,MAAM,UAAU;EAClB;CACA;AAEA,CAAC","names":[],"sources":["../../../../../../../../components/BuildAnalyzeDetails.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/BuildAnalyzeDetails.vue","../../../../../../../../components/docs/analyze-build.md","../../../../../../../../pages/modules/analyze-build.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../pages/modules/analyze-build.vue"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveComponent as _resolveComponent, withCtx as _withCtx, createTextVNode as _createTextVNode, mergeProps as _mergeProps } from \"vue\"\nimport { ssrRenderClass as _ssrRenderClass, ssrRenderComponent as _ssrRenderComponent, ssrRenderAttr as _ssrRenderAttr, ssrRenderAttrs as _ssrRenderAttrs, ssrInterpolate as _ssrInterpolate, ssrRenderList as _ssrRenderList } from \"vue/server-renderer\"\n\nimport type { AnalyzeBuildMeta } from '../../src/types'\nimport { formatTimeAgo } from '@vueuse/core'\nimport { computed, ref } from 'vue'\nimport { useRuntimeConfig } from '#imports'\nimport { rpc } from '~/composables/rpc'\n\nconst CLIENT_BASE = '/__nuxt_devtools__/client'\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'BuildAnalyzeDetails',\n __ssrInlineRender: true,\n props: {\n current: {},\n prev: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst runtimeConfig = useRuntimeConfig()\nconst ROUTE_ANALYZE = `${runtimeConfig.app.baseURL.replace(CLIENT_BASE, '/')}/__nuxt_devtools__/analyze/`.replace(/\\/+/g, '/')\n\nconst tabs = computed(() => {\n const items = [\n { name: 'Overview', id: 'overview' },\n ]\n if (props.current.features.bundleClient)\n items.push({ name: 'Client Bundle', id: 'bundle-client' })\n if (props.current.features.bundleNitro)\n items.push({ name: 'Nitro Bundle', id: 'bundle-nitro' })\n if (props.current.features.viteInspect)\n items.push({ name: 'Vite Inspect', id: 'vite-inspect' })\n\n return items\n})\n\nconst selectedTab = ref(tabs.value[0])\n\nfunction getDuration(build: AnalyzeBuildMeta) {\n return `${((build.endTime - build.startTime) / 1000).toFixed(1)}s`\n}\n\nfunction formatFileSize(bytes: number) {\n if (bytes < 1024)\n return `${bytes}B`\n if (bytes < 1024 * 1024)\n return `${(bytes / 1024).toFixed(1)}KB`\n if (bytes < 1024 * 1024 * 1024)\n return `${(bytes / 1024 / 1024).toFixed(1)}MB`\n return `${(bytes / 1024 / 1024 / 1024).toFixed(1)}GB`\n}\n\nasync function clear(name: string) {\n return rpc.clearAnalyzeBuilds([name])\n}\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_FilepathItem = _resolveComponent(\"FilepathItem\")!\n const _component_NButton = _resolveComponent(\"NButton\")!\n\n _push(`<div${_ssrRenderAttrs(_mergeProps({\n \"h-full\": \"\",\n grid: \"~ rows-[max-content_1fr]\"\n }, _attrs))}><div flex=\"~ wrap\" w-full><!--[-->`)\n _ssrRenderList(tabs.value, (tab, idx) => {\n _push(`<button px4 py2 border=\"r base\" hover=\"bg-active\" class=\"${\n _ssrRenderClass(tab.id === selectedTab.value?.id ? '' : 'border-b')\n }\"><div class=\"${\n _ssrRenderClass(tab.id === selectedTab.value?.id ? '' : 'op30' )\n }\">${\n _ssrInterpolate(tab.name)\n }</div></button>`)\n })\n _push(`<!--]--><div border=\"b base\" flex-auto></div></div>`)\n if (selectedTab.value?.id === 'overview') {\n _push(`<div flex=\"~ col gap-4 items-center justify-center\" p4><div flex-auto></div><div grid=\"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center\" w-100><div i-carbon-commit text-xl></div><div><div text-sm op50> Name </div><div>${\n _ssrInterpolate(__props.current.name)\n }</div></div><div i-carbon-time text-xl></div><div><div text-sm op50> Build duration </div><div>${\n _ssrInterpolate(getDuration(__props.current))\n }</div></div>`)\n if (__props.current.size?.clientBundle) {\n _push(`<!--[--><div i-carbon-cics-program text-xl></div><div><div text-sm op50> Client bundle size </div><div>${_ssrInterpolate(formatFileSize(__props.current.size.clientBundle))}</div></div><!--]-->`)\n } else {\n _push(`<!---->`)\n }\n if (__props.current.size?.nitroBundle) {\n _push(`<!--[--><div i-carbon-bare-metal-server text-xl></div><div><div text-sm op50> Nitro bundle size </div><div>${_ssrInterpolate(formatFileSize(__props.current.size.nitroBundle))}</div></div><!--]-->`)\n } else {\n _push(`<!---->`)\n }\n _push(`<div i-carbon-edge-node text-xl></div><div><div text-sm op50> Built </div><div>${_ssrInterpolate(_unref(formatTimeAgo)(new Date(__props.current.endTime)))}</div></div><div i-carbon:folder-parent text-xl></div><div><div text-sm op50> Report Path </div>`)\n _push(_ssrRenderComponent(_component_FilepathItem, {\n filepath: __props.current.analyzeDir\n }, null, _parent))\n _push(`</div></div><div flex-auto></div>`)\n _push(_ssrRenderComponent(_component_NButton, {\n n: \"rose\",\n icon: \"carbon-delete\",\n onClick: ($event: any) => (clear(__props.current.name))\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Delete this report `)\n } else {\n return [\n _createTextVNode(\" Delete this report \")\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(`</div>`)\n } else {\n _push(`<!---->`)\n }\n _push(`<iframe${\n _ssrRenderAttr(\"src\", `${_unref(ROUTE_ANALYZE)}${__props.current.slug}/client.html`)\n } h-full w-full></iframe><iframe${\n _ssrRenderAttr(\"src\", `${_unref(ROUTE_ANALYZE)}${__props.current.slug}/nitro.html`)\n } h-full w-full></iframe><iframe${\n _ssrRenderAttr(\"src\", `${_unref(ROUTE_ANALYZE)}${__props.current.slug}/.vite-inspect/`)\n } h-full w-full></iframe></div>`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { AnalyzeBuildMeta } from '../../src/types'\nimport { formatTimeAgo } from '@vueuse/core'\nimport { computed, ref } from 'vue'\nimport { useRuntimeConfig } from '#imports'\nimport { rpc } from '~/composables/rpc'\n\nconst props = defineProps<{\n current: AnalyzeBuildMeta\n prev?: AnalyzeBuildMeta\n}>()\n\nconst runtimeConfig = useRuntimeConfig()\nconst CLIENT_BASE = '/__nuxt_devtools__/client'\nconst ROUTE_ANALYZE = `${runtimeConfig.app.baseURL.replace(CLIENT_BASE, '/')}/__nuxt_devtools__/analyze/`.replace(/\\/+/g, '/')\n\nconst tabs = computed(() => {\n const items = [\n { name: 'Overview', id: 'overview' },\n ]\n if (props.current.features.bundleClient)\n items.push({ name: 'Client Bundle', id: 'bundle-client' })\n if (props.current.features.bundleNitro)\n items.push({ name: 'Nitro Bundle', id: 'bundle-nitro' })\n if (props.current.features.viteInspect)\n items.push({ name: 'Vite Inspect', id: 'vite-inspect' })\n\n return items\n})\n\nconst selectedTab = ref(tabs.value[0])\n\nfunction getDuration(build: AnalyzeBuildMeta) {\n return `${((build.endTime - build.startTime) / 1000).toFixed(1)}s`\n}\n\nfunction formatFileSize(bytes: number) {\n if (bytes < 1024)\n return `${bytes}B`\n if (bytes < 1024 * 1024)\n return `${(bytes / 1024).toFixed(1)}KB`\n if (bytes < 1024 * 1024 * 1024)\n return `${(bytes / 1024 / 1024).toFixed(1)}MB`\n return `${(bytes / 1024 / 1024 / 1024).toFixed(1)}GB`\n}\n\nasync function clear(name: string) {\n return rpc.clearAnalyzeBuilds([name])\n}\n</script>\n\n<template>\n <div h-full grid=\"~ rows-[max-content_1fr]\">\n <div flex=\"~ wrap\" w-full>\n <template v-for=\"tab, idx of tabs\" :key=\"idx\">\n <button\n px4 py2 border=\"r base\"\n hover=\"bg-active\"\n :class=\"tab.id === selectedTab?.id ? '' : 'border-b'\"\n @click=\"selectedTab = tab\"\n >\n <div :class=\"tab.id === selectedTab?.id ? '' : 'op30' \">\n {{ tab.name }}\n </div>\n </button>\n </template>\n <div border=\"b base\" flex-auto />\n </div>\n <div\n v-if=\"selectedTab?.id === 'overview'\"\n flex=\"~ col gap-4 items-center justify-center\" p4\n >\n <div flex-auto />\n <div grid=\"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center\" w-100>\n <div i-carbon-commit text-xl />\n <div>\n <div text-sm op50>\n Name\n </div>\n <div>{{ current.name }}</div>\n </div>\n <div i-carbon-time text-xl />\n <div>\n <div text-sm op50>\n Build duration\n </div>\n <div>{{ getDuration(current) }}</div>\n </div>\n <template v-if=\"current.size?.clientBundle\">\n <div i-carbon-cics-program text-xl />\n <div>\n <div text-sm op50>\n Client bundle size\n </div>\n <div>{{ formatFileSize(current.size.clientBundle) }}</div>\n </div>\n </template>\n <template v-if=\"current.size?.nitroBundle\">\n <div i-carbon-bare-metal-server text-xl />\n <div>\n <div text-sm op50>\n Nitro bundle size\n </div>\n <div>{{ formatFileSize(current.size.nitroBundle) }}</div>\n </div>\n </template>\n <div i-carbon-edge-node text-xl />\n <div>\n <div text-sm op50>\n Built\n </div>\n <div>{{ formatTimeAgo(new Date(current.endTime)) }}</div>\n </div>\n <div i-carbon:folder-parent text-xl />\n <div>\n <div text-sm op50>\n Report Path\n </div>\n <FilepathItem :filepath=\"current.analyzeDir\" />\n </div>\n </div>\n <div flex-auto />\n <NButton n=\"rose\" icon=\"carbon-delete\" @click=\"clear(current.name)\">\n Delete this report\n </NButton>\n </div>\n <iframe\n v-lazy-show=\"selectedTab?.id === 'bundle-client'\"\n :src=\"`${ROUTE_ANALYZE}${current.slug}/client.html`\"\n h-full w-full\n />\n <iframe\n v-lazy-show=\"selectedTab?.id === 'bundle-nitro'\"\n :src=\"`${ROUTE_ANALYZE}${current.slug}/nitro.html`\"\n h-full w-full\n />\n <iframe\n v-lazy-show=\"selectedTab?.id === 'vite-inspect'\"\n :src=\"`${ROUTE_ANALYZE}${current.slug}/.vite-inspect/`\"\n h-full w-full\n />\n </div>\n</template>\n","# Build Analyze\n\nDevTools 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 `nuxt build --analyze` and present the output data directly in DevTools for easy browsing and comparing.\n","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, unref as _unref, withCtx as _withCtx, createTextVNode as _createTextVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createBlock as _createBlock, toDisplayString as _toDisplayString, createVNode as _createVNode, createCommentVNode as _createCommentVNode } from \"vue\"\nimport { ssrRenderClass as _ssrRenderClass, ssrRenderComponent as _ssrRenderComponent, ssrInterpolate as _ssrInterpolate, ssrRenderList as _ssrRenderList } from \"vue/server-renderer\"\n\nimport type { AnalyzeBuildMeta } from '~/../src/types'\nimport { createTemplatePromise, formatTimeAgo } from '@vueuse/core'\nimport { computed, ref } from 'vue'\nimport { definePageMeta } from '#imports'\nimport { satisfyNuxtVersion } from '~/composables/npm'\nimport { rpc } from '~/composables/rpc'\nimport { useAnalyzeBuildInfo } from '~/composables/state'\nimport { registerCommands } from '~/composables/state-commands'\nimport { telemetry } from '~/composables/telemetry'\nimport { useSessionState } from '~/composables/utils'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'analyze-build',\n __ssrInlineRender: true,\n setup(__props) {\n\ndefinePageMeta({\n icon: 'carbon-edge-node',\n title: 'Build Analyze',\n layout: 'full',\n category: 'analyze',\n show() {\n return satisfyNuxtVersion('^3.5.0')\n },\n})\n\nconst PromiseConfirm = createTemplatePromise<boolean>()\n\nconst info = useAnalyzeBuildInfo()\nconst slug = useSessionState<string>('analyze-build:slug', '')\n\nconst selected = computed(() => info.value?.builds.find(b => b.slug === slug.value) ?? info.value?.builds[0])\n\nconst shouldRevealTerminal = ref(false)\n\nconst buildNameInput = ref('')\nconst buildNameConflicted = computed(() => info.value?.builds.some(b => b.name === buildNameInput.value.trim()))\nasync function start() {\n buildNameInput.value = await rpc.generateAnalyzeBuildName()\n\n if (!await PromiseConfirm.start())\n return\n\n telemetry('analyze-build:start')\n\n // `startAnalyzeBuild` refreshes `getAnalyzeBuildInfo` as soon as the session\n // registers, so `info.isBuilding` / `info.activeSessionId` drive the UI. It\n // also returns the id so we can reveal the dock immediately.\n const sessionId = await rpc.startAnalyzeBuild(buildNameInput.value)\n if (shouldRevealTerminal.value)\n rpc.revealTerminal(sessionId)\n}\n\nfunction getDuration(build: AnalyzeBuildMeta) {\n return `${((build.endTime - build.startTime) / 1000).toFixed(1)}s`\n}\n\nfunction revealTerminal() {\n if (info.value?.activeSessionId)\n rpc.revealTerminal(info.value.activeSessionId)\n}\n\nregisterCommands(() => [\n {\n id: 'action:analyze-build: start',\n title: 'Start a new analyze build',\n icon: 'i-carbon-edge-node',\n action: start,\n },\n])\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NSplitPane = _resolveComponent(\"NSplitPane\")!\n const _component_NButton = _resolveComponent(\"NButton\")!\n const _component_BuildAnalyzeDetails = _resolveComponent(\"BuildAnalyzeDetails\")!\n const _component_NPanelGrids = _resolveComponent(\"NPanelGrids\")!\n const _component_NDialog = _resolveComponent(\"NDialog\")!\n const _component_NTextInput = _resolveComponent(\"NTextInput\")!\n const _component_NTip = _resolveComponent(\"NTip\")!\n const _component_NCodeBlock = _resolveComponent(\"NCodeBlock\")!\n const _component_NCheckbox = _resolveComponent(\"NCheckbox\")!\n const _component_HelpFab = _resolveComponent(\"HelpFab\")!\n const _component_DocsAnalyzeBuild = _resolveComponent(\"DocsAnalyzeBuild\")!\n\n _push(`<!--[-->`)\n _push(_ssrRenderComponent(_component_NSplitPane, { \"left-size\": 30 }, {\n left: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div flex=\"~ col\"${_scopeId}><!--[-->`)\n _ssrRenderList(_unref(info)?.builds, (build) => {\n _push(`<!--[--><button flex=\"~ col gap1\" p3 hover:bg-active class=\"${\n _ssrRenderClass(build.slug === selected.value?.slug ? 'text-primary bg-active' : '')\n }\"${\n _scopeId\n }><code${\n _scopeId\n }>${\n _ssrInterpolate(build.name)\n }</code><div flex=\"~ gap-1 items-center wrap\" w-full text-sm op60${\n _scopeId\n }><div i-carbon-time${\n _scopeId\n }></div><span${\n _scopeId\n }>${\n _ssrInterpolate(getDuration(build))\n }</span><div flex-auto${\n _scopeId\n }></div><span${\n _scopeId\n }>${\n _ssrInterpolate(_unref(formatTimeAgo)(new Date(build.endTime)))\n }</span></div></button><div x-divider${\n _scopeId\n }></div><!--]-->`)\n })\n _push(`<!--]--><div flex=\"~ items-center justify-center wrap\" p4${_scopeId}>`)\n if (!_unref(info)?.isBuilding) {\n _push(_ssrRenderComponent(_component_NButton, {\n n: \"primary\",\n icon: \"carbon-edge-node\",\n onClick: ($event: any) => (start())\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Start a new build `)\n } else {\n return [\n _createTextVNode(\" Start a new build \")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n } else {\n _push(_ssrRenderComponent(_component_NButton, {\n n: \"primary\",\n icon: \"carbon-circle-dash animate-spin\",\n title: \"Open the output in the Terminals dock\",\n onClick: ($event: any) => (revealTerminal())\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Building... `)\n } else {\n return [\n _createTextVNode(\" Building... \")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n }\n _push(`</div></div>`)\n } else {\n return [\n _createVNode(\"div\", { flex: \"~ col\" }, [\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(_unref(info)?.builds, (build) => {\n return (_openBlock(), _createBlock(_Fragment, {\n key: build.slug\n }, [\n _createVNode(\"button\", {\n flex: \"~ col gap1\",\n p3: \"\",\n \"hover:bg-active\": \"\",\n class: build.slug === selected.value?.slug ? 'text-primary bg-active' : '',\n onClick: ($event: any) => (slug.value = build.slug)\n }, [\n _createVNode(\"code\", null, _toDisplayString(build.name), 1),\n _createVNode(\"div\", {\n flex: \"~ gap-1 items-center wrap\",\n \"w-full\": \"\",\n \"text-sm\": \"\",\n op60: \"\"\n }, [\n _createVNode(\"div\", { \"i-carbon-time\": \"\" }),\n _createVNode(\"span\", null, _toDisplayString(getDuration(build)), 1),\n _createVNode(\"div\", { \"flex-auto\": \"\" }),\n _createVNode(\"span\", null, _toDisplayString(_unref(formatTimeAgo)(new Date(build.endTime))), 1)\n ])\n ], 10, [\"onClick\"]),\n _createVNode(\"div\", { \"x-divider\": \"\" })\n ], 64))\n }), 128)),\n _createVNode(\"div\", {\n flex: \"~ items-center justify-center wrap\",\n p4: \"\"\n }, [\n (!_unref(info)?.isBuilding)\n ? (_openBlock(), _createBlock(_component_NButton, {\n key: 0,\n n: \"primary\",\n icon: \"carbon-edge-node\",\n onClick: ($event: any) => (start())\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Start a new build \")\n ]),\n _: 1\n }, 8, [\"onClick\"]))\n : (_openBlock(), _createBlock(_component_NButton, {\n key: 1,\n n: \"primary\",\n icon: \"carbon-circle-dash animate-spin\",\n title: \"Open the output in the Terminals dock\",\n onClick: ($event: any) => (revealTerminal())\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Building... \")\n ]),\n _: 1\n }, 8, [\"onClick\"]))\n ])\n ])\n ]\n }\n }),\n right: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n if (selected.value) {\n _push(_ssrRenderComponent(_component_BuildAnalyzeDetails, { current: selected.value }, null, _parent, _scopeId))\n } else {\n _push(_ssrRenderComponent(_component_NPanelGrids, null, null, _parent, _scopeId))\n }\n } else {\n return [\n (selected.value)\n ? (_openBlock(), _createBlock(_component_BuildAnalyzeDetails, {\n key: 0,\n current: selected.value\n }, null, 8, [\"current\"]))\n : (_openBlock(), _createBlock(_component_NPanelGrids, { key: 1 }))\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(_ssrRenderComponent(_unref(PromiseConfirm), null, {\n default: _withCtx(({ resolve }, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NDialog, {\n \"model-value\": true,\n onClose: ($event: any) => (resolve(false))\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div flex=\"~ col gap-1\" w-250 p4${\n _scopeId\n }><h3 class=\"text-lg font-medium leading-6\" mb2${\n _scopeId\n }> Start analyze build? </h3><p op50${\n _scopeId\n }> Enter the name of the build: </p>`)\n _push(_ssrRenderComponent(_component_NTextInput, {\n modelValue: buildNameInput.value,\n \"onUpdate:modelValue\": ($event: any) => ((buildNameInput).value = $event),\n placeholder: \"Build name\"\n }, null, _parent, _scopeId))\n if (buildNameConflicted.value) {\n _push(_ssrRenderComponent(_component_NTip, { \"n-orange\": \"\" }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` A build with the same name already exists, continue would overrides the previous build result. `)\n } else {\n return [\n _createTextVNode(\" A build with the same name already exists, continue would overrides the previous build result. \")\n ]\n }\n }),\n _: 2\n }, _parent, _scopeId))\n } else {\n _push(`<!---->`)\n }\n _push(`<div my3 x-divider${\n _scopeId\n }></div><p op50${\n _scopeId\n }> The following command will be executed in your terminal: </p>`)\n _push(_ssrRenderComponent(_component_NCodeBlock, {\n code: `npx nuxi analyze --no-serve --name=${buildNameInput.value}`,\n lang: \"bash\",\n px4: \"\",\n py2: \"\",\n border: \"~ base rounded\",\n lines: false\n }, null, _parent, _scopeId))\n _push(_ssrRenderComponent(_component_NCheckbox, {\n modelValue: shouldRevealTerminal.value,\n \"onUpdate:modelValue\": ($event: any) => ((shouldRevealTerminal).value = $event),\n mt2: \"\",\n n: \"primary\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Open the Terminals dock `)\n } else {\n return [\n _createTextVNode(\" Open the Terminals dock \")\n ]\n }\n }),\n _: 2\n }, _parent, _scopeId))\n _push(`<div flex=\"~ gap-3\" mt2 justify-end${_scopeId}>`)\n _push(_ssrRenderComponent(_component_NButton, {\n onClick: ($event: any) => (resolve(false))\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Cancel `)\n } else {\n return [\n _createTextVNode(\" Cancel \")\n ]\n }\n }),\n _: 2\n }, _parent, _scopeId))\n _push(_ssrRenderComponent(_component_NButton, {\n n: \"solid primary\",\n onClick: ($event: any) => (resolve(true))\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Start `)\n } else {\n return [\n _createTextVNode(\" Start \")\n ]\n }\n }),\n _: 2\n }, _parent, _scopeId))\n _push(`</div></div>`)\n } else {\n return [\n _createVNode(\"div\", {\n flex: \"~ col gap-1\",\n \"w-250\": \"\",\n p4: \"\"\n }, [\n _createVNode(\"h3\", {\n class: \"text-lg font-medium leading-6\",\n mb2: \"\"\n }, \" Start analyze build? \"),\n _createVNode(\"p\", { op50: \"\" }, \" Enter the name of the build: \"),\n _createVNode(_component_NTextInput, {\n modelValue: buildNameInput.value,\n \"onUpdate:modelValue\": ($event: any) => ((buildNameInput).value = $event),\n placeholder: \"Build name\"\n }, null, 8, [\"modelValue\", \"onUpdate:modelValue\"]),\n (buildNameConflicted.value)\n ? (_openBlock(), _createBlock(_component_NTip, {\n key: 0,\n \"n-orange\": \"\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" A build with the same name already exists, continue would overrides the previous build result. \")\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n _createVNode(\"div\", {\n my3: \"\",\n \"x-divider\": \"\"\n }),\n _createVNode(\"p\", { op50: \"\" }, \" The following command will be executed in your terminal: \"),\n _createVNode(_component_NCodeBlock, {\n code: `npx nuxi analyze --no-serve --name=${buildNameInput.value}`,\n lang: \"bash\",\n px4: \"\",\n py2: \"\",\n border: \"~ base rounded\",\n lines: false\n }, null, 8, [\"code\"]),\n _createVNode(_component_NCheckbox, {\n modelValue: shouldRevealTerminal.value,\n \"onUpdate:modelValue\": ($event: any) => ((shouldRevealTerminal).value = $event),\n mt2: \"\",\n n: \"primary\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Open the Terminals dock \")\n ]),\n _: 1\n }, 8, [\"modelValue\", \"onUpdate:modelValue\"]),\n _createVNode(\"div\", {\n flex: \"~ gap-3\",\n mt2: \"\",\n \"justify-end\": \"\"\n }, [\n _createVNode(_component_NButton, {\n onClick: ($event: any) => (resolve(false))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Cancel \")\n ]),\n _: 1\n }, 8, [\"onClick\"]),\n _createVNode(_component_NButton, {\n n: \"solid primary\",\n onClick: ($event: any) => (resolve(true))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Start \")\n ]),\n _: 1\n }, 8, [\"onClick\"])\n ])\n ])\n ]\n }\n }),\n _: 2\n }, _parent, _scopeId))\n } else {\n return [\n _createVNode(_component_NDialog, {\n \"model-value\": true,\n onClose: ($event: any) => (resolve(false))\n }, {\n default: _withCtx(() => [\n _createVNode(\"div\", {\n flex: \"~ col gap-1\",\n \"w-250\": \"\",\n p4: \"\"\n }, [\n _createVNode(\"h3\", {\n class: \"text-lg font-medium leading-6\",\n mb2: \"\"\n }, \" Start analyze build? \"),\n _createVNode(\"p\", { op50: \"\" }, \" Enter the name of the build: \"),\n _createVNode(_component_NTextInput, {\n modelValue: buildNameInput.value,\n \"onUpdate:modelValue\": ($event: any) => ((buildNameInput).value = $event),\n placeholder: \"Build name\"\n }, null, 8, [\"modelValue\", \"onUpdate:modelValue\"]),\n (buildNameConflicted.value)\n ? (_openBlock(), _createBlock(_component_NTip, {\n key: 0,\n \"n-orange\": \"\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" A build with the same name already exists, continue would overrides the previous build result. \")\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n _createVNode(\"div\", {\n my3: \"\",\n \"x-divider\": \"\"\n }),\n _createVNode(\"p\", { op50: \"\" }, \" The following command will be executed in your terminal: \"),\n _createVNode(_component_NCodeBlock, {\n code: `npx nuxi analyze --no-serve --name=${buildNameInput.value}`,\n lang: \"bash\",\n px4: \"\",\n py2: \"\",\n border: \"~ base rounded\",\n lines: false\n }, null, 8, [\"code\"]),\n _createVNode(_component_NCheckbox, {\n modelValue: shouldRevealTerminal.value,\n \"onUpdate:modelValue\": ($event: any) => ((shouldRevealTerminal).value = $event),\n mt2: \"\",\n n: \"primary\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Open the Terminals dock \")\n ]),\n _: 1\n }, 8, [\"modelValue\", \"onUpdate:modelValue\"]),\n _createVNode(\"div\", {\n flex: \"~ gap-3\",\n mt2: \"\",\n \"justify-end\": \"\"\n }, [\n _createVNode(_component_NButton, {\n onClick: ($event: any) => (resolve(false))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Cancel \")\n ]),\n _: 1\n }, 8, [\"onClick\"]),\n _createVNode(_component_NButton, {\n n: \"solid primary\",\n onClick: ($event: any) => (resolve(true))\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Start \")\n ]),\n _: 1\n }, 8, [\"onClick\"])\n ])\n ])\n ]),\n _: 2\n }, 1032, [\"onClose\"])\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(_ssrRenderComponent(_component_HelpFab, null, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_DocsAnalyzeBuild, null, null, _parent, _scopeId))\n } else {\n return [\n _createVNode(_component_DocsAnalyzeBuild)\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(`<!--]-->`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { AnalyzeBuildMeta } from '~/../src/types'\nimport { createTemplatePromise, formatTimeAgo } from '@vueuse/core'\nimport { computed, ref } from 'vue'\nimport { definePageMeta } from '#imports'\nimport { satisfyNuxtVersion } from '~/composables/npm'\nimport { rpc } from '~/composables/rpc'\nimport { useAnalyzeBuildInfo } from '~/composables/state'\nimport { registerCommands } from '~/composables/state-commands'\nimport { telemetry } from '~/composables/telemetry'\nimport { useSessionState } from '~/composables/utils'\n\ndefinePageMeta({\n icon: 'carbon-edge-node',\n title: 'Build Analyze',\n layout: 'full',\n category: 'analyze',\n show() {\n return satisfyNuxtVersion('^3.5.0')\n },\n})\n\nconst PromiseConfirm = createTemplatePromise<boolean>()\n\nconst info = useAnalyzeBuildInfo()\nconst slug = useSessionState<string>('analyze-build:slug', '')\n\nconst selected = computed(() => info.value?.builds.find(b => b.slug === slug.value) ?? info.value?.builds[0])\n\nconst shouldRevealTerminal = ref(false)\n\nconst buildNameInput = ref('')\nconst buildNameConflicted = computed(() => info.value?.builds.some(b => b.name === buildNameInput.value.trim()))\nasync function start() {\n buildNameInput.value = await rpc.generateAnalyzeBuildName()\n\n if (!await PromiseConfirm.start())\n return\n\n telemetry('analyze-build:start')\n\n // `startAnalyzeBuild` refreshes `getAnalyzeBuildInfo` as soon as the session\n // registers, so `info.isBuilding` / `info.activeSessionId` drive the UI. It\n // also returns the id so we can reveal the dock immediately.\n const sessionId = await rpc.startAnalyzeBuild(buildNameInput.value)\n if (shouldRevealTerminal.value)\n rpc.revealTerminal(sessionId)\n}\n\nfunction getDuration(build: AnalyzeBuildMeta) {\n return `${((build.endTime - build.startTime) / 1000).toFixed(1)}s`\n}\n\nfunction revealTerminal() {\n if (info.value?.activeSessionId)\n rpc.revealTerminal(info.value.activeSessionId)\n}\n\nregisterCommands(() => [\n {\n id: 'action:analyze-build: start',\n title: 'Start a new analyze build',\n icon: 'i-carbon-edge-node',\n action: start,\n },\n])\n</script>\n\n<template>\n <NSplitPane :left-size=\"30\">\n <template #left>\n <div flex=\"~ col\">\n <template v-for=\"build of info?.builds\" :key=\"build.slug\">\n <button\n flex=\"~ col gap1\" p3 hover:bg-active\n :class=\"build.slug === selected?.slug ? 'text-primary bg-active' : ''\"\n @click=\"slug = build.slug\"\n >\n <code>{{ build.name }}</code>\n <div flex=\"~ gap-1 items-center wrap\" w-full text-sm op60>\n <div i-carbon-time />\n <span>{{ getDuration(build) }}</span>\n <div flex-auto />\n <span>{{ formatTimeAgo(new Date(build.endTime)) }}</span>\n </div>\n </button>\n <div x-divider />\n </template>\n <div flex=\"~ items-center justify-center wrap\" p4>\n <NButton v-if=\"!info?.isBuilding\" n=\"primary\" icon=\"carbon-edge-node\" @click=\"start()\">\n Start a new build\n </NButton>\n <NButton v-else n=\"primary\" icon=\"carbon-circle-dash animate-spin\" title=\"Open the output in the Terminals dock\" @click=\"revealTerminal()\">\n Building...\n </NButton>\n </div>\n </div>\n </template>\n <template #right>\n <BuildAnalyzeDetails v-if=\"selected\" :current=\"selected\" />\n <NPanelGrids v-else />\n </template>\n </NSplitPane>\n\n <PromiseConfirm v-slot=\"{ resolve }\">\n <NDialog :model-value=\"true\" @close=\"resolve(false)\">\n <div flex=\"~ col gap-1\" w-250 p4>\n <h3 class=\"text-lg font-medium leading-6\" mb2>\n Start analyze build?\n </h3>\n <p op50>\n Enter the name of the build:\n </p>\n <NTextInput\n v-model=\"buildNameInput\"\n placeholder=\"Build name\"\n />\n <NTip v-if=\"buildNameConflicted\" n-orange>\n A build with the same name already exists, continue would overrides the previous build result.\n </NTip>\n <div my3 x-divider />\n <p op50>\n The following command will be executed in your terminal:\n </p>\n <NCodeBlock\n :code=\"`npx nuxi analyze --no-serve --name=${buildNameInput}`\"\n lang=\"bash\" px4 py2 border=\"~ base rounded\"\n :lines=\"false\"\n />\n <NCheckbox v-model=\"shouldRevealTerminal\" mt2 n=\"primary\">\n Open the Terminals dock\n </NCheckbox>\n\n <div flex=\"~ gap-3\" mt2 justify-end>\n <NButton @click=\"resolve(false)\">\n Cancel\n </NButton>\n <NButton n=\"solid primary\" @click=\"resolve(true)\">\n Start\n </NButton>\n </div>\n </div>\n </NDialog>\n </PromiseConfirm>\n\n <HelpFab>\n <DocsAnalyzeBuild />\n </HelpFab>\n</template>\n"],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"assets-6seYEHqs.js","mappings":";;;;;;;;;;;;;;;;AAYA,IAAA,4DAA4B,8BAAiB;CAC3C,QAAQ;CACR,mBAAmB;CACnB,OAAO;EACP,YAAY;GACV,MAAM;GACN,UAAU;EACZ;EACA,QAAQ;GACN,MAAM;GACN,UAAU;EACZ;CACF;CACE,MAAM,SAAS;EAEjB,MAAM,QAAQ;EAEd,MAAM,cAAc;EAEpB,MAAM,UAAU,UAAU,OAAO,YAAY;EAC7C,MAAM,aAAa,IAAI;EAEvB,MAAM,QAAQ,IAAY,CAAC,CAAC;EAE5B,SAAS,YAAY,GAAc;GACjC,WAAW,QAAQ,EAAE;GACrB,QAAQ,QAAQ;EAClB;EACA,SAAS,YAAY,GAAc;GACjC,IAAI,EAAE,WAAW,WAAW,OAC1B,QAAQ,QAAQ;EACpB;EACA,SAAS,WAAW,GAAc;GAChC,EAAE,eAAe;EACnB;EAEA,SAAS,OAAO,GAAc;GAC5B,EAAE,eAAe;GACjB,SAAS,EAAE,aAAc,KAAK;EAChC;EAEA,SAAS,SAAS,MAAuB;GACvC,MAAM,aAAa,CAAC,GAAG,QAAQ,CAAC,CAAC;GACjC,IAAI,WAAW,QAAQ;IACrB,MAAM,WAAmB,CAAC;IAC1B,MAAM,oBAA8B,MAAM,MAAM,KAAI,SAAQ,KAAK,IAAI;IACrE,KAAK,MAAM,QAAQ,YACjB,IAAI,kBAAkB,SAAS,KAAK,IAAI,GAAG;KACzC,IAAI,IAAI;KACR,MAAM,CAAC,MAAM,OAAO,KAAK,KAAK,MAAM,GAAG;KACvC,OAAO,kBAAkB,SAAS,GAAG,KAAK,IAAI,EAAE,IAAI,KAAK,GACvD;KACF,MAAM,cAAc,GAAG,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AG;IACD,SAAS,SAAU,GAAG,OAAO,SAAS,aAAa;KACjD,IAAI,OAAO;MACT,IAAI,SAAS,OACX,MAAM,mBAAoB,yBAAyB;OACjD,YAAY,SAAS;OACrB,wBAAwB,WAAiB,SAAW,QAAQ;MAC9D,GAAG,MAAM,SAAS,QAAQ,CAAC;WAE3B,MAAM,SAAS;KAEnB,OACE,OAAO,CACJ,SAAS,SACL,UAAW,GAAG,YAAa,yBAAyB;MACnD,KAAK;MACL,YAAY,SAAS;MACrB,wBAAwB,WAAiB,SAAW,QAAQ;KAC9D,GAAG,MAAM,GAAG,CAAC,cAAc,qBAAqB,CAAC,KACjD,mBAAoB,IAAI,IAAI,CAClC;IAEJ,CAAC;IACD,GAAG;GACL,GAAG,OAAO,CAAC;GACX,MAAM,QAAQ;EAChB;CACA;AAEA,CAAC","names":[],"sources":["../../../../../../../../components/AssetDropZone.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/AssetDropZone.vue","../../../../../../../../components/AssetFontPreview.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/AssetFontPreview.vue","../../../../../../../../components/AssetPreview.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/AssetPreview.vue","../../../../../../../../components/AssetGridItem.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/AssetGridItem.vue","../../../../../../../../components/AssetListItem.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/AssetListItem.vue","../../../../../../../../components/AssetDetails.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/AssetDetails.vue","../../../../../../../../pages/modules/assets.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../pages/modules/assets.vue"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveComponent as _resolveComponent, resolveDirective as _resolveDirective, mergeProps as _mergeProps, withCtx as _withCtx, createVNode as _createVNode, createTextVNode as _createTextVNode } from \"vue\"\nimport { ssrGetDirectiveProps as _ssrGetDirectiveProps, ssrRenderComponent as _ssrRenderComponent, ssrRenderAttr as _ssrRenderAttr, ssrRenderAttrs as _ssrRenderAttrs, ssrRenderList as _ssrRenderList } from \"vue/server-renderer\"\n\nimport type { AssetEntry } from '~/../src/types'\nimport { useEventListener, useVModel } from '@vueuse/core'\nimport { ref } from 'vue'\nimport { devtoolsUiShowNotification } from '#imports'\nimport { rpc, wsConnecting, wsError } from '~/composables/rpc'\nimport { telemetry } from '~/composables/telemetry'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'AssetDropZone',\n __ssrInlineRender: true,\n props: {\n modelValue: {\n type: Boolean,\n required: true,\n },\n folder: {\n type: String,\n required: true,\n },\n},\n setup(__props) {\n\nconst props = __props\n\nconst FILE_EXT_RE = /\\.\\w+$/\n\nconst visible = useVModel(props, 'modelValue')\nconst lastTarget = ref()\n\nconst files = ref<File[]>([])\n\nfunction onDragEnter(e: DragEvent) {\n lastTarget.value = e.target\n visible.value = true\n}\nfunction onDragLeave(e: DragEvent) {\n if (e.target === lastTarget.value)\n visible.value = false\n}\nfunction onDragOver(e: DragEvent) {\n e.preventDefault()\n}\n\nfunction onDrop(e: DragEvent) {\n e.preventDefault()\n setFiles(e.dataTransfer!.files)\n}\n\nfunction setFiles(data: FileList | null) {\n const inputFiles = [...data || []]\n if (inputFiles.length) {\n const newFiles: File[] = []\n const existingFileNames: string[] = files.value.map(file => file.name)\n for (const file of inputFiles) {\n if (existingFileNames.includes(file.name)) {\n let i = 1\n const [name, ext] = file.name.split('.')\n while (existingFileNames.includes(`${name} (${i}).${ext}`))\n i++\n const newFilename = `${name}-${i}.${ext}`\n const blob = new Blob([file], { type: file.type })\n const newFile = new File([blob], newFilename, { lastModified: Date.now() })\n newFiles.push(newFile)\n existingFileNames.push(newFilename)\n }\n else {\n if (file.type === '') {\n devtoolsUiShowNotification({\n message: 'Folders are not supported yet',\n icon: 'carbon:face-dissatisfied',\n classes: 'text-orange',\n })\n }\n newFiles.push(file)\n }\n }\n files.value = [...files.value, ...newFiles]\n }\n}\n\nasync function uploadFiles() {\n if (wsConnecting.value || wsError.value)\n return\n\n telemetry('assets:upload')\n\n const uploadFiles: AssetEntry[] = []\n for (const file of files.value) {\n const reader = new FileReader()\n reader.readAsDataURL(file)\n const result = await new Promise((resolve) => {\n reader.onload = () => resolve(reader.result as string)\n }) as string\n // TODO: add validation\n const content = result.split(';base64,').pop() as string\n uploadFiles.push({\n path: file.name,\n encoding: 'base64',\n content,\n })\n }\n await rpc.writeStaticAssets([...uploadFiles], props.folder).then(() => {\n close()\n devtoolsUiShowNotification({\n message: 'Files uploaded successfully!',\n icon: 'i-carbon:checkmark',\n })\n }).catch((error) => {\n close()\n devtoolsUiShowNotification({\n message: `Error uploading files: ${error?.message ?? 'unknown'}`,\n icon: 'i-carbon-warning',\n classes: 'text-red',\n })\n })\n visible.value = false\n}\n\nfunction removeFile(index: number) {\n files.value?.splice(index, 1)\n}\n\nfunction blobIt(file: File) {\n return URL.createObjectURL(file)\n}\n\nfunction changeName(file: File, newName: string) {\n const [name, ext] = file.name.split('.')\n const baseName = newName.replace(FILE_EXT_RE, '')\n const newFileName = `${baseName}.${ext}`\n if (baseName.length === 0) {\n // TODO: with proper dialog\n // eslint-disable-next-line no-alert\n alert('File name must be at least 1 characters long')\n return name\n }\n Object.defineProperty(file, 'name', { value: newFileName, writable: false })\n files.value.splice(files.value.indexOf(file), 1, file)\n return file\n}\n\nfunction clearFiles() {\n files.value = []\n}\n\nfunction close() {\n visible.value = false\n clearFiles()\n}\n\nuseEventListener('dragenter', onDragEnter)\nuseEventListener('dragleave', onDragLeave)\nuseEventListener('dragover', onDragOver)\nuseEventListener('drop', onDrop)\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NButton = _resolveComponent(\"NButton\")!\n const _component_NIcon = _resolveComponent(\"NIcon\")!\n const _component_NTextInput = _resolveComponent(\"NTextInput\")!\n const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n _push(`<div${_ssrRenderAttrs(_mergeProps({\n fixed: \"\",\n \"bottom-0\": \"\",\n \"left-13\": \"\",\n \"right-0\": \"\",\n \"top-0\": \"\",\n \"z-10\": \"\",\n \"backdrop-blur-20\": \"\",\n \"transition-all\": \"\",\n class: _unref(visible) ? 'opacity-100 visible' : 'opacity-0 invisible'\n }, _attrs))}>`)\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n icon: \"carbon-close\",\n title: \"Close\",\n absolute: \"\",\n \"right-5\": \"\",\n \"top-5\": \"\",\n \"z-20\": \"\",\n \"text-xl\": \"\",\n border: false,\n onClick: close\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Close', void 0, { \"bottom-end\": true })), null, _parent))\n if (!files.value?.length) {\n _push(`<div h-full w-full flex items-center justify-center><label for=\"drop-zone-input\" text-3xl hover=\"text-green cursor-pointer\" transition-all>`)\n _push(_ssrRenderComponent(_component_NIcon, {\n icon: \"carbon-cloud-upload\",\n \"mr-2\": \"\"\n }, null, _parent))\n _push(` Drop files here or click to select </label><input id=\"drop-zone-input\" type=\"file\" multiple hidden></div>`)\n } else {\n _push(`<div relative h-full w-full grid=\"~ rows-[max-content_1fr_max-content]\"><div px6 py6><h1 text-2xl> Upload </h1><p text-sm op50> Drag and drop files to upload </p></div><div grid=\"~ cols-minmax-8rem gap-8\" overflow-auto p6><!--[-->`)\n _ssrRenderList(files.value, (file, index) => {\n _push(`<div flex=\"~ col gap-2\" relative h-50 w-40 items-center><div flex items-center justify-center of-hidden rounded rounded-t-lg bg-active object-cover class=\"aspect-1/1\" border=\"~ base\"><img h-full w-full rounded-t-lg object-cover${_ssrRenderAttr(\"src\", blobIt(file))}></div><div flex=\"~ gap1\" items-center>`)\n _push(_ssrRenderComponent(_component_NTextInput, {\n n: \"xs\",\n \"h-full\": \"\",\n \"flex-auto\": \"\",\n \"model-value\": file.name,\n \"onUpdate:modelValue\": ($event: any) => (changeName(file, (($event as any).target as HTMLInputElement).value))\n }, null, _parent))\n _push(_ssrRenderComponent(_component_NButton, {\n n: \"red\",\n icon: \"carbon-trash-can\",\n \"h-full\": \"\",\n \"flex-none\": \"\",\n title: \"Remove file\",\n onClick: ($event: any) => (removeFile(index))\n }, null, _parent))\n _push(`</div></div>`)\n })\n _push(`<!--]--></div><div flex=\"~ gap-2\" items-center justify-center p8>`)\n if (files.value.length) {\n _push(_ssrRenderComponent(_component_NButton, {\n n: \"red\",\n onClick: clearFiles\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NIcon, { icon: \"carbon-clean\" }, null, _parent, _scopeId))\n _push(` Clear `)\n } else {\n return [\n _createVNode(_component_NIcon, { icon: \"carbon-clean\" }),\n _createTextVNode(\" Clear \")\n ]\n }\n }),\n _: 1\n }, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(_ssrRenderComponent(_component_NButton, {\n disabled: !files.value.length,\n n: \"primary solid\",\n onClick: uploadFiles\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NIcon, { icon: \"carbon-cloud-upload\" }, null, _parent, _scopeId))\n _push(` Upload `)\n } else {\n return [\n _createVNode(_component_NIcon, { icon: \"carbon-cloud-upload\" }),\n _createTextVNode(\" Upload \")\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(`</div></div>`)\n }\n _push(`</div>`)\n}\n}\n\n})","<script lang=\"ts\" setup>\nimport type { AssetEntry } from '~/../src/types'\nimport { useEventListener, useVModel } from '@vueuse/core'\nimport { ref } from 'vue'\nimport { devtoolsUiShowNotification } from '#imports'\nimport { rpc, wsConnecting, wsError } from '~/composables/rpc'\nimport { telemetry } from '~/composables/telemetry'\n\nconst props = defineProps({\n modelValue: {\n type: Boolean,\n required: true,\n },\n folder: {\n type: String,\n required: true,\n },\n})\n\nconst FILE_EXT_RE = /\\.\\w+$/\n\nconst visible = useVModel(props, 'modelValue')\nconst lastTarget = ref()\n\nconst files = ref<File[]>([])\n\nfunction onDragEnter(e: DragEvent) {\n lastTarget.value = e.target\n visible.value = true\n}\nfunction onDragLeave(e: DragEvent) {\n if (e.target === lastTarget.value)\n visible.value = false\n}\nfunction onDragOver(e: DragEvent) {\n e.preventDefault()\n}\n\nfunction onDrop(e: DragEvent) {\n e.preventDefault()\n setFiles(e.dataTransfer!.files)\n}\n\nfunction setFiles(data: FileList | null) {\n const inputFiles = [...data || []]\n if (inputFiles.length) {\n const newFiles: File[] = []\n const existingFileNames: string[] = files.value.map(file => file.name)\n for (const file of inputFiles) {\n if (existingFileNames.includes(file.name)) {\n let i = 1\n const [name, ext] = file.name.split('.')\n while (existingFileNames.includes(`${name} (${i}).${ext}`))\n i++\n const newFilename = `${name}-${i}.${ext}`\n const blob = new Blob([file], { type: file.type })\n const newFile = new File([blob], newFilename, { lastModified: Date.now() })\n newFiles.push(newFile)\n existingFileNames.push(newFilename)\n }\n else {\n if (file.type === '') {\n devtoolsUiShowNotification({\n message: 'Folders are not supported yet',\n icon: 'carbon:face-dissatisfied',\n classes: 'text-orange',\n })\n }\n newFiles.push(file)\n }\n }\n files.value = [...files.value, ...newFiles]\n }\n}\n\nasync function uploadFiles() {\n if (wsConnecting.value || wsError.value)\n return\n\n telemetry('assets:upload')\n\n const uploadFiles: AssetEntry[] = []\n for (const file of files.value) {\n const reader = new FileReader()\n reader.readAsDataURL(file)\n const result = await new Promise((resolve) => {\n reader.onload = () => resolve(reader.result as string)\n }) as string\n // TODO: add validation\n const content = result.split(';base64,').pop() as string\n uploadFiles.push({\n path: file.name,\n encoding: 'base64',\n content,\n })\n }\n await rpc.writeStaticAssets([...uploadFiles], props.folder).then(() => {\n close()\n devtoolsUiShowNotification({\n message: 'Files uploaded successfully!',\n icon: 'i-carbon:checkmark',\n })\n }).catch((error) => {\n close()\n devtoolsUiShowNotification({\n message: `Error uploading files: ${error?.message ?? 'unknown'}`,\n icon: 'i-carbon-warning',\n classes: 'text-red',\n })\n })\n visible.value = false\n}\n\nfunction removeFile(index: number) {\n files.value?.splice(index, 1)\n}\n\nfunction blobIt(file: File) {\n return URL.createObjectURL(file)\n}\n\nfunction changeName(file: File, newName: string) {\n const [name, ext] = file.name.split('.')\n const baseName = newName.replace(FILE_EXT_RE, '')\n const newFileName = `${baseName}.${ext}`\n if (baseName.length === 0) {\n // TODO: with proper dialog\n // eslint-disable-next-line no-alert\n alert('File name must be at least 1 characters long')\n return name\n }\n Object.defineProperty(file, 'name', { value: newFileName, writable: false })\n files.value.splice(files.value.indexOf(file), 1, file)\n return file\n}\n\nfunction clearFiles() {\n files.value = []\n}\n\nfunction close() {\n visible.value = false\n clearFiles()\n}\n\nuseEventListener('dragenter', onDragEnter)\nuseEventListener('dragleave', onDragLeave)\nuseEventListener('dragover', onDragOver)\nuseEventListener('drop', onDrop)\n</script>\n\n<template>\n <div\n fixed bottom-0 left-13 right-0 top-0 z-10 backdrop-blur-20 transition-all\n :class=\"visible ? 'opacity-100 visible' : 'opacity-0 invisible'\"\n >\n <NButton\n v-tooltip.bottom-end=\"'Close'\"\n icon=\"carbon-close\"\n title=\"Close\"\n absolute right-5 top-5 z-20 text-xl\n :border=\"false\"\n @click=\"close\"\n />\n <div v-if=\"!files?.length\" h-full w-full flex items-center justify-center>\n <label for=\"drop-zone-input\" text-3xl hover=\"text-green cursor-pointer\" transition-all>\n <NIcon icon=\"carbon-cloud-upload\" mr-2 /> Drop files here or click to select\n </label>\n <input\n id=\"drop-zone-input\" type=\"file\" multiple hidden\n @change=\"setFiles(($event.target as HTMLInputElement).files)\"\n >\n </div>\n <div v-else relative h-full w-full grid=\"~ rows-[max-content_1fr_max-content]\">\n <div px6 py6>\n <h1 text-2xl>\n Upload\n </h1>\n <p text-sm op50>\n Drag and drop files to upload\n </p>\n </div>\n <div grid=\"~ cols-minmax-8rem gap-8\" overflow-auto p6>\n <div\n v-for=\"file, index of files\" :key=\"file.name\"\n flex=\"~ col gap-2\" relative h-50 w-40 items-center\n >\n <div\n flex items-center justify-center of-hidden rounded rounded-t-lg bg-active object-cover\n class=\"aspect-1/1\" border=\"~ base\"\n >\n <img h-full w-full rounded-t-lg object-cover :src=\"blobIt(file)\">\n </div>\n <div flex=\"~ gap1\" items-center>\n <NTextInput\n n=\"xs\"\n h-full flex-auto\n :model-value=\"file.name\"\n @update:model-value=\"changeName(file, (($event as any).target as HTMLInputElement).value)\"\n />\n <NButton\n n=\"red\"\n icon=\"carbon-trash-can\"\n h-full flex-none\n title=\"Remove file\"\n @click=\"removeFile(index)\"\n />\n </div>\n </div>\n </div>\n <div flex=\"~ gap-2\" items-center justify-center p8>\n <NButton v-if=\"files.length\" n=\"red\" @click=\"clearFiles\">\n <NIcon icon=\"carbon-clean\" /> Clear\n </NButton>\n <NButton :disabled=\"!files.length\" n=\"primary solid\" @click=\"uploadFiles\">\n <NIcon icon=\"carbon-cloud-upload\" /> Upload\n </NButton>\n </div>\n </div>\n </div>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { mergeProps as _mergeProps } from \"vue\"\nimport { ssrRenderAttrs as _ssrRenderAttrs } from \"vue/server-renderer\"\n\nimport type { AssetInfo } from '~/../src/types'\nimport { useStyleTag } from '@vueuse/core'\nimport { hash } from 'devframe/utils/hash'\nimport { computed } from 'vue'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'AssetFontPreview',\n __ssrInlineRender: true,\n props: {\n asset: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst id = computed(() => `devtools-assets-${hash(props.asset)}`)\n\nuseStyleTag(computed(() => `\n @font-face {\n font-family: '${id.value}';\n src: url('${props.asset.publicPath}');\n }\n`))\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n _push(`<div${_ssrRenderAttrs(_mergeProps({\n \"of-hidden\": \"\",\n style: { fontFamily: `'${id.value}'` }\n }, _attrs))}> 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 </div>`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { AssetInfo } from '~/../src/types'\nimport { useStyleTag } from '@vueuse/core'\nimport { hash } from 'devframe/utils/hash'\nimport { computed } from 'vue'\n\nconst props = defineProps<{\n asset: AssetInfo\n}>()\n\nconst id = computed(() => `devtools-assets-${hash(props.asset)}`)\n\nuseStyleTag(computed(() => `\n @font-face {\n font-family: '${id.value}';\n src: url('${props.asset.publicPath}');\n }\n`))\n</script>\n\n<template>\n <div of-hidden :style=\"{ fontFamily: `'${id}'` }\">\n 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\n </div>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, mergeProps as _mergeProps } from \"vue\"\nimport { ssrRenderAttr as _ssrRenderAttr, ssrRenderComponent as _ssrRenderComponent, ssrIncludeBooleanAttr as _ssrIncludeBooleanAttr, ssrRenderAttrs as _ssrRenderAttrs, ssrInterpolate as _ssrInterpolate } from \"vue/server-renderer\"\n\nimport type { AssetInfo } from '~/../src/types'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'AssetPreview',\n __ssrInlineRender: true,\n props: {\n asset: {},\n textContent: {},\n detail: { type: Boolean }\n },\n setup(__props: any) {\n\n\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_AssetFontPreview = _resolveComponent(\"AssetFontPreview\")!\n\n _push(`<div${_ssrRenderAttrs(_mergeProps({\n flex: \"\",\n \"items-center\": \"\",\n \"justify-center\": \"\",\n \"of-hidden\": \"\",\n \"bg-active\": \"\",\n \"object-cover\": \"\",\n p1: \"\"\n }, _attrs))}>`)\n if (__props.asset.type === 'image') {\n _push(`<img${_ssrRenderAttr(\"src\", __props.asset.publicPath)}>`)\n } else if (__props.asset.type === 'font') {\n _push(_ssrRenderComponent(_component_AssetFontPreview, {\n key: __props.asset.publicPath,\n asset: __props.asset,\n \"self-stretch\": \"\",\n p2: \"\",\n \"text-2xl\": \"\"\n }, null, _parent))\n } else if (__props.asset.type === 'text' && !__props.textContent) {\n _push(`<div i-carbon-document text-3xl op20></div>`)\n } else if (__props.asset.type === 'text' && __props.textContent) {\n _push(`<div w-full self-start p4><pre max-h-10rem of-hidden text-xs font-mono>${_ssrInterpolate(__props.textContent)}</pre></div>`)\n } else if (__props.asset.type === 'video') {\n _push(`<div><video${\n _ssrRenderAttr(\"src\", __props.asset.publicPath)\n }${\n (_ssrIncludeBooleanAttr(__props.detail)) ? \" autoplay\" : \"\"\n }${\n (_ssrIncludeBooleanAttr(__props.detail)) ? \" controls\" : \"\"\n }></video></div>`)\n } else if (__props.asset.type === 'audio') {\n _push(`<div>`)\n if (!__props.detail) {\n _push(`<div i-carbon-volume-up text-3xl op20></div>`)\n } else {\n _push(`<audio${_ssrRenderAttr(\"src\", __props.asset.publicPath)} controls></audio>`)\n }\n _push(`</div>`)\n } else {\n _push(`<div i-carbon-help text-3xl op20></div>`)\n }\n _push(`</div>`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { AssetInfo } from '~/../src/types'\n\ndefineProps<{\n asset: AssetInfo\n textContent?: string\n detail?: boolean\n}>()\n</script>\n\n<template>\n <div flex items-center justify-center of-hidden bg-active object-cover p1>\n <template v-if=\"asset.type === 'image'\">\n <img :src=\"asset.publicPath\">\n </template>\n <AssetFontPreview\n v-else-if=\"asset.type === 'font'\"\n :key=\"asset.publicPath\"\n :asset=\"asset\" self-stretch p2 text-2xl\n />\n <div v-else-if=\"asset.type === 'text' && !textContent\" i-carbon-document text-3xl op20 />\n <div v-else-if=\"asset.type === 'text' && textContent\" w-full self-start p4>\n <pre max-h-10rem of-hidden text-xs font-mono v-text=\"textContent\" />\n </div>\n <div v-else-if=\"asset.type === 'video'\">\n <video :src=\"asset.publicPath\" :autoplay=\"detail\" :controls=\"detail\" />\n </div>\n <div v-else-if=\"asset.type === 'audio'\">\n <div v-if=\"!detail\" i-carbon-volume-up text-3xl op20 />\n <audio v-else :src=\"asset.publicPath\" controls />\n </div>\n <div v-else i-carbon-help text-3xl op20 />\n </div>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, mergeProps as _mergeProps } from \"vue\"\nimport { ssrRenderComponent as _ssrRenderComponent, ssrRenderAttrs as _ssrRenderAttrs, ssrInterpolate as _ssrInterpolate } from \"vue/server-renderer\"\n\nimport type { AssetInfo } from '~/../src/types'\nimport { computed } from 'vue'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'AssetGridItem',\n __ssrInlineRender: true,\n props: {\n asset: {},\n folder: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst path = computed(() => {\n if (props.folder && props.asset.path.startsWith(props.folder))\n return props.asset.path.slice(props.folder.length)\n return props.asset.path\n})\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NIcon = _resolveComponent(\"NIcon\")!\n const _component_AssetPreview = _resolveComponent(\"AssetPreview\")!\n\n _push(`<button${_ssrRenderAttrs(_mergeProps({\n relative: \"\",\n flex: \"~ col gap-1\",\n hover: \"bg-active\",\n \"items-center\": \"\",\n \"of-hidden\": \"\",\n rounded: \"\",\n p2: \"\"\n }, _attrs))}>`)\n if (__props.asset.layer) {\n _push(_ssrRenderComponent(_component_NIcon, {\n icon: \"i-carbon-layers\",\n absolute: \"\",\n \"right-4\": \"\",\n \"top-4\": \"\",\n \"bg-primary\": \"\"\n }, null, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(_ssrRenderComponent(_component_AssetPreview, {\n \"h-30\": \"\",\n \"w-30\": \"\",\n rounded: \"\",\n border: \"~ base\",\n asset: __props.asset\n }, null, _parent))\n _push(`<div w-full of-hidden truncate ws-nowrap text-center text-xs>${_ssrInterpolate(path.value)}</div></button>`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { AssetInfo } from '~/../src/types'\nimport { computed } from 'vue'\n\nconst props = defineProps<{\n asset: AssetInfo\n folder?: string\n}>()\n\nconst path = computed(() => {\n if (props.folder && props.asset.path.startsWith(props.folder))\n return props.asset.path.slice(props.folder.length)\n return props.asset.path\n})\n</script>\n\n<template>\n <button relative flex=\"~ col gap-1\" hover=\"bg-active\" items-center of-hidden rounded p2>\n <NIcon v-if=\"asset.layer\" icon=\"i-carbon-layers\" absolute right-4 top-4 bg-primary />\n <AssetPreview h-30 w-30 rounded border=\"~ base\" :asset=\"asset\" />\n <div w-full of-hidden truncate ws-nowrap text-center text-xs>\n {{ path }}\n </div>\n </button>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveComponent as _resolveComponent, isRef as _isRef } from \"vue\"\nimport { ssrRenderComponent as _ssrRenderComponent, ssrRenderClass as _ssrRenderClass, ssrRenderStyle as _ssrRenderStyle, ssrRenderSlot as _ssrRenderSlot, ssrRenderAttrs as _ssrRenderAttrs, ssrInterpolate as _ssrInterpolate, ssrRenderList as _ssrRenderList } from \"vue/server-renderer\"\n\nimport type { AssetInfo } from '~/../src/types'\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref } from 'vue'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'AssetListItem',\n __ssrInlineRender: true,\n props: {\n item: {},\n index: { default: 0 },\n modelValue: {}\n },\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\nconst model = useVModel(props, 'modelValue', emit, { passive: true })\n\nconst isCollection = computed(() => props.item?.children?.length)\n\nconst open = ref(true)\n\nconst icon = computed(() => {\n if (isCollection.value)\n return 'i-carbon-folder'\n if (props.item.type === 'image')\n return 'i-carbon-image'\n if (props.item.type === 'video')\n return 'i-carbon-video'\n if (props.item.type === 'audio')\n return 'i-carbon-volume-up'\n if (props.item.type === 'font')\n return 'i-carbon-text-small-caps'\n if (props.item.type === 'text')\n return 'i-carbon-document'\n if (props.item.type === 'json')\n return 'i-carbon-json'\n return 'i-carbon-document-blank'\n})\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NIcon = _resolveComponent(\"NIcon\")!\n const _component_AssetListItem = _resolveComponent(\"AssetListItem\", true)!\n\n _push(`<div${\n _ssrRenderAttrs(_attrs)\n }><button flex=\"~ gap-2\" w-full items-center hover=\"bg-active\" px4 py1 style=\"${\n _ssrRenderStyle({ paddingLeft: `calc(1rem + ${__props.index * 1.5}em)` })\n }\" class=\"${\n _ssrRenderClass({ 'bg-active': !isCollection.value && _unref(model)?.filePath === __props.item?.filePath })\n }\" border=\"b base\">`)\n _push(_ssrRenderComponent(_component_NIcon, { icon: icon.value }, null, _parent))\n _push(`<span class=\"${\n _ssrRenderClass({ 'flex items-center': isCollection.value })\n }\" flex-auto text-start text-sm font-mono>${\n _ssrInterpolate(__props.item.path)\n } `)\n if (__props.item.layer) {\n _push(_ssrRenderComponent(_component_NIcon, {\n icon: \"i-carbon-layers\",\n \"bg-primary\": \"\"\n }, null, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(`</span>`)\n if (isCollection.value) {\n _push(_ssrRenderComponent(_component_NIcon, {\n icon: \"carbon:chevron-right\",\n \"transform-rotate\": open.value ? 90 : 0,\n transition: \"\"\n }, null, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(`</button>`)\n if (open.value) {\n _ssrRenderSlot(_ctx.$slots, \"default\", {}, () => {\n _push(`<!--[-->`)\n _ssrRenderList(__props.item?.children, (subItem) => {\n _push(_ssrRenderComponent(_component_AssetListItem, {\n key: subItem.filepath,\n modelValue: _unref(model),\n \"onUpdate:modelValue\": ($event: any) => (_isRef(model) ? (model).value = $event : null),\n item: subItem,\n index: __props.index + 1\n }, null, _parent))\n })\n _push(`<!--]-->`)\n }, _push, _parent)\n } else {\n _push(`<!---->`)\n }\n _push(`</div>`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { AssetInfo } from '~/../src/types'\nimport { useVModel } from '@vueuse/core'\nimport { computed, ref } from 'vue'\n\nconst props = withDefaults(defineProps<{\n item: any\n index?: number\n modelValue: AssetInfo | undefined\n}>(), {\n index: 0,\n})\n\nconst emit = defineEmits<{ (...args: any): void }>()\nconst model = useVModel(props, 'modelValue', emit, { passive: true })\n\nconst isCollection = computed(() => props.item?.children?.length)\n\nconst open = ref(true)\n\nconst icon = computed(() => {\n if (isCollection.value)\n return 'i-carbon-folder'\n if (props.item.type === 'image')\n return 'i-carbon-image'\n if (props.item.type === 'video')\n return 'i-carbon-video'\n if (props.item.type === 'audio')\n return 'i-carbon-volume-up'\n if (props.item.type === 'font')\n return 'i-carbon-text-small-caps'\n if (props.item.type === 'text')\n return 'i-carbon-document'\n if (props.item.type === 'json')\n return 'i-carbon-json'\n return 'i-carbon-document-blank'\n})\n</script>\n\n<template>\n <div>\n <button\n flex=\"~ gap-2\" w-full items-center hover=\"bg-active\" px4 py1\n :style=\"{ paddingLeft: `calc(1rem + ${index * 1.5}em)` }\"\n :class=\"{ 'bg-active': !isCollection && model?.filePath === item?.filePath }\"\n border=\"b base\"\n @click=\"isCollection ? open = !open : model = item\"\n >\n <NIcon :icon=\"icon\" />\n <span :class=\"{ 'flex items-center': isCollection }\" flex-auto text-start text-sm font-mono>\n {{ item.path }}\n <NIcon v-if=\"item.layer\" icon=\"i-carbon-layers\" bg-primary />\n </span>\n <NIcon v-if=\"isCollection\" icon=\"carbon:chevron-right\" :transform-rotate=\"open ? 90 : 0\" transition />\n </button>\n <slot v-if=\"open\">\n <AssetListItem\n v-for=\"subItem in item?.children\"\n :key=\"subItem.filepath\"\n v-model=\"model\"\n :item=\"subItem\"\n :index=\"index + 1\"\n />\n </slot>\n </div>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveComponent as _resolveComponent, resolveDirective as _resolveDirective, mergeProps as _mergeProps, withCtx as _withCtx, createTextVNode as _createTextVNode, createVNode as _createVNode, vModelText as _vModelText, withKeys as _withKeys, withDirectives as _withDirectives } from \"vue\"\nimport { ssrRenderComponent as _ssrRenderComponent, ssrGetDirectiveProps as _ssrGetDirectiveProps, ssrInterpolate as _ssrInterpolate } from \"vue/server-renderer\"\n\nimport type { AssetInfo, CodeSnippet } from '~/../src/types'\nimport { computedAsync, useTimeAgo, useVModel } from '@vueuse/core'\nimport { computed, ref } from 'vue'\nimport { devtoolsUiShowNotification } from '#imports'\nimport { useCopy, useOpenInEditor } from '~/composables/editor'\nimport { rpc } from '~/composables/rpc'\nimport { useServerConfig } from '~/composables/state'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'AssetDetails',\n __ssrInlineRender: true,\n props: {\n modelValue: {}\n },\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\nconst asset = useVModel(props, 'modelValue', emit, { passive: true })\n\nconst imageMeta = computedAsync(async () => {\n if (asset.value.type !== 'image')\n return undefined\n return rpc.getImageMeta(asset.value.filePath)\n})\n\nconst editDialog = ref(false)\nconst newTextContent = ref()\nconst textContentCounter = ref(0)\nconst textContent = computedAsync(async () => {\n if (asset.value.type !== 'text')\n return undefined\n\n // eslint-disable-next-line ts/no-unused-expressions\n textContentCounter.value\n\n const content = await rpc.getTextAssetContent(asset.value.filePath)\n newTextContent.value = content\n return content\n})\n\nasync function saveTextContent() {\n if (textContent.value !== newTextContent.value) {\n try {\n await rpc.writeStaticAssets([{\n path: asset.value.path,\n content: newTextContent.value,\n override: true,\n }], '')\n editDialog.value = false\n textContentCounter.value++\n devtoolsUiShowNotification({\n message: 'Updated',\n icon: 'i-carbon-checkmark',\n classes: 'text-green',\n })\n }\n catch (error) {\n console.error(error)\n devtoolsUiShowNotification({\n message: 'Something went wrong!',\n icon: 'i-carbon-warning',\n classes: 'text-red',\n })\n }\n }\n}\n\nconst config = useServerConfig()\nconst hasNuxtImage = computed(() => {\n const modules = config.value?._installedModules || []\n return modules.some(m => m.meta?.name === '@nuxt/image' || m.meta?.name === '@nuxt/image-edge' || m.meta?.name === '@nuxt/image-nightly')\n})\n\nconst codeSnippets = computed(() => {\n const items: CodeSnippet[] = []\n if (asset.value.type === 'image') {\n const attrs = imageMeta.value?.width\n ? `\\n width=\"${imageMeta.value.width}\"\\n height=\"${imageMeta.value.height}\" `\n : ' '\n items.push(\n { lang: 'vue-html', code: `<img${attrs}\\n src=\"${asset.value.publicPath}\"\\n/>`, name: 'Plain Image' },\n )\n if (hasNuxtImage.value) {\n items.push(\n { lang: 'vue-html', code: `<NuxtImg${attrs}\\n src=\"${asset.value.publicPath}\"\\n/>`, name: 'Nuxt Img', docs: 'https://image.nuxt.com/usage/nuxt-img' },\n { lang: 'vue-html', code: `<NuxtPicture${attrs}\\n src=\"${asset.value.publicPath}\"\\n/>`, name: 'Nuxt Picture', docs: 'https://image.nuxt.com/usage/nuxt-picture' },\n )\n }\n return items\n }\n\n items.push({\n lang: 'html',\n code: `<a download href=\"${asset.value.publicPath}\">\\n Download ${asset.value.path.split('/').slice(-1)[0]}\\n</a>`,\n name: 'Download link',\n })\n return items\n})\n\nconst copy = useCopy()\nconst openInEditor = useOpenInEditor()\nconst timeAgo = useTimeAgo(() => asset.value.mtime)\nconst fileSize = computed(() => {\n const size = asset.value.size\n if (size < 1024)\n return `${size} B`\n if (size < 1024 * 1024)\n return `${(size / 1024).toFixed(2)} KB`\n return `${(size / 1024 / 1024).toFixed(2)} MB`\n})\n\nconst aspectRatio = computed(() => {\n if (!imageMeta.value?.width || !imageMeta.value?.height)\n return ''\n const gcd = (a: number, b: number): number => {\n if (!b)\n return a\n return gcd(b, a % b)\n }\n const ratio = gcd(imageMeta.value.width, imageMeta.value.height)\n if (ratio > 3)\n return `${imageMeta.value.width / ratio}:${imageMeta.value.height / ratio}`\n return ''\n})\n\nconst supportsPreview = computed(() => {\n return [\n 'image',\n 'text',\n 'video',\n 'audio',\n 'font',\n ].includes(asset.value.type)\n})\n\nconst deleteDialog = ref(false)\nasync function deleteAsset() {\n try {\n await rpc.deleteStaticAsset(asset.value.filePath)\n asset.value = undefined as any\n deleteDialog.value = false\n devtoolsUiShowNotification({\n message: 'Asset deleted',\n icon: 'i-carbon-checkmark',\n classes: 'text-green',\n })\n }\n catch (error) {\n console.error(error)\n devtoolsUiShowNotification({\n message: 'Something went wrong!',\n icon: 'i-carbon-warning',\n classes: 'text-red',\n })\n }\n}\n\nconst renameDialog = ref(false)\nconst newName = ref('')\nasync function renameAsset() {\n const parts = asset.value.filePath.split('/')\n const oldName = parts.slice(-1)[0]?.split('.').slice(0, -1).join('.')\n\n if (!newName.value || newName.value === oldName) {\n return devtoolsUiShowNotification({\n message: 'Please enter a new name',\n icon: 'i-carbon-warning',\n classes: 'text-orange',\n })\n }\n\n try {\n const extension = parts.slice(-1)[0]?.split('.').slice(-1)[0]\n const fullPath = `${parts.slice(0, -1).join('/')}/${newName.value}.${extension}`\n await rpc.renameStaticAsset(asset.value.filePath, fullPath)\n asset.value = undefined as any\n renameDialog.value = false\n devtoolsUiShowNotification({\n message: 'Asset renamed',\n icon: 'i-carbon-checkmark',\n classes: 'text-green',\n })\n }\n catch (error) {\n console.error(error)\n devtoolsUiShowNotification({\n message: 'Something went wrong!',\n icon: 'i-carbon-warning',\n classes: 'text-red',\n })\n }\n}\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_AssetPreview = _resolveComponent(\"AssetPreview\")!\n const _component_FilepathItem = _resolveComponent(\"FilepathItem\")!\n const _component_NButton = _resolveComponent(\"NButton\")!\n const _component_CodeSnippets = _resolveComponent(\"CodeSnippets\")!\n const _component_NDialog = _resolveComponent(\"NDialog\")!\n const _component_NTextInput = _resolveComponent(\"NTextInput\")!\n const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n _push(`<!--[--><div flex=\"~ col gap-4\" min-h-full w-full of-hidden p4>`)\n if (supportsPreview.value) {\n _push(`<!--[--><div flex=\"~ gap2\" mb--2 items-center op50><div x-divider></div><div flex-none> Preview </div><div x-divider></div></div><div flex=\"~\" items-center justify-center>`)\n _push(_ssrRenderComponent(_component_AssetPreview, {\n detail: \"\",\n \"max-h-80\": \"\",\n \"min-h-20\": \"\",\n \"min-w-20\": \"\",\n \"w-auto\": \"\",\n rounded: \"\",\n border: \"~ base\",\n asset: _unref(asset),\n \"text-content\": _unref(textContent)\n }, null, _parent))\n _push(`</div><!--]-->`)\n } else {\n _push(`<!---->`)\n }\n _push(`<div flex=\"~ gap2\" mb--2 items-center op50><div x-divider></div><div flex-none> Details </div><div x-divider></div></div><table max-w-full w-full table-fixed><tbody><tr><td w-30 ws-nowrap pr5 text-right op50> Filepath </td><td><div flex=\"~ gap-1\" w-full items-center>`)\n _push(_ssrRenderComponent(_component_FilepathItem, {\n filepath: _unref(asset).filePath,\n \"text-left\": \"\"\n }, null, _parent))\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n \"flex-none\": \"\",\n title: \"Open in Editor\",\n icon: \"carbon-launch\",\n border: false,\n onClick: ($event: any) => (_unref(openInEditor)(_unref(asset).filePath))\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Open in Editor')), null, _parent))\n _push(`</div></td></tr><tr><td w-30 ws-nowrap pr5 text-right op50> Public Path </td><td><div flex=\"~ gap-1\" w-full items-center of-hidden><div flex-auto of-hidden truncate ws-pre font-mono>${_ssrInterpolate(_unref(asset).publicPath)}</div>`)\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n \"flex-none\": \"\",\n title: \"Copy public path\",\n icon: \"carbon-copy\",\n border: false,\n onClick: ($event: any) => (_unref(copy)(_unref(asset).publicPath, 'assets-public-path'))\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Copy public path')), null, _parent))\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n \"flex-none\": \"\",\n to: _unref(asset).publicPath,\n icon: \"carbon-launch\",\n target: \"_blank\",\n border: false,\n title: \"Open in browser\"\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Open in browser')), null, _parent))\n _push(`</div></td></tr><tr><td w-30 ws-nowrap pr5 text-right op50> Type </td><td capitalize>${_ssrInterpolate(_unref(asset).type)}</td></tr>`)\n if (_unref(imageMeta)?.width) {\n _push(`<!--[--><tr><td w-30 ws-nowrap pr5 text-right op50> Image Size </td><td>${\n _ssrInterpolate(_unref(imageMeta).width)\n } x ${\n _ssrInterpolate(_unref(imageMeta).height)\n }</td></tr>`)\n if (aspectRatio.value) {\n _push(`<tr><td w-30 ws-nowrap pr5 text-right op50> Aspect Ratio </td><td>${_ssrInterpolate(aspectRatio.value)}</td></tr>`)\n } else {\n _push(`<!---->`)\n }\n _push(`<!--]-->`)\n } else {\n _push(`<!---->`)\n }\n _push(`<tr><td w-30 ws-nowrap pr5 text-right op50> File size </td><td>${\n _ssrInterpolate(fileSize.value)\n }</td></tr><tr><td w-30 ws-nowrap pr5 text-right op50> Last modified </td><td>${\n _ssrInterpolate(new Date((_unref(asset)).mtime).toLocaleString())\n } <span op70>(${\n _ssrInterpolate(_unref(timeAgo))\n })</span></td></tr></tbody></table><div flex=\"~ gap2\" mb--2 items-center op50><div x-divider></div><div flex-none> Actions </div><div x-divider></div></div><div flex=\"~ gap2 wrap\">`)\n _push(_ssrRenderComponent(_component_NButton, {\n to: _unref(asset).publicPath,\n download: \"\",\n target: \"_blank\",\n icon: \"carbon-download\",\n n: \"green\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Download `)\n } else {\n return [\n _createTextVNode(\" Download \")\n ]\n }\n }),\n _: 1\n }, _parent))\n if (_unref(asset).type === 'text') {\n _push(_ssrRenderComponent(_component_NButton, {\n icon: \"carbon-edit\",\n n: \"cyan\",\n onClick: ($event: any) => (editDialog.value = !editDialog.value)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Edit `)\n } else {\n return [\n _createTextVNode(\" Edit \")\n ]\n }\n }),\n _: 1\n }, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(_ssrRenderComponent(_component_NButton, {\n icon: \"carbon-text-annotation-toggle\",\n n: \"blue\",\n onClick: ($event: any) => (renameDialog.value = !renameDialog.value)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Rename `)\n } else {\n return [\n _createTextVNode(\" Rename \")\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(_ssrRenderComponent(_component_NButton, {\n icon: \"carbon-delete\",\n n: \"red\",\n onClick: ($event: any) => (deleteDialog.value = !deleteDialog.value)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Delete `)\n } else {\n return [\n _createTextVNode(\" Delete \")\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(`</div><div flex-auto></div>`)\n if (codeSnippets.value.length) {\n _push(_ssrRenderComponent(_component_CodeSnippets, {\n border: \"t base\",\n \"mx--4\": \"\",\n \"mb--4\": \"\",\n \"code-snippets\": codeSnippets.value\n }, null, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(`</div>`)\n _push(_ssrRenderComponent(_component_NDialog, {\n modelValue: deleteDialog.value,\n \"onUpdate:modelValue\": ($event: any) => ((deleteDialog).value = $event)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div flex=\"~ col gap-4\" min-h-full w-full of-hidden p8${\n _scopeId\n }><span${\n _scopeId\n }> Are you sure you want to delete this asset? </span><div flex=\"~ gap2 wrap justify-center\"${\n _scopeId\n }>`)\n _push(_ssrRenderComponent(_component_NButton, {\n icon: \"carbon-close\",\n onClick: ($event: any) => (deleteDialog.value = false)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Cancel `)\n } else {\n return [\n _createTextVNode(\" Cancel \")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(_ssrRenderComponent(_component_NButton, {\n icon: \"carbon-delete\",\n n: \"red\",\n onClick: deleteAsset\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Delete `)\n } else {\n return [\n _createTextVNode(\" Delete \")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(`</div></div>`)\n } else {\n return [\n _createVNode(\"div\", {\n flex: \"~ col gap-4\",\n \"min-h-full\": \"\",\n \"w-full\": \"\",\n \"of-hidden\": \"\",\n p8: \"\"\n }, [\n _createVNode(\"span\", null, \" Are you sure you want to delete this asset? \"),\n _createVNode(\"div\", { flex: \"~ gap2 wrap justify-center\" }, [\n _createVNode(_component_NButton, {\n icon: \"carbon-close\",\n onClick: ($event: any) => (deleteDialog.value = false)\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Cancel \")\n ]),\n _: 1\n }, 8, [\"onClick\"]),\n _createVNode(_component_NButton, {\n icon: \"carbon-delete\",\n n: \"red\",\n onClick: deleteAsset\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Delete \")\n ]),\n _: 1\n })\n ])\n ])\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(_ssrRenderComponent(_component_NDialog, {\n modelValue: renameDialog.value,\n \"onUpdate:modelValue\": ($event: any) => ((renameDialog).value = $event)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div flex=\"~ col gap-4\" min-h-full w-full of-hidden p8${_scopeId}>`)\n _push(_ssrRenderComponent(_component_NTextInput, {\n modelValue: newName.value,\n \"onUpdate:modelValue\": ($event: any) => ((newName).value = $event),\n placeholder: \"New name\",\n n: \"blue\"\n }, null, _parent, _scopeId))\n _push(`<div flex=\"~ gap2 wrap justify-center\"${_scopeId}>`)\n _push(_ssrRenderComponent(_component_NButton, {\n icon: \"carbon-close\",\n onClick: ($event: any) => (renameDialog.value = false)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Cancel `)\n } else {\n return [\n _createTextVNode(\" Cancel \")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(_ssrRenderComponent(_component_NButton, {\n icon: \"carbon-text-annotation-toggle\",\n n: \"blue\",\n onClick: renameAsset\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Rename `)\n } else {\n return [\n _createTextVNode(\" Rename \")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(`</div></div>`)\n } else {\n return [\n _createVNode(\"div\", {\n flex: \"~ col gap-4\",\n \"min-h-full\": \"\",\n \"w-full\": \"\",\n \"of-hidden\": \"\",\n p8: \"\"\n }, [\n _createVNode(_component_NTextInput, {\n modelValue: newName.value,\n \"onUpdate:modelValue\": ($event: any) => ((newName).value = $event),\n placeholder: \"New name\",\n n: \"blue\"\n }, null, 8, [\"modelValue\", \"onUpdate:modelValue\"]),\n _createVNode(\"div\", { flex: \"~ gap2 wrap justify-center\" }, [\n _createVNode(_component_NButton, {\n icon: \"carbon-close\",\n onClick: ($event: any) => (renameDialog.value = false)\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Cancel \")\n ]),\n _: 1\n }, 8, [\"onClick\"]),\n _createVNode(_component_NButton, {\n icon: \"carbon-text-annotation-toggle\",\n n: \"blue\",\n onClick: renameAsset\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Rename \")\n ]),\n _: 1\n })\n ])\n ])\n ]\n }\n }),\n _: 1\n }, _parent))\n if (_unref(asset).type === 'text') {\n _push(_ssrRenderComponent(_component_NDialog, {\n modelValue: editDialog.value,\n \"onUpdate:modelValue\": ($event: any) => ((editDialog).value = $event)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div flex=\"~ col gap-4\" min-h-full w-full of-hidden p4${\n _scopeId\n }><textarea placeholder=\"Item value...\" class=\"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none\"${\n _scopeId\n }>${\n _ssrInterpolate(newTextContent.value)\n }</textarea><div flex justify-end gap-4${\n _scopeId\n }>`)\n _push(_ssrRenderComponent(_component_NButton, {\n icon: \"carbon-close\",\n onClick: ($event: any) => (editDialog.value = false)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Cancel `)\n } else {\n return [\n _createTextVNode(\" Cancel \")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(_ssrRenderComponent(_component_NButton, {\n icon: \"carbon:save\",\n n: \"primary\",\n onClick: saveTextContent\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` save `)\n } else {\n return [\n _createTextVNode(\" save \")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(`</div></div>`)\n } else {\n return [\n _createVNode(\"div\", {\n flex: \"~ col gap-4\",\n \"min-h-full\": \"\",\n \"w-full\": \"\",\n \"of-hidden\": \"\",\n p4: \"\"\n }, [\n _withDirectives(_createVNode(\"textarea\", {\n \"onUpdate:modelValue\": ($event: any) => ((newTextContent).value = $event),\n placeholder: \"Item value...\",\n class: \"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none\",\n onKeydown: _withKeys(saveTextContent, [\"enter\"])\n }, null, 40, [\"onUpdate:modelValue\"]), [\n [_vModelText, newTextContent.value]\n ]),\n _createVNode(\"div\", {\n flex: \"\",\n \"justify-end\": \"\",\n \"gap-4\": \"\"\n }, [\n _createVNode(_component_NButton, {\n icon: \"carbon-close\",\n onClick: ($event: any) => (editDialog.value = false)\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Cancel \")\n ]),\n _: 1\n }, 8, [\"onClick\"]),\n _createVNode(_component_NButton, {\n icon: \"carbon:save\",\n n: \"primary\",\n onClick: saveTextContent\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" save \")\n ]),\n _: 1\n })\n ])\n ])\n ]\n }\n }),\n _: 1\n }, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(`<!--]-->`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { AssetInfo, CodeSnippet } from '~/../src/types'\nimport { computedAsync, useTimeAgo, useVModel } from '@vueuse/core'\nimport { computed, ref } from 'vue'\nimport { devtoolsUiShowNotification } from '#imports'\nimport { useCopy, useOpenInEditor } from '~/composables/editor'\nimport { rpc } from '~/composables/rpc'\nimport { useServerConfig } from '~/composables/state'\n\nconst props = defineProps<{\n modelValue: AssetInfo\n}>()\n\nconst emit = defineEmits<{ (...args: any): void }>()\nconst asset = useVModel(props, 'modelValue', emit, { passive: true })\n\nconst imageMeta = computedAsync(async () => {\n if (asset.value.type !== 'image')\n return undefined\n return rpc.getImageMeta(asset.value.filePath)\n})\n\nconst editDialog = ref(false)\nconst newTextContent = ref()\nconst textContentCounter = ref(0)\nconst textContent = computedAsync(async () => {\n if (asset.value.type !== 'text')\n return undefined\n\n // eslint-disable-next-line ts/no-unused-expressions\n textContentCounter.value\n\n const content = await rpc.getTextAssetContent(asset.value.filePath)\n newTextContent.value = content\n return content\n})\n\nasync function saveTextContent() {\n if (textContent.value !== newTextContent.value) {\n try {\n await rpc.writeStaticAssets([{\n path: asset.value.path,\n content: newTextContent.value,\n override: true,\n }], '')\n editDialog.value = false\n textContentCounter.value++\n devtoolsUiShowNotification({\n message: 'Updated',\n icon: 'i-carbon-checkmark',\n classes: 'text-green',\n })\n }\n catch (error) {\n console.error(error)\n devtoolsUiShowNotification({\n message: 'Something went wrong!',\n icon: 'i-carbon-warning',\n classes: 'text-red',\n })\n }\n }\n}\n\nconst config = useServerConfig()\nconst hasNuxtImage = computed(() => {\n const modules = config.value?._installedModules || []\n return modules.some(m => m.meta?.name === '@nuxt/image' || m.meta?.name === '@nuxt/image-edge' || m.meta?.name === '@nuxt/image-nightly')\n})\n\nconst codeSnippets = computed(() => {\n const items: CodeSnippet[] = []\n if (asset.value.type === 'image') {\n const attrs = imageMeta.value?.width\n ? `\\n width=\"${imageMeta.value.width}\"\\n height=\"${imageMeta.value.height}\" `\n : ' '\n items.push(\n { lang: 'vue-html', code: `<img${attrs}\\n src=\"${asset.value.publicPath}\"\\n/>`, name: 'Plain Image' },\n )\n if (hasNuxtImage.value) {\n items.push(\n { lang: 'vue-html', code: `<NuxtImg${attrs}\\n src=\"${asset.value.publicPath}\"\\n/>`, name: 'Nuxt Img', docs: 'https://image.nuxt.com/usage/nuxt-img' },\n { lang: 'vue-html', code: `<NuxtPicture${attrs}\\n src=\"${asset.value.publicPath}\"\\n/>`, name: 'Nuxt Picture', docs: 'https://image.nuxt.com/usage/nuxt-picture' },\n )\n }\n return items\n }\n\n items.push({\n lang: 'html',\n code: `<a download href=\"${asset.value.publicPath}\">\\n Download ${asset.value.path.split('/').slice(-1)[0]}\\n</a>`,\n name: 'Download link',\n })\n return items\n})\n\nconst copy = useCopy()\nconst openInEditor = useOpenInEditor()\nconst timeAgo = useTimeAgo(() => asset.value.mtime)\nconst fileSize = computed(() => {\n const size = asset.value.size\n if (size < 1024)\n return `${size} B`\n if (size < 1024 * 1024)\n return `${(size / 1024).toFixed(2)} KB`\n return `${(size / 1024 / 1024).toFixed(2)} MB`\n})\n\nconst aspectRatio = computed(() => {\n if (!imageMeta.value?.width || !imageMeta.value?.height)\n return ''\n const gcd = (a: number, b: number): number => {\n if (!b)\n return a\n return gcd(b, a % b)\n }\n const ratio = gcd(imageMeta.value.width, imageMeta.value.height)\n if (ratio > 3)\n return `${imageMeta.value.width / ratio}:${imageMeta.value.height / ratio}`\n return ''\n})\n\nconst supportsPreview = computed(() => {\n return [\n 'image',\n 'text',\n 'video',\n 'audio',\n 'font',\n ].includes(asset.value.type)\n})\n\nconst deleteDialog = ref(false)\nasync function deleteAsset() {\n try {\n await rpc.deleteStaticAsset(asset.value.filePath)\n asset.value = undefined as any\n deleteDialog.value = false\n devtoolsUiShowNotification({\n message: 'Asset deleted',\n icon: 'i-carbon-checkmark',\n classes: 'text-green',\n })\n }\n catch (error) {\n console.error(error)\n devtoolsUiShowNotification({\n message: 'Something went wrong!',\n icon: 'i-carbon-warning',\n classes: 'text-red',\n })\n }\n}\n\nconst renameDialog = ref(false)\nconst newName = ref('')\nasync function renameAsset() {\n const parts = asset.value.filePath.split('/')\n const oldName = parts.slice(-1)[0]?.split('.').slice(0, -1).join('.')\n\n if (!newName.value || newName.value === oldName) {\n return devtoolsUiShowNotification({\n message: 'Please enter a new name',\n icon: 'i-carbon-warning',\n classes: 'text-orange',\n })\n }\n\n try {\n const extension = parts.slice(-1)[0]?.split('.').slice(-1)[0]\n const fullPath = `${parts.slice(0, -1).join('/')}/${newName.value}.${extension}`\n await rpc.renameStaticAsset(asset.value.filePath, fullPath)\n asset.value = undefined as any\n renameDialog.value = false\n devtoolsUiShowNotification({\n message: 'Asset renamed',\n icon: 'i-carbon-checkmark',\n classes: 'text-green',\n })\n }\n catch (error) {\n console.error(error)\n devtoolsUiShowNotification({\n message: 'Something went wrong!',\n icon: 'i-carbon-warning',\n classes: 'text-red',\n })\n }\n}\n</script>\n\n<template>\n <div flex=\"~ col gap-4\" min-h-full w-full of-hidden p4>\n <template v-if=\"supportsPreview\">\n <div flex=\"~ gap2\" mb--2 items-center op50>\n <div x-divider />\n <div flex-none>\n Preview\n </div>\n <div x-divider />\n </div>\n\n <div flex=\"~\" items-center justify-center>\n <AssetPreview\n detail\n max-h-80 min-h-20 min-w-20 w-auto rounded border=\"~ base\"\n :asset=\"asset\"\n :text-content=\"textContent\"\n />\n </div>\n </template>\n\n <div flex=\"~ gap2\" mb--2 items-center op50>\n <div x-divider />\n <div flex-none>\n Details\n </div>\n <div x-divider />\n </div>\n\n <table max-w-full w-full table-fixed>\n <tbody>\n <tr>\n <td w-30 ws-nowrap pr5 text-right op50>\n Filepath\n </td>\n <td>\n <div flex=\"~ gap-1\" w-full items-center>\n <FilepathItem :filepath=\"asset.filePath\" text-left />\n <NButton\n v-tooltip=\"'Open in Editor'\"\n flex-none\n title=\"Open in Editor\"\n icon=\"carbon-launch\"\n :border=\"false\"\n @click=\"openInEditor(asset.filePath)\"\n />\n </div>\n </td>\n </tr>\n <tr>\n <td w-30 ws-nowrap pr5 text-right op50>\n Public Path\n </td>\n <td>\n <div flex=\"~ gap-1\" w-full items-center of-hidden>\n <div flex-auto of-hidden truncate ws-pre font-mono>\n {{ asset.publicPath }}\n </div>\n <NButton\n v-tooltip=\"'Copy public path'\"\n flex-none\n title=\"Copy public path\"\n icon=\"carbon-copy\"\n :border=\"false\"\n @click=\"copy(asset.publicPath, 'assets-public-path')\"\n />\n <NButton\n v-tooltip=\"'Open in browser'\"\n flex-none\n :to=\"asset.publicPath\"\n icon=\"carbon-launch\"\n target=\"_blank\"\n :border=\"false\"\n title=\"Open in browser\"\n />\n </div>\n </td>\n </tr>\n <tr>\n <td w-30 ws-nowrap pr5 text-right op50>\n Type\n </td>\n <td capitalize>\n {{ asset.type }}\n </td>\n </tr>\n <template v-if=\"imageMeta?.width\">\n <tr>\n <td w-30 ws-nowrap pr5 text-right op50>\n Image Size\n </td>\n <td>{{ imageMeta.width }} x {{ imageMeta.height }}</td>\n </tr>\n <tr v-if=\"aspectRatio\">\n <td w-30 ws-nowrap pr5 text-right op50>\n Aspect Ratio\n </td>\n <td>{{ aspectRatio }}</td>\n </tr>\n </template>\n <tr>\n <td w-30 ws-nowrap pr5 text-right op50>\n File size\n </td>\n <td>{{ fileSize }}</td>\n </tr>\n <tr>\n <td w-30 ws-nowrap pr5 text-right op50>\n Last modified\n </td>\n <td>{{ new Date(asset.mtime).toLocaleString() }} <span op70>({{ timeAgo }})</span></td>\n </tr>\n </tbody>\n </table>\n\n <div flex=\"~ gap2\" mb--2 items-center op50>\n <div x-divider />\n <div flex-none>\n Actions\n </div>\n <div x-divider />\n </div>\n <div flex=\"~ gap2 wrap\">\n <NButton :to=\"asset.publicPath\" download target=\"_blank\" icon=\"carbon-download\" n=\"green\">\n Download\n </NButton>\n <NButton v-if=\"asset.type === 'text'\" icon=\"carbon-edit\" n=\"cyan\" @click=\"editDialog = !editDialog\">\n Edit\n </NButton>\n <NButton icon=\"carbon-text-annotation-toggle\" n=\"blue\" @click=\"renameDialog = !renameDialog\">\n Rename\n </NButton>\n <NButton icon=\"carbon-delete\" n=\"red\" @click=\"deleteDialog = !deleteDialog\">\n Delete\n </NButton>\n <!-- TODO: integrate with Nuxt Image -->\n <!-- <NButton v-if=\"asset.type === 'image'\" disabled icon=\"carbon-image-service\">\n Optimize image (Coming soon)\n </NButton> -->\n </div>\n\n <div flex-auto />\n\n <CodeSnippets\n v-if=\"codeSnippets.length\"\n border=\"t base\"\n mx--4 mb--4\n :code-snippets=\"codeSnippets\"\n />\n </div>\n <NDialog v-model=\"deleteDialog\">\n <div flex=\"~ col gap-4\" min-h-full w-full of-hidden p8>\n <span>\n Are you sure you want to delete this asset?\n </span>\n <div flex=\"~ gap2 wrap justify-center\">\n <NButton icon=\"carbon-close\" @click=\"deleteDialog = false\">\n Cancel\n </NButton>\n <NButton icon=\"carbon-delete\" n=\"red\" @click=\"deleteAsset\">\n Delete\n </NButton>\n </div>\n </div>\n </NDialog>\n <NDialog v-model=\"renameDialog\">\n <div flex=\"~ col gap-4\" min-h-full w-full of-hidden p8>\n <NTextInput v-model=\"newName\" placeholder=\"New name\" n=\"blue\" />\n <div flex=\"~ gap2 wrap justify-center\">\n <NButton icon=\"carbon-close\" @click=\"renameDialog = false\">\n Cancel\n </NButton>\n <NButton icon=\"carbon-text-annotation-toggle\" n=\"blue\" @click=\"renameAsset\">\n Rename\n </NButton>\n </div>\n </div>\n </NDialog>\n <NDialog v-if=\"asset.type === 'text'\" v-model=\"editDialog\">\n <div flex=\"~ col gap-4\" min-h-full w-full of-hidden p4>\n <textarea\n v-model=\"newTextContent\"\n placeholder=\"Item value...\"\n class=\"h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none\"\n @keydown.enter=\"saveTextContent\"\n />\n <div flex justify-end gap-4>\n <NButton icon=\"carbon-close\" @click=\"editDialog = false\">\n Cancel\n </NButton>\n <NButton icon=\"carbon:save\" n=\"primary\" @click=\"saveTextContent\">\n save\n </NButton>\n </div>\n </div>\n </NDialog>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, resolveDirective as _resolveDirective, mergeProps as _mergeProps, unref as _unref, withCtx as _withCtx, toDisplayString as _toDisplayString, createVNode as _createVNode, withDirectives as _withDirectives, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode } from \"vue\"\nimport { ssrGetDirectiveProps as _ssrGetDirectiveProps, ssrRenderComponent as _ssrRenderComponent, ssrRenderAttrs as _ssrRenderAttrs, ssrInterpolate as _ssrInterpolate, ssrRenderList as _ssrRenderList } from \"vue/server-renderer\"\n\nimport type { AssetInfo } from '~/../src/types'\nimport { onKeyDown, reactiveComputed } from '@vueuse/core'\nimport Fuse from 'fuse.js'\nimport { computed, ref } from 'vue'\nimport { definePageMeta } from '#imports'\nimport { DETAILS_MAX_ITEMS } from '~/composables/constants'\nimport { useStaticAssets } from '~/composables/state'\nimport { useDevToolsOptions } from '~/composables/storage-options'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'assets',\n __ssrInlineRender: true,\n setup(__props) {\n\ndefinePageMeta({\n icon: 'carbon-image-copy',\n title: 'Assets',\n layout: 'full',\n})\n\nconst assets = useStaticAssets()\nconst dropzone = ref(false)\nconst search = ref('')\n\nconst fuse = computed(() => new Fuse(assets.value || [], {\n keys: [\n 'path',\n ],\n}))\n\nconst extensions = reactiveComputed(() => {\n const results: { name: string, value: boolean }[] = []\n for (const asset of assets.value || []) {\n const ext = asset.path.split('.').pop()\n if (ext && !results.some(e => e.name === ext))\n results.push({ name: ext, value: true })\n }\n return results\n})\n\nconst filtered = computed(() => {\n const result = search.value\n ? fuse.value.search(search.value).map(i => i.item)\n : (assets.value || [])\n return result.filter((asset) => {\n const ext = asset.path.split('.').pop()\n return !ext || extensions.some(e => e.name === ext && e.value)\n })\n})\n\nconst byFolders = computed(() => {\n const result: Record<string, AssetInfo[]> = {}\n for (const asset of filtered.value) {\n const folder = `${asset.path.split('/').slice(0, -1).join('/')}/`\n if (!result[folder])\n result[folder] = []\n result[folder].push(asset)\n }\n return Object.entries(result).sort(([a], [b]) => a.localeCompare(b))\n})\n\nconst byTree = computed(() => {\n const root = { path: 'public', children: [] }\n\n const addToTree = (node: any, pathParts: any, file: AssetInfo) => {\n const [currentPart, ...remainingParts] = pathParts\n\n let child = node.children.find((child: any) => child.path === currentPart)\n if (!child) {\n child = { ...file, path: currentPart, children: [] }\n node.children.push(child)\n }\n\n if (remainingParts.length > 1)\n addToTree(child, remainingParts, file)\n else if (remainingParts.length === 1)\n child.children.push({ ...file, path: remainingParts[0] })\n }\n\n filtered.value.forEach((file) => {\n const pathParts = file.path.split('/').filter(part => part !== '')\n addToTree(root, pathParts, file)\n })\n\n return root.children\n})\n\nconst selected = ref<AssetInfo>()\n\nconst { view } = useDevToolsOptions('assets')\n\nfunction toggleView() {\n view.value = view.value === 'list' ? 'grid' : 'list'\n}\n\nonKeyDown('Escape', () => {\n selected.value = undefined\n})\n\nconst navbar = ref<HTMLElement>()\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NNavbar = _resolveComponent(\"NNavbar\")!\n const _component_NButton = _resolveComponent(\"NButton\")!\n const _component_NDropdown = _resolveComponent(\"NDropdown\")!\n const _component_NCheckbox = _resolveComponent(\"NCheckbox\")!\n const _component_AssetDropZone = _resolveComponent(\"AssetDropZone\")!\n const _component_NSectionBlock = _resolveComponent(\"NSectionBlock\")!\n const _component_AssetGridItem = _resolveComponent(\"AssetGridItem\")!\n const _component_AssetListItem = _resolveComponent(\"AssetListItem\")!\n const _component_NDrawer = _resolveComponent(\"NDrawer\")!\n const _component_AssetDetails = _resolveComponent(\"AssetDetails\")!\n const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n _push(`<div${_ssrRenderAttrs(_mergeProps({\n \"h-full\": \"\",\n \"of-auto\": \"\"\n }, _attrs))}>`)\n _push(_ssrRenderComponent(_component_NNavbar, {\n ref_key: \"navbar\",\n ref: navbar,\n search: search.value,\n \"onUpdate:search\": ($event: any) => ((search).value = $event),\n pb2: \"\"\n }, {\n actions: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div flex-none flex=\"~ gap2 items-center\" text-lg${_scopeId}>`)\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n icon: \"carbon:cloud-upload\",\n title: \"File Upload\",\n border: false,\n onClick: ($event: any) => (dropzone.value = !dropzone.value)\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'File Upload', void 0, { \"bottom-end\": true })), null, _parent, _scopeId))\n if (_unref(extensions).length) {\n _push(_ssrRenderComponent(_component_NDropdown, {\n direction: \"end\",\n n: \"sm primary\"\n }, {\n trigger: _withCtx(({ click }, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n icon: \"carbon-filter\",\n border: false,\n title: \"Filter\",\n p3: \"\",\n \"text-lg\": \"\",\n onClick: ($event: any) => (click())\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Filter', void 0, { \"bottom-end\": true })), null, _parent, _scopeId))\n _push(`<span flex=\"~ items-center justify-center\" absolute bottom--1 right--1 h-4 w-4 rounded-full bg-primary:30 text-8px${\n _scopeId\n }>${\n _ssrInterpolate(_unref(extensions).length)\n }</span>`)\n } else {\n return [\n _withDirectives(_createVNode(_component_NButton, {\n icon: \"carbon-filter\",\n border: false,\n title: \"Filter\",\n p3: \"\",\n \"text-lg\": \"\",\n onClick: ($event: any) => (click())\n }, null, 8, [\"onClick\"]), [\n [\n _directive_tooltip,\n 'Filter',\n void 0,\n { \"bottom-end\": true }\n ]\n ]),\n _createVNode(\"span\", {\n flex: \"~ items-center justify-center\",\n absolute: \"\",\n \"bottom--1\": \"\",\n \"right--1\": \"\",\n \"h-4\": \"\",\n \"w-4\": \"\",\n \"rounded-full\": \"\",\n \"bg-primary:30\": \"\",\n \"text-8px\": \"\"\n }, _toDisplayString(_unref(extensions).length), 1)\n ]\n }\n }),\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div flex=\"~ col\" w-30 of-auto${_scopeId}><!--[-->`)\n _ssrRenderList(_unref(extensions), (item) => {\n _push(_ssrRenderComponent(_component_NCheckbox, {\n key: item.name,\n modelValue: item.value,\n \"onUpdate:modelValue\": ($event: any) => ((item.value) = $event),\n flex: \"~ gap-2\",\n rounded: \"\",\n px2: \"\",\n py2: \"\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<span text-xs op75${\n _scopeId\n }>${\n _ssrInterpolate(item.name)\n }</span>`)\n } else {\n return [\n _createVNode(\"span\", {\n \"text-xs\": \"\",\n op75: \"\"\n }, _toDisplayString(item.name), 1)\n ]\n }\n }),\n _: 2\n }, _parent, _scopeId))\n })\n _push(`<!--]--></div>`)\n } else {\n return [\n _createVNode(\"div\", {\n flex: \"~ col\",\n \"w-30\": \"\",\n \"of-auto\": \"\"\n }, [\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(_unref(extensions), (item) => {\n return (_openBlock(), _createBlock(_component_NCheckbox, {\n key: item.name,\n modelValue: item.value,\n \"onUpdate:modelValue\": ($event: any) => ((item.value) = $event),\n flex: \"~ gap-2\",\n rounded: \"\",\n px2: \"\",\n py2: \"\"\n }, {\n default: _withCtx(() => [\n _createVNode(\"span\", {\n \"text-xs\": \"\",\n op75: \"\"\n }, _toDisplayString(item.name), 1)\n ]),\n _: 2\n }, 1032, [\"modelValue\", \"onUpdate:modelValue\"]))\n }), 128))\n ])\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n } else {\n _push(`<!---->`)\n }\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n \"text-lg\": \"\",\n border: false,\n icon: _unref(view) === 'grid' ? 'i-carbon-list' : 'i-carbon-grid',\n title: \"Toggle view\",\n onClick: toggleView\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Toggle View', void 0, { \"bottom-end\": true })), null, _parent, _scopeId))\n _push(`</div>`)\n } else {\n return [\n _createVNode(\"div\", {\n \"flex-none\": \"\",\n flex: \"~ gap2 items-center\",\n \"text-lg\": \"\"\n }, [\n _withDirectives(_createVNode(_component_NButton, {\n icon: \"carbon:cloud-upload\",\n title: \"File Upload\",\n border: false,\n onClick: ($event: any) => (dropzone.value = !dropzone.value)\n }, null, 8, [\"onClick\"]), [\n [\n _directive_tooltip,\n 'File Upload',\n void 0,\n { \"bottom-end\": true }\n ]\n ]),\n (_unref(extensions).length)\n ? (_openBlock(), _createBlock(_component_NDropdown, {\n key: 0,\n direction: \"end\",\n n: \"sm primary\"\n }, {\n trigger: _withCtx(({ click }) => [\n _withDirectives(_createVNode(_component_NButton, {\n icon: \"carbon-filter\",\n border: false,\n title: \"Filter\",\n p3: \"\",\n \"text-lg\": \"\",\n onClick: ($event: any) => (click())\n }, null, 8, [\"onClick\"]), [\n [\n _directive_tooltip,\n 'Filter',\n void 0,\n { \"bottom-end\": true }\n ]\n ]),\n _createVNode(\"span\", {\n flex: \"~ items-center justify-center\",\n absolute: \"\",\n \"bottom--1\": \"\",\n \"right--1\": \"\",\n \"h-4\": \"\",\n \"w-4\": \"\",\n \"rounded-full\": \"\",\n \"bg-primary:30\": \"\",\n \"text-8px\": \"\"\n }, _toDisplayString(_unref(extensions).length), 1)\n ]),\n default: _withCtx(() => [\n _createVNode(\"div\", {\n flex: \"~ col\",\n \"w-30\": \"\",\n \"of-auto\": \"\"\n }, [\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(_unref(extensions), (item) => {\n return (_openBlock(), _createBlock(_component_NCheckbox, {\n key: item.name,\n modelValue: item.value,\n \"onUpdate:modelValue\": ($event: any) => ((item.value) = $event),\n flex: \"~ gap-2\",\n rounded: \"\",\n px2: \"\",\n py2: \"\"\n }, {\n default: _withCtx(() => [\n _createVNode(\"span\", {\n \"text-xs\": \"\",\n op75: \"\"\n }, _toDisplayString(item.name), 1)\n ]),\n _: 2\n }, 1032, [\"modelValue\", \"onUpdate:modelValue\"]))\n }), 128))\n ])\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true),\n _withDirectives(_createVNode(_component_NButton, {\n \"text-lg\": \"\",\n border: false,\n icon: _unref(view) === 'grid' ? 'i-carbon-list' : 'i-carbon-grid',\n title: \"Toggle view\",\n onClick: toggleView\n }, null, 8, [\"icon\"]), [\n [\n _directive_tooltip,\n 'Toggle View',\n void 0,\n { \"bottom-end\": true }\n ]\n ])\n ])\n ]\n }\n }),\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div op50${_scopeId}>`)\n if (search.value) {\n _push(`<span${\n _scopeId\n }>${\n _ssrInterpolate(filtered.value.length)\n } matched · </span>`)\n } else {\n _push(`<!---->`)\n }\n _push(`<span${\n _scopeId\n }>${\n _ssrInterpolate(_unref(assets)?.length)\n } assets in total</span></div>`)\n } else {\n return [\n _createVNode(\"div\", { op50: \"\" }, [\n (search.value)\n ? (_openBlock(), _createBlock(\"span\", { key: 0 }, _toDisplayString(filtered.value.length) + \" matched · \", 1))\n : _createCommentVNode(\"\", true),\n _createVNode(\"span\", null, _toDisplayString(_unref(assets)?.length) + \" assets in total\", 1)\n ])\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(_ssrRenderComponent(_component_AssetDropZone, {\n modelValue: dropzone.value,\n \"onUpdate:modelValue\": ($event: any) => ((dropzone).value = $event),\n folder: \"/\"\n }, null, _parent))\n if (_unref(view) === 'grid') {\n _push(`<!--[-->`)\n if (byFolders.value.length > 1) {\n _push(`<!--[-->`)\n _ssrRenderList(byFolders.value, ([folder, items]) => {\n _push(_ssrRenderComponent(_component_NSectionBlock, {\n key: folder,\n text: folder,\n description: `${items.length} items`,\n open: items.length <= _unref(DETAILS_MAX_ITEMS),\n padding: false\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div mt--4 px2 grid=\"~ cols-minmax-8rem\"${_scopeId}><!--[-->`)\n _ssrRenderList(items, (a) => {\n _push(_ssrRenderComponent(_component_AssetGridItem, {\n key: a.path,\n asset: a,\n folder: folder,\n onClick: ($event: any) => (selected.value = a)\n }, null, _parent, _scopeId))\n })\n _push(`<!--]--></div>`)\n } else {\n return [\n _createVNode(\"div\", {\n \"mt--4\": \"\",\n px2: \"\",\n grid: \"~ cols-minmax-8rem\"\n }, [\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(items, (a) => {\n return (_openBlock(), _createBlock(_component_AssetGridItem, {\n key: a.path,\n asset: a,\n folder: folder,\n onClick: ($event: any) => (selected.value = a)\n }, null, 8, [\"asset\", \"folder\", \"onClick\"]))\n }), 128))\n ])\n ]\n }\n }),\n _: 2\n }, _parent))\n })\n _push(`<!--]-->`)\n } else {\n _push(`<div p2 grid=\"~ cols-minmax-8rem\"><!--[-->`)\n _ssrRenderList(filtered.value, (a) => {\n _push(_ssrRenderComponent(_component_AssetGridItem, {\n key: a.path,\n asset: a,\n onClick: ($event: any) => (selected.value = a)\n }, null, _parent))\n })\n _push(`<!--]--></div>`)\n }\n _push(`<!--]-->`)\n } else {\n _push(`<div><!--[-->`)\n _ssrRenderList(byTree.value, (item, key) => {\n _push(_ssrRenderComponent(_component_AssetListItem, {\n key: key,\n modelValue: selected.value,\n \"onUpdate:modelValue\": ($event: any) => ((selected).value = $event),\n item: item\n }, null, _parent))\n })\n _push(`<!--]--></div>`)\n }\n _push(_ssrRenderComponent(_component_NDrawer, {\n \"model-value\": !!selected.value,\n \"auto-close\": \"\",\n \"w-120\": \"\",\n top: navbar.value,\n onClose: ($event: any) => (selected.value = undefined)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n if (selected.value) {\n _push(_ssrRenderComponent(_component_AssetDetails, {\n modelValue: selected.value,\n \"onUpdate:modelValue\": ($event: any) => ((selected).value = $event)\n }, null, _parent, _scopeId))\n } else {\n _push(`<!---->`)\n }\n } else {\n return [\n (selected.value)\n ? (_openBlock(), _createBlock(_component_AssetDetails, {\n key: 0,\n modelValue: selected.value,\n \"onUpdate:modelValue\": ($event: any) => ((selected).value = $event)\n }, null, 8, [\"modelValue\", \"onUpdate:modelValue\"]))\n : _createCommentVNode(\"\", true)\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(`</div>`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { AssetInfo } from '~/../src/types'\nimport { onKeyDown, reactiveComputed } from '@vueuse/core'\nimport Fuse from 'fuse.js'\nimport { computed, ref } from 'vue'\nimport { definePageMeta } from '#imports'\nimport { DETAILS_MAX_ITEMS } from '~/composables/constants'\nimport { useStaticAssets } from '~/composables/state'\nimport { useDevToolsOptions } from '~/composables/storage-options'\n\ndefinePageMeta({\n icon: 'carbon-image-copy',\n title: 'Assets',\n layout: 'full',\n})\n\nconst assets = useStaticAssets()\nconst dropzone = ref(false)\nconst search = ref('')\n\nconst fuse = computed(() => new Fuse(assets.value || [], {\n keys: [\n 'path',\n ],\n}))\n\nconst extensions = reactiveComputed(() => {\n const results: { name: string, value: boolean }[] = []\n for (const asset of assets.value || []) {\n const ext = asset.path.split('.').pop()\n if (ext && !results.some(e => e.name === ext))\n results.push({ name: ext, value: true })\n }\n return results\n})\n\nconst filtered = computed(() => {\n const result = search.value\n ? fuse.value.search(search.value).map(i => i.item)\n : (assets.value || [])\n return result.filter((asset) => {\n const ext = asset.path.split('.').pop()\n return !ext || extensions.some(e => e.name === ext && e.value)\n })\n})\n\nconst byFolders = computed(() => {\n const result: Record<string, AssetInfo[]> = {}\n for (const asset of filtered.value) {\n const folder = `${asset.path.split('/').slice(0, -1).join('/')}/`\n if (!result[folder])\n result[folder] = []\n result[folder].push(asset)\n }\n return Object.entries(result).sort(([a], [b]) => a.localeCompare(b))\n})\n\nconst byTree = computed(() => {\n const root = { path: 'public', children: [] }\n\n const addToTree = (node: any, pathParts: any, file: AssetInfo) => {\n const [currentPart, ...remainingParts] = pathParts\n\n let child = node.children.find((child: any) => child.path === currentPart)\n if (!child) {\n child = { ...file, path: currentPart, children: [] }\n node.children.push(child)\n }\n\n if (remainingParts.length > 1)\n addToTree(child, remainingParts, file)\n else if (remainingParts.length === 1)\n child.children.push({ ...file, path: remainingParts[0] })\n }\n\n filtered.value.forEach((file) => {\n const pathParts = file.path.split('/').filter(part => part !== '')\n addToTree(root, pathParts, file)\n })\n\n return root.children\n})\n\nconst selected = ref<AssetInfo>()\n\nconst { view } = useDevToolsOptions('assets')\n\nfunction toggleView() {\n view.value = view.value === 'list' ? 'grid' : 'list'\n}\n\nonKeyDown('Escape', () => {\n selected.value = undefined\n})\n\nconst navbar = ref<HTMLElement>()\n</script>\n\n<template>\n <div h-full of-auto>\n <NNavbar ref=\"navbar\" v-model:search=\"search\" pb2>\n <template #actions>\n <div flex-none flex=\"~ gap2 items-center\" text-lg>\n <NButton\n v-tooltip.bottom-end=\"'File Upload'\"\n icon=\"carbon:cloud-upload\"\n title=\"File Upload\" :border=\"false\"\n @click=\"dropzone = !dropzone\"\n />\n <NDropdown v-if=\"extensions.length\" direction=\"end\" n=\"sm primary\">\n <template #trigger=\"{ click }\">\n <NButton\n v-tooltip.bottom-end=\"'Filter'\"\n icon=\"carbon-filter\" :border=\"false\"\n title=\"Filter\" p3 text-lg\n @click=\"click()\"\n />\n <span flex=\"~ items-center justify-center\" absolute bottom--1 right--1 h-4 w-4 rounded-full bg-primary:30 text-8px>\n {{ extensions.length }}\n </span>\n </template>\n <div flex=\"~ col\" w-30 of-auto>\n <NCheckbox\n v-for=\"item of extensions\"\n :key=\"item.name\"\n v-model=\"item.value\"\n flex=\"~ gap-2\"\n rounded\n px2 py2\n >\n <span text-xs op75>\n {{ item.name }}\n </span>\n </NCheckbox>\n </div>\n </NDropdown>\n <NButton\n v-tooltip.bottom-end=\"'Toggle View'\"\n text-lg :border=\"false\"\n :icon=\"view === 'grid' ? 'i-carbon-list' : 'i-carbon-grid'\"\n title=\"Toggle view\"\n @click=\"toggleView\"\n />\n </div>\n </template>\n <div op50>\n <span v-if=\"search\">{{ filtered.length }} matched · </span>\n <span>{{ assets?.length }} assets in total</span>\n </div>\n </NNavbar>\n\n <AssetDropZone v-model=\"dropzone\" folder=\"/\" />\n\n <template v-if=\"view === 'grid'\">\n <template v-if=\"byFolders.length > 1\">\n <NSectionBlock\n v-for=\"[folder, items] of byFolders\"\n :key=\"folder\"\n :text=\"folder\"\n :description=\"`${items.length} items`\"\n :open=\"items.length <= DETAILS_MAX_ITEMS\"\n :padding=\"false\"\n >\n <div mt--4 px2 grid=\"~ cols-minmax-8rem\">\n <AssetGridItem v-for=\"a of items\" :key=\"a.path\" :asset=\"a\" :folder=\"folder\" @click=\"selected = a\" />\n </div>\n </NSectionBlock>\n </template>\n <div v-else p2 grid=\"~ cols-minmax-8rem\">\n <AssetGridItem v-for=\"a of filtered\" :key=\"a.path\" :asset=\"a\" @click=\"selected = a\" />\n </div>\n </template>\n <div v-else>\n <AssetListItem\n v-for=\"item, key of byTree\" :key=\"key\"\n v-model=\"selected\"\n :item=\"item\"\n />\n </div>\n <NDrawer\n :model-value=\"!!selected\"\n auto-close w-120\n :top=\"navbar\"\n @close=\"selected = undefined\"\n >\n <AssetDetails v-if=\"selected\" v-model=\"selected\" />\n </NDrawer>\n </div>\n</template>\n\n<style>\nimg {\n -webkit-user-drag: none;\n -khtml-user-drag: none;\n -moz-user-drag: none;\n -o-user-drag: none;\n user-drag: none;\n}\n</style>\n"],"version":3}
|