@nuxt/devtools 4.0.0-alpha.15 → 4.0.0-alpha.17
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/AuthRequiredPanel-znjaI7oT.js.map.json +1 -0
- package/dist/_nuxt/CodeDiff-DgjeLx6z.js.map.json +1 -0
- package/dist/_nuxt/CodeSnippets-CgfcaS4Z.js.map.json +1 -0
- package/dist/_nuxt/ComposableItem-BWQR7_fI.js.map.json +1 -0
- package/dist/_nuxt/DataSchemaButton-CqEfc2TV.js.map.json +1 -0
- package/dist/_nuxt/DataSchemaDrawer-Xj8YzNJN.js.map.json +1 -0
- package/dist/_nuxt/DurationDisplay-Dzweg1by.js.map.json +1 -0
- package/dist/_nuxt/FilepathItem-D75bkTSa.js.map.json +1 -0
- package/dist/_nuxt/HelpFab-CH7NlsDf.js.map.json +1 -0
- package/dist/_nuxt/LaunchPage-ByG-3KVi.js.map.json +1 -0
- package/dist/_nuxt/NBadge-BNJzHbtD.js.map.json +1 -0
- package/dist/_nuxt/NCard-mHVN2GYZ.js.map.json +1 -0
- package/dist/_nuxt/NCheckbox-OMIu_LTG.js.map.json +1 -0
- package/dist/_nuxt/NCodeBlock-C2Ewa6VO.js.map.json +1 -0
- package/dist/_nuxt/NDrawer-C6Opm19C.js.map.json +1 -0
- package/dist/_nuxt/NDropdown-DseEG3tA.js.map.json +1 -0
- package/dist/_nuxt/NIcon-cjduOh_B.js.map.json +1 -0
- package/dist/_nuxt/NIconTitle-C75MU0px.js.map.json +1 -0
- package/dist/_nuxt/NLink-Rsxlt1NN.js.map.json +1 -0
- package/dist/_nuxt/NMarkdown-DFwJ-ppZ.js.map.json +1 -0
- package/dist/_nuxt/NNavbar-CS-Z1Cle.js.map.json +1 -0
- package/dist/_nuxt/NPanelGrids-CEorXUWJ.js.map.json +1 -0
- package/dist/_nuxt/NSectionBlock-C7kcMkbf.js.map.json +1 -0
- package/dist/_nuxt/NSelect-geGP1eOG.js.map.json +1 -0
- package/dist/_nuxt/NSelectTabs-nUMnNQy-.js.map.json +1 -0
- package/dist/_nuxt/NSplitPane-Bh0o_t5e.js.map.json +1 -0
- package/dist/_nuxt/NTip-DRnTpLjG.js.map.json +1 -0
- package/dist/_nuxt/ServerRouteInputs-BhIrPxPN.js.map.json +1 -0
- package/dist/_nuxt/StacktraceList-B-ehJIQ-.js.map.json +1 -0
- package/dist/_nuxt/StateEditor-Yqdbqk_c.js.map.json +1 -0
- package/dist/_nuxt/__blank-BM2yOFO6.js.map.json +1 -0
- package/dist/_nuxt/analyze-build-Cemp_oBq.js.map.json +1 -0
- package/dist/_nuxt/assets-rTFAaows.js.map.json +1 -0
- package/dist/_nuxt/client-r5qP-99Q.js.map.json +1 -0
- package/dist/_nuxt/color-BL_mIEWV.js.map.json +1 -0
- package/dist/_nuxt/components-BJnHweOE.js.map.json +1 -0
- package/dist/_nuxt/constants-D9kP6ji9.js.map.json +1 -0
- package/dist/_nuxt/custom-_name_-DI8dnRDD.js.map.json +1 -0
- package/dist/_nuxt/debug-BcJZ8M6i.js.map.json +1 -0
- package/dist/_nuxt/default-Bzh4dZQ5.js.map.json +1 -0
- package/dist/_nuxt/entry-DZwY6FLS.js.map.json +1 -0
- package/dist/_nuxt/error-404-dySA7T2P.js.map.json +1 -0
- package/dist/_nuxt/error-500-2Ody89Er.js.map.json +1 -0
- package/dist/_nuxt/error-hGc4cWUU.js.map.json +1 -0
- package/dist/_nuxt/full-CvSnaO29.js.map.json +1 -0
- package/dist/_nuxt/head-BTCtirw3.js.map.json +1 -0
- package/dist/_nuxt/hooks-BVzlIVXR.js.map.json +1 -0
- package/dist/_nuxt/imports-B3k4BZF7.js.map.json +1 -0
- package/dist/_nuxt/modules-Ck915TxZ.js.map.json +1 -0
- package/dist/_nuxt/none-Df66KJph.js.map.json +1 -0
- package/dist/_nuxt/nuxt-C5VITehY.js.map.json +1 -0
- package/dist/_nuxt/nuxt-link-C-BBeF5l.js.map.json +1 -0
- package/dist/_nuxt/open-graph-ll_bjX_m.js.map.json +1 -0
- package/dist/_nuxt/overview-CyqDmfdE.js.map.json +1 -0
- package/dist/_nuxt/pages-BddDWJsZ.js.map.json +1 -0
- package/dist/_nuxt/pages-CrUWMxGz.js.map.json +1 -0
- package/dist/_nuxt/pages-DWELoQlh.js.map.json +1 -0
- package/dist/_nuxt/payload-29bFuqLh.js.map.json +1 -0
- package/dist/_nuxt/plugins-fmmRaH-S.js.map.json +1 -0
- package/dist/_nuxt/ready-BQ1fhXgL.js.map.json +1 -0
- package/dist/_nuxt/runtime-configs-iL68LNkj.js.map.json +1 -0
- package/dist/_nuxt/server-routes-Dy5_Ljmu.js.map.json +1 -0
- package/dist/_nuxt/server-tasks-CD-7IPFD.js.map.json +1 -0
- package/dist/_nuxt/settings-Qa45tU8e.js.map.json +1 -0
- package/dist/_nuxt/state-components-CksF081b.js.map.json +1 -0
- package/dist/_nuxt/state-modules-CyH4hWeN.js.map.json +1 -0
- package/dist/_nuxt/state-tabs-m1o-BX5R.js.map.json +1 -0
- package/dist/_nuxt/storage-BylO3p9r.js.map.json +1 -0
- package/dist/_nuxt/timeline-Dukbqafi.js.map.json +1 -0
- package/dist/_nuxt/utils-BfB0tRbX.js.map.json +1 -0
- package/dist/_nuxt/virtual-files-BQJM45QE.js.map.json +1 -0
- package/dist/chunks/module-main.mjs +1 -1
- package/dist/dirs.d.cts +1 -0
- package/dist/index.mjs.map.json +1 -0
- package/dist/module.d.cts +2 -0
- package/dist/module.json +1 -1
- package/dist/server.mjs.map.json +1 -0
- package/dist/types.d.cts +2 -0
- package/dist/webcomponents/index.d.cts +1 -0
- package/package.json +30 -30
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"assets-rTFAaows.js","mappings":";;;;;;;;;;;;;;;;AAYA,IAAA,4DAA4B,8BAAiB;CAC3C,QAAQ;CACR,mBAAmB;CACnB,OAAO;EACP,YAAY;GACV,MAAM;GACN,UAAU;EACZ;EACA,QAAQ;GACN,MAAM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I,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 { ssrRenderClass as _ssrRenderClass, ssrRenderComponent as _ssrRenderComponent, 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\"><div class=\"${\n _ssrRenderClass(icon.value)\n }\"></div><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 <div :class=\"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}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"client-r5qP-99Q.js","mappings":";;AAKA,IAAI;AAEJ,IAAM,MAAM,CAAC;AAEb,SAAgB,0BAA0B,IAAgD;CACxF,IAAI,KAAK,EAAE;AA8Bb;AA0BA,SAAgB,oBAAoB;CAClC,IAAI,CAAC,WAAW;EACd,YAAY,WAAiD;EAE7D,0BAA0B,KAAK;CACjC;CAEA,SAAS,qBAAqB;EAC5B,IAAI,WACF,WAAW,SAAS;CAExB;CAEA,SAAS,MAAM,QAAkC;EAC/C,UAAW,QAAQ;EACnB,IAAI,OAAO,MACT,OAAO,KAAK,MAAM,KAAK,0BAA0B,kBAAkB;CACvE;CAEA,OAAO;AACT;;;AClFA,IAAa,iBAA4D,kBAAkB","names":[],"sources":["../../../../../../../../../../devtools-kit/src/runtime/iframe-client.ts","../../../../../../../../../../devtools-ui-kit/src/runtime/client.ts"],"sourcesContent":["import type { DevToolsRpcClient } from '@vitejs/devtools-kit/client'\nimport type { Ref } from 'vue'\nimport type { NuxtDevtoolsIframeClient } from '../types'\nimport { shallowRef, triggerRef } from 'vue'\n\nlet clientRef: Ref<NuxtDevtoolsIframeClient | undefined> | undefined\nconst hasSetup = false\nconst fns = [] as ((client: NuxtDevtoolsIframeClient) => void)[]\n\nexport function onDevtoolsClientConnected(fn: (client: NuxtDevtoolsIframeClient) => void) {\n fns.push(fn)\n\n if (hasSetup)\n return\n\n if (typeof window === 'undefined')\n return\n\n // eslint-disable-next-line ts/ban-ts-comment\n // @ts-ignore injection\n if (window.__NUXT_DEVTOOLS__) {\n // eslint-disable-next-line ts/ban-ts-comment\n // @ts-ignore injection\n fns.forEach(fn => fn(window.__NUXT_DEVTOOLS__))\n }\n\n Object.defineProperty(window, '__NUXT_DEVTOOLS__', {\n set(value) {\n if (value)\n fns.forEach(fn => fn(value))\n },\n get() {\n return clientRef!.value\n },\n configurable: true,\n })\n\n return () => {\n fns.splice(fns.indexOf(fn), 1)\n }\n}\n\n/**\n * Run a callback once the Vite DevTools client is ready, receiving the connected\n * `DevToolsRpcClient` — the client-side mirror of the server's\n * `onDevtoolsReady((ctx) => …)`.\n *\n * This is the recommended way to do client-side DevTools integration (register\n * client RPC functions, call server functions, shared state, streaming, …):\n *\n * ```ts\n * import { onDevtoolsReady } from '@nuxt/devtools-kit/iframe-client'\n *\n * onDevtoolsReady((kit) => {\n * kit.client.register({ name: 'my-module:on-update', type: 'event', handler })\n * })\n * ```\n */\nexport function onDevtoolsReady(fn: (kit: DevToolsRpcClient) => void) {\n return onDevtoolsClientConnected((client) => {\n const kit = client.devtools.devtoolsKit\n if (kit)\n fn(kit)\n })\n}\n\nexport function useDevtoolsClient() {\n if (!clientRef) {\n clientRef = shallowRef<NuxtDevtoolsIframeClient | undefined>()\n\n onDevtoolsClientConnected(setup)\n }\n\n function onUpdateReactivity() {\n if (clientRef) {\n triggerRef(clientRef)\n }\n }\n\n function setup(client: NuxtDevtoolsIframeClient) {\n clientRef!.value = client\n if (client.host)\n client.host.hooks.hook('host:update:reactivity', onUpdateReactivity)\n }\n\n return clientRef\n}\n","import type { NuxtDevtoolsIframeClient } from '@nuxt/devtools-kit/types'\nimport type { Ref } from 'vue'\nimport { useDevtoolsClient } from '@nuxt/devtools-kit/iframe-client'\n\nexport const devToolsClient: Ref<NuxtDevtoolsIframeClient | undefined> = useDevtoolsClient()\n"],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"color-BL_mIEWV.js","mappings":";AAAA,SAAgB,0BAA0B,MAAc,aAAa,IAAI,YAAY,IAAI,UAA2B,GAAG;CACrH,IAAI,OAAO;CACX,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAC/B,OAAO,KAAK,WAAW,CAAC,MAAM,QAAQ,KAAK;CAE7C,OAAO,QADG,OAAO,IACA,IAAI,WAAW,KAAK,UAAU,KAAK,QAAQ;AAC9D","names":[],"sources":["../../../../../../../../../../devtools-ui-kit/src/composables/color.ts"],"sourcesContent":["export function getHslColorFromStringHash(name: string, saturation = 65, lightness = 50, opacity: number | string = 1) {\n let hash = 0\n for (let i = 0; i < name.length; i++)\n hash = name.charCodeAt(i) + ((hash << 5) - hash)\n const h = hash % 360\n return `hsla(${h}, ${saturation}%, ${lightness}%, ${opacity})`\n}\n"],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"components-BJnHweOE.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACSA,IAAA,4DAA4B,8BAAiB;CAC3C,QAAQ;CACR,mBAAmB;CACnB,OAAO,EACL,WAAW,CAAC,EACd;CACA,MAAM,SAAc;EAEtB,MAAM,QAAQ;EAGd,MAAM,OAAO,eAAe,MAAM,UAAU,cAAc,WAAW,MAAM,UAAU,QAAQ,MAAM,UAAU,UAAU,MAAM,UAAU,aAAa,EAAE,CAAC;EAEvJ,QAAQ,MAAU,OAAW,SAAa,WAAgB;GACxD,MAAM,QACJ,eAAgB,WAAY;IAC1B,WAAW;IACX,aAAa;GACf,GAAG,MAAM,CAAC,EACX,6BACC,eAAgB,KAAK,KAAK,EAC3B,mCAAmC;EACtC;CACA;AAEA,CAAC;;;;;;;;;;;;AExBD,IAAA,+DAA4B,8BAAiB;CAC3C,QAAQ;CACR,mBAAmB;CACnB,OAAO;EACL,WAAW,CAAC;EACZ,cAAc,CAAC;EACf,YAAY,CAAC;CACf;CACA,MAAM,SAAc;EAEtB,MAAM,QAAQ;EAGd,MAAM,OAAO,eAAe,MAAM,UAAU,cAAc,WAAW,MAAM,UAAU,QAAQ,MAAM,UAAU,UAAU,MAAM,UAAU,aAAa,EAAE,CAAC;EAEvJ,MAAM,WAAW,eAAe,MAAM,UAAU,YAAY,MAAM,UAAU,QA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c,KAAK;KACvB,CACF,CAAC,IACD,mBAAoB,IAAI,IAAI,CAClC,CAAC,CACH;IAEJ,CAAC;IACD,GAAG;GACL,CAAC,GAAG,OAAO;GACX,MAAM,QAAQ;GACd,MAAM,mBAAoB,oBAAoB,MAAM;IAClD,SAAS,SAAU,GAAG,OAAO,SAAS,aAAa;KACjD,IAAI,OACF,MAAM,mBAAoB,2BAA2B,MAAM,MAAM,SAAS,QAAQ,CAAC;UAEnF,OAAO,CACL,YAAa,yBAAyB,CACxC;IAEJ,CAAC;IACD,GAAG;GACL,GAAG,OAAO,CAAC;GACX,MAAM,UAAU;EAClB;CACA;AAEA,CAAC","names":[],"sources":["../../../../../../../../components/docs/components.md","../../../../../../../../components/ComponentName.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/ComponentName.vue","../../../../../../../../components/ComponentDetails.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/ComponentDetails.vue","../../../../../../../../components/ComponentsGraph.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/ComponentsGraph.vue","../../../../../../../../components/ComponentItem.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/ComponentItem.vue","../../../../../../../../components/ComponentsList.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/ComponentsList.vue","../../../../../../../../pages/modules/components.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../pages/modules/components.vue"],"sourcesContent":["# Components\n\nVue Components allow us to split the UI into independent and reusable pieces, and think about each piece in isolation. This is very similar to how we nest native HTML elements, but Vue implements its own component model that allow us to encapsulate custom content and logic in each component.\n\nComponents placed in the components/ directory are automatically registered by Nuxt. They can be used in your templates without importing them.\n\n[Learn more in the documentation](https://nuxt.com/docs/guide/directory-structure/components)\n","import { defineComponent as _defineComponent } from 'vue'\nimport { mergeProps as _mergeProps } from \"vue\"\nimport { ssrRenderAttrs as _ssrRenderAttrs, ssrInterpolate as _ssrInterpolate } from \"vue/server-renderer\"\n\nimport type { Component } from 'nuxt/schema'\nimport { pascalCase } from 'scule'\nimport { computed } from 'vue'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'ComponentName',\n __ssrInlineRender: true,\n props: {\n component: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\n// @ts-expect-error types\nconst name = computed(() => props.component.pascalName || pascalCase(props.component.name || props.component.__name || props.component.kebabName || ''))\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n _push(`<code${\n _ssrRenderAttrs(_mergeProps({\n \"text-sm\": \"\",\n \"font-mono\": \"\"\n }, _attrs))\n }><span mr1 op20><</span>${\n _ssrInterpolate(name.value)\n }<span ml1 op20>/></span></code>`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { Component } from 'nuxt/schema'\nimport { pascalCase } from 'scule'\nimport { computed } from 'vue'\n\nconst props = defineProps<{\n component: Component\n}>()\n\n// @ts-expect-error types\nconst name = computed(() => props.component.pascalName || pascalCase(props.component.name || props.component.__name || props.component.kebabName || ''))\n</script>\n\n<template>\n <code text-sm font-mono><span mr1 op20><</span>{{ name }}<span ml1 op20>/></span></code>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, withCtx as _withCtx, createTextVNode as _createTextVNode, unref as _unref, mergeProps as _mergeProps } from \"vue\"\nimport { ssrRenderComponent as _ssrRenderComponent, ssrRenderSlot as _ssrRenderSlot, ssrRenderAttrs as _ssrRenderAttrs, ssrInterpolate as _ssrInterpolate, ssrRenderList as _ssrRenderList } from \"vue/server-renderer\"\n\nimport type { Component } from 'nuxt/schema'\nimport { pascalCase } from 'scule'\nimport { computed } from 'vue'\nimport { useCopy } from '~/composables/editor'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'ComponentDetails',\n __ssrInlineRender: true,\n props: {\n component: {},\n dependencies: {},\n dependents: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\n// @ts-expect-error types\nconst name = computed(() => props.component.pascalName || pascalCase(props.component.name || props.component.__name || props.component.kebabName || ''))\n// @ts-expect-error types\nconst filePath = computed(() => props.component.filePath || props.component.file || props.component.__file || '')\nconst copy = useCopy()\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_ComponentName = _resolveComponent(\"ComponentName\")!\n const _component_NButton = _resolveComponent(\"NButton\")!\n const _component_NBadge = _resolveComponent(\"NBadge\")!\n const _component_FilepathItem = _resolveComponent(\"FilepathItem\")!\n\n _push(`<div${_ssrRenderAttrs(_mergeProps({\n flex: \"~ col gap1\",\n \"items-start\": \"\",\n \"of-hidden\": \"\"\n }, _attrs))}><div flex=\"~ gap2 items-center\" px3>`)\n _push(_ssrRenderComponent(_component_ComponentName, { component: __props.component }, null, _parent))\n if (__props.component.meta?.docs && typeof __props.component.meta.docs === 'string') {\n _push(_ssrRenderComponent(_component_NButton, {\n title: \"Open docs\",\n \"flex-none\": \"\",\n n: \"xs\",\n to: __props.component.meta.docs,\n target: \"_blank\",\n icon: \"carbon-catalog\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Docs `)\n } else {\n return [\n _createTextVNode(\" Docs \")\n ]\n }\n }),\n _: 1\n }, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(_ssrRenderComponent(_component_NButton, {\n title: \"Copy name\",\n \"flex-none\": \"\",\n n: \"xs\",\n icon: \"carbon-copy\",\n onClick: ($event: any) => (_unref(copy)(`<${name.value}></${name.value}>`, 'component-name'))\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Copy `)\n } else {\n return [\n _createTextVNode(\" Copy \")\n ]\n }\n }),\n _: 1\n }, _parent))\n if (__props.component.global) {\n _push(_ssrRenderComponent(_component_NBadge, {\n n: \"green\",\n title: \"Registered at runtime as a global component\"\n }, null, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(`</div><div px3 pb2>`)\n if (filePath.value) {\n _push(_ssrRenderComponent(_component_FilepathItem, {\n filepath: filePath.value,\n \"w-full\": \"\",\n \"text-sm\": \"\",\n op40: \"\",\n \"group-hover:op75\": \"\"\n }, null, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(`</div>`)\n if (__props.dependents) {\n _push(`<div border=\"t base\" max-h-60 w-full of-auto px3 py3><div text-sm><strong text-primary>${_ssrInterpolate(__props.dependents.length)}</strong><span op50> references</span></div>`)\n if (__props.dependents.length) {\n _push(`<div flex=\"~ col gap-2\" items-start pt3 text-sm op75><!--[-->`)\n _ssrRenderList(__props.dependents, (id) => {\n _push(_ssrRenderComponent(_component_FilepathItem, {\n key: id,\n filepath: id\n }, null, _parent))\n })\n _push(`<!--]--></div>`)\n } else {\n _push(`<!---->`)\n }\n _push(`</div>`)\n } else {\n _push(`<!---->`)\n }\n if (__props.dependencies) {\n _push(`<div border=\"t base\" max-h-60 w-full of-auto px3 py3><div text-sm><strong text-primary>${_ssrInterpolate(__props.dependencies.length)}</strong><span op50> dependencies</span></div>`)\n if (__props.dependencies.length) {\n _push(`<div flex=\"~ col gap-2\" items-start pt3 text-sm op75><!--[-->`)\n _ssrRenderList(__props.dependencies, (id) => {\n _push(_ssrRenderComponent(_component_FilepathItem, {\n key: id,\n filepath: id\n }, null, _parent))\n })\n _push(`<!--]--></div>`)\n } else {\n _push(`<!---->`)\n }\n _push(`</div>`)\n } else {\n _push(`<!---->`)\n }\n _ssrRenderSlot(_ctx.$slots, \"default\", {}, null, _push, _parent)\n _push(`</div>`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { Component } from 'nuxt/schema'\nimport { pascalCase } from 'scule'\nimport { computed } from 'vue'\nimport { useCopy } from '~/composables/editor'\n\nconst props = defineProps<{\n component: Component\n dependencies?: string[]\n dependents?: string[]\n}>()\n\n// @ts-expect-error types\nconst name = computed(() => props.component.pascalName || pascalCase(props.component.name || props.component.__name || props.component.kebabName || ''))\n// @ts-expect-error types\nconst filePath = computed(() => props.component.filePath || props.component.file || props.component.__file || '')\nconst copy = useCopy()\n</script>\n\n<template>\n <div flex=\"~ col gap1\" items-start of-hidden>\n <div flex=\"~ gap2 items-center\" px3>\n <ComponentName :component=\"component\" />\n <NButton\n v-if=\"component.meta?.docs && typeof component.meta.docs === 'string'\"\n title=\"Open docs\" flex-none n=\"xs\"\n :to=\"component.meta.docs\" target=\"_blank\"\n icon=\"carbon-catalog\"\n >\n Docs\n </NButton>\n <NButton\n title=\"Copy name\" flex-none n=\"xs\"\n icon=\"carbon-copy\"\n @click=\"copy(`<${name}></${name}>`, 'component-name')\"\n >\n Copy\n </NButton>\n <NBadge\n v-if=\"component.global\"\n n=\"green\"\n title=\"Registered at runtime as a global component\"\n v-text=\"'runtime'\"\n />\n </div>\n <div px3 pb2>\n <FilepathItem\n v-if=\"filePath\"\n :filepath=\"filePath\"\n w-full text-sm op40 group-hover:op75\n />\n </div>\n\n <div v-if=\"dependents\" border=\"t base\" max-h-60 w-full of-auto px3 py3>\n <div text-sm>\n <strong text-primary>{{ dependents.length }}</strong><span op50> references</span>\n </div>\n <div v-if=\"dependents.length\" flex=\"~ col gap-2\" items-start pt3 text-sm op75>\n <FilepathItem\n v-for=\"id of dependents\" :key=\"id\"\n :filepath=\"id\"\n />\n </div>\n </div>\n\n <div v-if=\"dependencies\" border=\"t base\" max-h-60 w-full of-auto px3 py3>\n <div text-sm>\n <strong text-primary>{{ dependencies.length }}</strong><span op50> dependencies</span>\n </div>\n <div v-if=\"dependencies.length\" flex=\"~ col gap-2\" items-start pt3 text-sm op75>\n <FilepathItem\n v-for=\"id of dependencies\" :key=\"id\"\n :filepath=\"id\"\n />\n </div>\n </div>\n\n <slot />\n </div>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, unref as _unref, withCtx as _withCtx, createVNode as _createVNode, isRef as _isRef, createTextVNode as _createTextVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot } from \"vue\"\nimport { ssrRenderComponent as _ssrRenderComponent, ssrRenderSlot as _ssrRenderSlot } from \"vue/server-renderer\"\n\nimport type { Component, NuxtLayout, NuxtPage } from 'nuxt/schema'\nimport type { Data, DataSetNodes, Node, Options } from 'vis-network'\nimport type { ComponentRelationship } from '~/../src/types'\nimport { useDebounce } from '@vueuse/core'\nimport { DataSet } from 'vis-data'\nimport { Network } from 'vis-network'\nimport { computed, onMounted, ref, shallowRef, watch } from 'vue'\nimport { getColorMode } from '~/composables/client'\nimport { useLayouts, useServerConfig, useServerPages } from '~/composables/state'\nimport { useDevToolsOptions } from '../composables/storage-options'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'ComponentsGraph',\n __ssrInlineRender: true,\n props: {\n components: {},\n relationships: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst container = ref<HTMLElement>()\nconst navbar = ref<HTMLElement>()\nconst colorMode = getColorMode()\n\nconst selected = shallowRef<{\n id: string\n component?: Component\n page?: NuxtPage\n layout?: NuxtLayout\n relationship?: ComponentRelationship\n}>()\n\nconst pages = useServerPages()\nconst config = useServerConfig()\nconst layouts = useLayouts()\n\nconst {\n componentsGraphShowNodeModules: showNodeModules,\n componentsGraphShowGlobalComponents: showGlobalComponents,\n componentsGraphShowPages: showPages,\n componentsGraphShowLayouts: showLayouts,\n componentsGraphShowWorkspace: showWorkspace,\n} = useDevToolsOptions('ui')\n\nconst selectedFilter = ref<ComponentRelationship>()\n\nconst search = ref('')\nconst searchDebounced = useDebounce(search, 300)\n\nconst entries = computed(() => {\n const relations = (props.relationships || [])\n if (selectedFilter.value) {\n const set = new Set<ComponentRelationship>()\n function addToSet(rel?: ComponentRelationship) {\n if (!rel || set.has(rel))\n return\n set.add(rel)\n rel.deps.forEach((dep) => {\n addToSet(relations.find(i => i.id === dep))\n })\n }\n addToSet(selectedFilter.value)\n return [...set]\n }\n return relations\n})\n\nconst data = computed<Data>(() => {\n const nodes: Data['nodes'] = entries.value.map((rel): Node | null => {\n const component = props.components.find(i => i.filePath === rel.id)\n const page = pages.value?.find(i => i.file === rel.id)\n const layout = layouts.value?.find(i => i.file === rel.id)\n\n const group = rel.id.includes('/node_modules/')\n ? 'lib'\n : component\n ? component.global\n ? 'global'\n : 'user'\n : layout\n ? 'layout'\n : page\n ? 'page'\n : 'unknown'\n\n if (!showNodeModules.value && group === 'lib')\n return null\n if (!showPages.value && group === 'page')\n return null\n if (!showLayouts.value && group === 'layout')\n return null\n if (!showWorkspace.value && group === 'user' && config.value && !rel.id.startsWith(config.value.rootDir))\n return null\n if (!showGlobalComponents.value && group === 'global')\n return null\n\n const shape = group === 'layout'\n ? 'hexagon'\n : group === 'page'\n ? 'square'\n : 'dot'\n\n const isGrayedOut = searchDebounced.value && !rel.id.toLowerCase().includes(searchDebounced.value.toLowerCase())\n\n return {\n id: rel.id,\n label: getComponentName(rel.id),\n group,\n shape,\n size: 15 + Math.min(rel.deps.length / 2, 8),\n font: {\n color: isGrayedOut ? '#8885' : (colorMode.value === 'dark' ? 'white' : 'black'),\n },\n color: isGrayedOut ? '#8885' : selectedFilter.value?.id === rel.id ? '#82c742' : undefined,\n // @ts-expect-error additional data\n extra: {\n id: rel.id,\n component,\n page,\n layout,\n relationship: rel,\n },\n }\n }).filter((x): x is Node => !!x)\n\n const edges: Data['edges'] = entries.value.flatMap(rel => rel.deps.map(dep => ({\n from: rel.id,\n to: dep,\n arrows: {\n to: {\n enabled: true,\n scaleFactor: 0.8,\n },\n },\n })))\n\n return {\n nodes: new DataSet(nodes),\n edges,\n }\n})\n\nconst selectedDependencies = computed(() => {\n if (!selected.value?.component)\n return []\n const deps = props.relationships?.find(i => i.id === selected.value?.component?.filePath)?.deps\n return deps?.map(i => props.relationships?.find(j => j.id === i)?.id).filter(Boolean) as string[]\n})\n\nconst selectedDependents = computed(() => {\n if (!selected.value?.component)\n return []\n const deps = props.relationships?.filter(i => i.deps.includes(selected.value!.component!.filePath!))\n return deps?.map(i => props.relationships?.find(j => j.id === i.id)?.id).filter(Boolean) as string[]\n})\n\nonMounted(() => {\n const options: Options = {\n nodes: {\n shape: 'dot',\n size: 16,\n },\n physics: {\n repulsion: {\n centralGravity: 0.7,\n springLength: 100,\n springConstant: 0.01,\n },\n maxVelocity: 146,\n solver: 'forceAtlas2Based',\n timestep: 0.35,\n stabilization: {\n enabled: true,\n iterations: 200,\n },\n },\n groups: {\n user: {\n color: '#42b883',\n },\n unknown: {\n color: '#b86542',\n },\n lib: {\n color: '#b4b842',\n },\n page: {\n color: '#42b2b8',\n },\n layout: {\n color: '#4256b8',\n },\n },\n }\n const network = new Network(container.value!, data.value, options)\n\n network.on('click', (e) => {\n const id = e.nodes?.[0]\n const node = ((data.value.nodes as DataSetNodes).get(id) as any).extra\n selected.value = node\n })\n\n watch(data, () => {\n network.setData(data.value)\n })\n})\n\nfunction onCloseDrawer() {\n selected.value = undefined\n}\n\nconst COMPONENTS_PATH_RE = /.*\\/components\\//\nconst VUE_EXT_RE = /\\.vue$/\nconst INDEX_SUFFIX_RE = /\\/index$/\n\nfunction getComponentName(path: string) {\n const component = props.components.find(i => i.filePath === path)\n if (component)\n return component.pascalName\n return path\n .replace(COMPONENTS_PATH_RE, '')\n .replace(VUE_EXT_RE, '')\n .replace(INDEX_SUFFIX_RE, '')\n .split('/')\n .map(part => part.charAt(0).toUpperCase() + part.slice(1))\n .join('')\n}\n\nfunction setFilter() {\n selectedFilter.value = selected.value?.relationship\n selected.value = undefined\n}\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NNavbar = _resolveComponent(\"NNavbar\")!\n const _component_NCheckbox = _resolveComponent(\"NCheckbox\")!\n const _component_NCard = _resolveComponent(\"NCard\")!\n const _component_NDrawer = _resolveComponent(\"NDrawer\")!\n const _component_ComponentDetails = _resolveComponent(\"ComponentDetails\")!\n const _component_NButton = _resolveComponent(\"NButton\")!\n\n _push(`<!--[-->`)\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 absolute: \"\",\n \"left-0\": \"\",\n \"right-0\": \"\",\n \"top-0\": \"\"\n }, {\n actions: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div flex=\"~ gap-x-3 gap-y-1 wrap\" w-full${_scopeId}>`)\n _push(_ssrRenderComponent(_component_NCheckbox, {\n modelValue: _unref(showPages),\n \"onUpdate:modelValue\": ($event: any) => (_isRef(showPages) ? (showPages).value = $event : null),\n n: \"primary sm\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<span op75${_scopeId}>Show pages</span>`)\n } else {\n return [\n _createVNode(\"span\", { op75: \"\" }, \"Show pages\")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(_ssrRenderComponent(_component_NCheckbox, {\n modelValue: _unref(showLayouts),\n \"onUpdate:modelValue\": ($event: any) => (_isRef(showLayouts) ? (showLayouts).value = $event : null),\n n: \"primary sm\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<span op75${_scopeId}>Show layouts</span>`)\n } else {\n return [\n _createVNode(\"span\", { op75: \"\" }, \"Show layouts\")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(_ssrRenderComponent(_component_NCheckbox, {\n modelValue: _unref(showWorkspace),\n \"onUpdate:modelValue\": ($event: any) => (_isRef(showWorkspace) ? (showWorkspace).value = $event : null),\n n: \"primary sm\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<span op75${_scopeId}>Show workspace</span>`)\n } else {\n return [\n _createVNode(\"span\", { op75: \"\" }, \"Show workspace\")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(_ssrRenderComponent(_component_NCheckbox, {\n modelValue: _unref(showNodeModules),\n \"onUpdate:modelValue\": ($event: any) => (_isRef(showNodeModules) ? (showNodeModules).value = $event : null),\n n: \"primary sm\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<span op75${_scopeId}>Show node_modules</span>`)\n } else {\n return [\n _createVNode(\"span\", { op75: \"\" }, \"Show node_modules\")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(_ssrRenderComponent(_component_NCheckbox, {\n modelValue: _unref(showGlobalComponents),\n \"onUpdate:modelValue\": ($event: any) => (_isRef(showGlobalComponents) ? (showGlobalComponents).value = $event : null),\n n: \"primary sm\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<span op75${_scopeId}>Show global components</span>`)\n } else {\n return [\n _createVNode(\"span\", { op75: \"\" }, \"Show global components\")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(`</div>`)\n if (selectedFilter.value) {\n _push(`<button flex=\"~ gap-1\" flex-none items-center rounded-full bg-gray:20 py1 pl3 pr2 text-xs op50 hover:op100${\n _scopeId\n }> Clear filter <div i-carbon-close${\n _scopeId\n }></div></button>`)\n } else {\n _push(`<!---->`)\n }\n _push(`<div flex-auto${_scopeId}></div>`)\n _ssrRenderSlot(_ctx.$slots, \"default\", {}, null, _push, _parent, _scopeId)\n } else {\n return [\n _createVNode(\"div\", {\n flex: \"~ gap-x-3 gap-y-1 wrap\",\n \"w-full\": \"\"\n }, [\n _createVNode(_component_NCheckbox, {\n modelValue: _unref(showPages),\n \"onUpdate:modelValue\": ($event: any) => (_isRef(showPages) ? (showPages).value = $event : null),\n n: \"primary sm\"\n }, {\n default: _withCtx(() => [\n _createVNode(\"span\", { op75: \"\" }, \"Show pages\")\n ]),\n _: 1\n }, 8, [\"modelValue\", \"onUpdate:modelValue\"]),\n _createVNode(_component_NCheckbox, {\n modelValue: _unref(showLayouts),\n \"onUpdate:modelValue\": ($event: any) => (_isRef(showLayouts) ? (showLayouts).value = $event : null),\n n: \"primary sm\"\n }, {\n default: _withCtx(() => [\n _createVNode(\"span\", { op75: \"\" }, \"Show layouts\")\n ]),\n _: 1\n }, 8, [\"modelValue\", \"onUpdate:modelValue\"]),\n _createVNode(_component_NCheckbox, {\n modelValue: _unref(showWorkspace),\n \"onUpdate:modelValue\": ($event: any) => (_isRef(showWorkspace) ? (showWorkspace).value = $event : null),\n n: \"primary sm\"\n }, {\n default: _withCtx(() => [\n _createVNode(\"span\", { op75: \"\" }, \"Show workspace\")\n ]),\n _: 1\n }, 8, [\"modelValue\", \"onUpdate:modelValue\"]),\n _createVNode(_component_NCheckbox, {\n modelValue: _unref(showNodeModules),\n \"onUpdate:modelValue\": ($event: any) => (_isRef(showNodeModules) ? (showNodeModules).value = $event : null),\n n: \"primary sm\"\n }, {\n default: _withCtx(() => [\n _createVNode(\"span\", { op75: \"\" }, \"Show node_modules\")\n ]),\n _: 1\n }, 8, [\"modelValue\", \"onUpdate:modelValue\"]),\n _createVNode(_component_NCheckbox, {\n modelValue: _unref(showGlobalComponents),\n \"onUpdate:modelValue\": ($event: any) => (_isRef(showGlobalComponents) ? (showGlobalComponents).value = $event : null),\n n: \"primary sm\"\n }, {\n default: _withCtx(() => [\n _createVNode(\"span\", { op75: \"\" }, \"Show global components\")\n ]),\n _: 1\n }, 8, [\"modelValue\", \"onUpdate:modelValue\"])\n ]),\n (selectedFilter.value)\n ? (_openBlock(), _createBlock(\"button\", {\n key: 0,\n flex: \"~ gap-1\",\n \"flex-none\": \"\",\n \"items-center\": \"\",\n \"rounded-full\": \"\",\n \"bg-gray:20\": \"\",\n py1: \"\",\n pl3: \"\",\n pr2: \"\",\n \"text-xs\": \"\",\n op50: \"\",\n \"hover:op100\": \"\",\n onClick: ($event: any) => (selectedFilter.value = undefined)\n }, [\n _createTextVNode(\" Clear filter \"),\n _createVNode(\"div\", { \"i-carbon-close\": \"\" })\n ], 8, [\"onClick\"]))\n : _createCommentVNode(\"\", true),\n _createVNode(\"div\", { \"flex-auto\": \"\" }),\n _renderSlot(_ctx.$slots, \"default\")\n ]\n }\n }),\n _: 3\n }, _parent))\n _push(`<div relative h-full w-full><div h-full w-full></div>`)\n _push(_ssrRenderComponent(_component_NCard, {\n absolute: \"\",\n \"bottom-3\": \"\",\n \"left-3\": \"\",\n \"border-0\": \"\",\n \"n-glass-effect\": \"\",\n p2: \"\",\n px3: \"\",\n \"text-sm\": \"\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div grid=\"~ cols-[20px_1fr] items-center gap-y-1\"${\n _scopeId\n }><div h-3 w-3 rounded-full bg-hex-42b883${\n _scopeId\n }></div><div op50${\n _scopeId\n }> Component </div><div h-3 w-3 rounded-full bg-hex-97c2fc${\n _scopeId\n }></div><div op50${\n _scopeId\n }> Global Component </div><div h-3 w-3 bg-hex-42b2b8${\n _scopeId\n }></div><div op50${\n _scopeId\n }> Page </div><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 726 628\" ml--1px h-3${\n _scopeId\n }><path fill=\"#4256b8\" stroke-width=\"4\" d=\"M723 314 543 625.8H183L3 314 183 2.2h360L723 314z\"${\n _scopeId\n }></path></svg><div op50${\n _scopeId\n }> Layout </div><div h-3 w-3 rounded-full bg-hex-b4b842${\n _scopeId\n }></div><div op50${\n _scopeId\n }> Library Component </div><div h-3 w-3 rounded-full bg-hex-b86542${\n _scopeId\n }></div><div op50${\n _scopeId\n }> Unknown </div></div>`)\n } else {\n return [\n _createVNode(\"div\", { grid: \"~ cols-[20px_1fr] items-center gap-y-1\" }, [\n _createVNode(\"div\", {\n \"h-3\": \"\",\n \"w-3\": \"\",\n \"rounded-full\": \"\",\n \"bg-hex-42b883\": \"\"\n }),\n _createVNode(\"div\", { op50: \"\" }, \" Component \"),\n _createVNode(\"div\", {\n \"h-3\": \"\",\n \"w-3\": \"\",\n \"rounded-full\": \"\",\n \"bg-hex-97c2fc\": \"\"\n }),\n _createVNode(\"div\", { op50: \"\" }, \" Global Component \"),\n _createVNode(\"div\", {\n \"h-3\": \"\",\n \"w-3\": \"\",\n \"bg-hex-42b2b8\": \"\"\n }),\n _createVNode(\"div\", { op50: \"\" }, \" Page \"),\n (_openBlock(), _createBlock(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 726 628\",\n \"ml--1px\": \"\",\n \"h-3\": \"\"\n }, [\n _createVNode(\"path\", {\n fill: \"#4256b8\",\n \"stroke-width\": \"4\",\n d: \"M723 314 543 625.8H183L3 314 183 2.2h360L723 314z\"\n })\n ])),\n _createVNode(\"div\", { op50: \"\" }, \" Layout \"),\n _createVNode(\"div\", {\n \"h-3\": \"\",\n \"w-3\": \"\",\n \"rounded-full\": \"\",\n \"bg-hex-b4b842\": \"\"\n }),\n _createVNode(\"div\", { op50: \"\" }, \" Library Component \"),\n _createVNode(\"div\", {\n \"h-3\": \"\",\n \"w-3\": \"\",\n \"rounded-full\": \"\",\n \"bg-hex-b86542\": \"\"\n }),\n _createVNode(\"div\", { op50: \"\" }, \" Unknown \")\n ])\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(_ssrRenderComponent(_component_NDrawer, {\n \"model-value\": !!(selected.value && selected.value.component),\n top: navbar.value,\n border: \"t l base\",\n \"w-80\": \"\",\n onClose: onCloseDrawer\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n if (selected.value && selected.value.component) {\n _push(`<div py4 pt3 flex=\"~ col\"${_scopeId}>`)\n _push(_ssrRenderComponent(_component_ComponentDetails, {\n component: selected.value.component,\n dependencies: selectedDependencies.value,\n dependents: selectedDependents.value\n }, null, _parent, _scopeId))\n _push(`<div border=\"t base\" p4${_scopeId}>`)\n _push(_ssrRenderComponent(_component_NButton, {\n n: \"primary solid\",\n onClick: ($event: any) => (setFilter())\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Filter to this component `)\n } else {\n return [\n _createTextVNode(\" Filter to this component \")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(`</div></div>`)\n } else {\n _push(`<!---->`)\n }\n } else {\n return [\n (selected.value && selected.value.component)\n ? (_openBlock(), _createBlock(\"div\", {\n key: 0,\n py4: \"\",\n pt3: \"\",\n flex: \"~ col\"\n }, [\n _createVNode(_component_ComponentDetails, {\n component: selected.value.component,\n dependencies: selectedDependencies.value,\n dependents: selectedDependents.value\n }, null, 8, [\"component\", \"dependencies\", \"dependents\"]),\n _createVNode(\"div\", {\n border: \"t base\",\n p4: \"\"\n }, [\n _createVNode(_component_NButton, {\n n: \"primary solid\",\n onClick: ($event: any) => (setFilter())\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Filter to this component \")\n ]),\n _: 1\n }, 8, [\"onClick\"])\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(`</div><!--]-->`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { Component, NuxtLayout, NuxtPage } from 'nuxt/schema'\nimport type { Data, DataSetNodes, Node, Options } from 'vis-network'\nimport type { ComponentRelationship } from '~/../src/types'\nimport { useDebounce } from '@vueuse/core'\nimport { DataSet } from 'vis-data'\nimport { Network } from 'vis-network'\nimport { computed, onMounted, ref, shallowRef, watch } from 'vue'\nimport { getColorMode } from '~/composables/client'\nimport { useLayouts, useServerConfig, useServerPages } from '~/composables/state'\nimport { useDevToolsOptions } from '../composables/storage-options'\n\nconst props = defineProps<{\n components: Component[]\n relationships?: ComponentRelationship[] | null\n}>()\n\nconst container = ref<HTMLElement>()\nconst navbar = ref<HTMLElement>()\nconst colorMode = getColorMode()\n\nconst selected = shallowRef<{\n id: string\n component?: Component\n page?: NuxtPage\n layout?: NuxtLayout\n relationship?: ComponentRelationship\n}>()\n\nconst pages = useServerPages()\nconst config = useServerConfig()\nconst layouts = useLayouts()\n\nconst {\n componentsGraphShowNodeModules: showNodeModules,\n componentsGraphShowGlobalComponents: showGlobalComponents,\n componentsGraphShowPages: showPages,\n componentsGraphShowLayouts: showLayouts,\n componentsGraphShowWorkspace: showWorkspace,\n} = useDevToolsOptions('ui')\n\nconst selectedFilter = ref<ComponentRelationship>()\n\nconst search = ref('')\nconst searchDebounced = useDebounce(search, 300)\n\nconst entries = computed(() => {\n const relations = (props.relationships || [])\n if (selectedFilter.value) {\n const set = new Set<ComponentRelationship>()\n function addToSet(rel?: ComponentRelationship) {\n if (!rel || set.has(rel))\n return\n set.add(rel)\n rel.deps.forEach((dep) => {\n addToSet(relations.find(i => i.id === dep))\n })\n }\n addToSet(selectedFilter.value)\n return [...set]\n }\n return relations\n})\n\nconst data = computed<Data>(() => {\n const nodes: Data['nodes'] = entries.value.map((rel): Node | null => {\n const component = props.components.find(i => i.filePath === rel.id)\n const page = pages.value?.find(i => i.file === rel.id)\n const layout = layouts.value?.find(i => i.file === rel.id)\n\n const group = rel.id.includes('/node_modules/')\n ? 'lib'\n : component\n ? component.global\n ? 'global'\n : 'user'\n : layout\n ? 'layout'\n : page\n ? 'page'\n : 'unknown'\n\n if (!showNodeModules.value && group === 'lib')\n return null\n if (!showPages.value && group === 'page')\n return null\n if (!showLayouts.value && group === 'layout')\n return null\n if (!showWorkspace.value && group === 'user' && config.value && !rel.id.startsWith(config.value.rootDir))\n return null\n if (!showGlobalComponents.value && group === 'global')\n return null\n\n const shape = group === 'layout'\n ? 'hexagon'\n : group === 'page'\n ? 'square'\n : 'dot'\n\n const isGrayedOut = searchDebounced.value && !rel.id.toLowerCase().includes(searchDebounced.value.toLowerCase())\n\n return {\n id: rel.id,\n label: getComponentName(rel.id),\n group,\n shape,\n size: 15 + Math.min(rel.deps.length / 2, 8),\n font: {\n color: isGrayedOut ? '#8885' : (colorMode.value === 'dark' ? 'white' : 'black'),\n },\n color: isGrayedOut ? '#8885' : selectedFilter.value?.id === rel.id ? '#82c742' : undefined,\n // @ts-expect-error additional data\n extra: {\n id: rel.id,\n component,\n page,\n layout,\n relationship: rel,\n },\n }\n }).filter((x): x is Node => !!x)\n\n const edges: Data['edges'] = entries.value.flatMap(rel => rel.deps.map(dep => ({\n from: rel.id,\n to: dep,\n arrows: {\n to: {\n enabled: true,\n scaleFactor: 0.8,\n },\n },\n })))\n\n return {\n nodes: new DataSet(nodes),\n edges,\n }\n})\n\nconst selectedDependencies = computed(() => {\n if (!selected.value?.component)\n return []\n const deps = props.relationships?.find(i => i.id === selected.value?.component?.filePath)?.deps\n return deps?.map(i => props.relationships?.find(j => j.id === i)?.id).filter(Boolean) as string[]\n})\n\nconst selectedDependents = computed(() => {\n if (!selected.value?.component)\n return []\n const deps = props.relationships?.filter(i => i.deps.includes(selected.value!.component!.filePath!))\n return deps?.map(i => props.relationships?.find(j => j.id === i.id)?.id).filter(Boolean) as string[]\n})\n\nonMounted(() => {\n const options: Options = {\n nodes: {\n shape: 'dot',\n size: 16,\n },\n physics: {\n repulsion: {\n centralGravity: 0.7,\n springLength: 100,\n springConstant: 0.01,\n },\n maxVelocity: 146,\n solver: 'forceAtlas2Based',\n timestep: 0.35,\n stabilization: {\n enabled: true,\n iterations: 200,\n },\n },\n groups: {\n user: {\n color: '#42b883',\n },\n unknown: {\n color: '#b86542',\n },\n lib: {\n color: '#b4b842',\n },\n page: {\n color: '#42b2b8',\n },\n layout: {\n color: '#4256b8',\n },\n },\n }\n const network = new Network(container.value!, data.value, options)\n\n network.on('click', (e) => {\n const id = e.nodes?.[0]\n const node = ((data.value.nodes as DataSetNodes).get(id) as any).extra\n selected.value = node\n })\n\n watch(data, () => {\n network.setData(data.value)\n })\n})\n\nfunction onCloseDrawer() {\n selected.value = undefined\n}\n\nconst COMPONENTS_PATH_RE = /.*\\/components\\//\nconst VUE_EXT_RE = /\\.vue$/\nconst INDEX_SUFFIX_RE = /\\/index$/\n\nfunction getComponentName(path: string) {\n const component = props.components.find(i => i.filePath === path)\n if (component)\n return component.pascalName\n return path\n .replace(COMPONENTS_PATH_RE, '')\n .replace(VUE_EXT_RE, '')\n .replace(INDEX_SUFFIX_RE, '')\n .split('/')\n .map(part => part.charAt(0).toUpperCase() + part.slice(1))\n .join('')\n}\n\nfunction setFilter() {\n selectedFilter.value = selected.value?.relationship\n selected.value = undefined\n}\n</script>\n\n<template>\n <NNavbar ref=\"navbar\" v-model:search=\"search\" absolute left-0 right-0 top-0>\n <template #actions>\n <div flex=\"~ gap-x-3 gap-y-1 wrap\" w-full>\n <NCheckbox v-model=\"showPages\" n=\"primary sm\">\n <span op75>Show pages</span>\n </NCheckbox>\n <NCheckbox v-model=\"showLayouts\" n=\"primary sm\">\n <span op75>Show layouts</span>\n </NCheckbox>\n <NCheckbox v-model=\"showWorkspace\" n=\"primary sm\">\n <span op75>Show workspace</span>\n </NCheckbox>\n <NCheckbox v-model=\"showNodeModules\" n=\"primary sm\">\n <span op75>Show node_modules</span>\n </NCheckbox>\n <NCheckbox v-model=\"showGlobalComponents\" n=\"primary sm\">\n <span op75>Show global components</span>\n </NCheckbox>\n </div>\n <button v-if=\"selectedFilter\" flex=\"~ gap-1\" flex-none items-center rounded-full bg-gray:20 py1 pl3 pr2 text-xs op50 hover:op100 @click=\"selectedFilter = undefined\">\n Clear filter <div i-carbon-close />\n </button>\n <div flex-auto />\n <slot />\n </template>\n </NNavbar>\n\n <div relative h-full w-full>\n <div ref=\"container\" h-full w-full />\n <NCard absolute bottom-3 left-3 border-0 n-glass-effect p2 px3 text-sm>\n <div grid=\"~ cols-[20px_1fr] items-center gap-y-1\">\n <div h-3 w-3 rounded-full bg-hex-42b883 />\n <div op50>\n Component\n </div>\n <div h-3 w-3 rounded-full bg-hex-97c2fc />\n <div op50>\n Global Component\n </div>\n <div h-3 w-3 bg-hex-42b2b8 />\n <div op50>\n Page\n </div>\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 726 628\" ml--1px h-3>\n <path fill=\"#4256b8\" stroke-width=\"4\" d=\"M723 314 543 625.8H183L3 314 183 2.2h360L723 314z\" />\n </svg>\n <div op50>\n Layout\n </div>\n <div h-3 w-3 rounded-full bg-hex-b4b842 />\n <div op50>\n Library Component\n </div>\n <div h-3 w-3 rounded-full bg-hex-b86542 />\n <div op50>\n Unknown\n </div>\n </div>\n </NCard>\n <NDrawer\n :model-value=\"!!(selected && selected.component)\"\n :top=\"navbar\"\n border=\"t l base\" w-80\n @close=\"onCloseDrawer\"\n >\n <div v-if=\"selected && selected.component\" py4 pt3 flex=\"~ col\">\n <ComponentDetails\n :component=\"selected.component\"\n :dependencies=\"selectedDependencies\"\n :dependents=\"selectedDependents\"\n />\n <div border=\"t base\" p4>\n <NButton n=\"primary solid\" @click=\"setFilter()\">\n Filter to this component\n </NButton>\n </div>\n </div>\n </NDrawer>\n </div>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, mergeProps as _mergeProps } from \"vue\"\nimport { ssrRenderComponent as _ssrRenderComponent, ssrRenderClass as _ssrRenderClass, ssrRenderSlot as _ssrRenderSlot, ssrRenderAttrs as _ssrRenderAttrs, ssrInterpolate as _ssrInterpolate } from \"vue/server-renderer\"\n\nimport type { Component } from 'nuxt/schema'\nimport { computed } from 'vue'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'ComponentItem',\n __ssrInlineRender: true,\n props: {\n component: {},\n dependencies: {},\n dependents: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\n// @ts-expect-error types\nconst filePath = computed(() => props.component.filePath || props.component.file || props.component.__file || '')\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_VDropdown = _resolveComponent(\"VDropdown\")!\n const _component_ComponentName = _resolveComponent(\"ComponentName\")!\n const _component_ComponentDetails = _resolveComponent(\"ComponentDetails\")!\n const _component_NBadge = _resolveComponent(\"NBadge\")!\n const _component_FilepathItem = _resolveComponent(\"FilepathItem\")!\n\n _push(`<div${_ssrRenderAttrs(_mergeProps({\n hover: \"bg-active\",\n class: \"group\",\n flex: \"~ gap2\",\n \"w-full\": \"\",\n \"items-center\": \"\",\n rounded: \"\",\n px2: \"\",\n py1: \"\"\n }, _attrs))}>`)\n _push(_ssrRenderComponent(_component_VDropdown, null, {\n popper: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_ComponentDetails, {\n component: __props.component,\n dependencies: __props.dependencies,\n dependents: __props.dependents,\n \"w-100\": \"\",\n pt3: \"\"\n }, null, _parent, _scopeId))\n } else {\n return [\n _createVNode(_component_ComponentDetails, {\n component: __props.component,\n dependencies: __props.dependencies,\n dependents: __props.dependents,\n \"w-100\": \"\",\n pt3: \"\"\n }, null, 8, [\"component\", \"dependencies\", \"dependents\"])\n ]\n }\n }),\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<button hover:text-primary class=\"${\n _ssrRenderClass(__props.dependents && __props.dependents.length === 0 ? 'op50' : '')\n }\"${\n _scopeId\n }>`)\n _push(_ssrRenderComponent(_component_ComponentName, { component: __props.component }, null, _parent, _scopeId))\n _push(`</button>`)\n } else {\n return [\n _createVNode(\"button\", {\n \"hover:text-primary\": \"\",\n class: __props.dependents && __props.dependents.length === 0 ? 'op50' : ''\n }, [\n _createVNode(_component_ComponentName, { component: __props.component }, null, 8, [\"component\"])\n ], 2)\n ]\n }\n }),\n _: 1\n }, _parent))\n if (__props.dependents?.length) {\n _push(`<sup ml--1 text-primary> x${_ssrInterpolate(__props.dependents?.length)}</sup>`)\n } else {\n _push(`<!---->`)\n }\n if (__props.component.global) {\n _push(_ssrRenderComponent(_component_NBadge, {\n n: \"green\",\n title: \"Registered at runtime as a global component\"\n }, null, _parent))\n } else {\n _push(`<!---->`)\n }\n _ssrRenderSlot(_ctx.$slots, \"default\", {}, null, _push, _parent)\n if (filePath.value) {\n _push(_ssrRenderComponent(_component_FilepathItem, {\n filepath: filePath.value,\n \"text-sm\": \"\",\n op25: \"\",\n \"group-hover:op75\": \"\"\n }, null, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(`</div>`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { Component } from 'nuxt/schema'\nimport { computed } from 'vue'\n\nconst props = defineProps<{\n component: Component\n dependencies?: string[]\n dependents?: string[]\n}>()\n\n// @ts-expect-error types\nconst filePath = computed(() => props.component.filePath || props.component.file || props.component.__file || '')\n</script>\n\n<template>\n <div\n hover=\"bg-active\"\n class=\"group\"\n flex=\"~ gap2\"\n w-full items-center rounded px2 py1\n >\n <VDropdown>\n <button hover:text-primary :class=\"dependents && dependents.length === 0 ? 'op50' : ''\">\n <ComponentName :component=\"component\" />\n </button>\n <template #popper>\n <ComponentDetails\n :component=\"component\"\n :dependencies=\"dependencies\"\n :dependents=\"dependents\"\n w-100 pt3\n />\n </template>\n </VDropdown>\n <sup v-if=\"dependents?.length\" ml--1 text-primary>\n x{{ dependents?.length }}\n </sup>\n <NBadge\n v-if=\"component.global\"\n n=\"green\"\n title=\"Registered at runtime as a global component\"\n v-text=\"'runtime'\"\n />\n <slot />\n <FilepathItem\n v-if=\"filePath\"\n :filepath=\"filePath\"\n text-sm op25 group-hover:op75\n />\n </div>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, withCtx as _withCtx, renderSlot as _renderSlot, createVNode as _createVNode, unref as _unref, mergeProps as _mergeProps, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\nimport { ssrRenderSlot as _ssrRenderSlot, ssrRenderComponent as _ssrRenderComponent, ssrRenderList as _ssrRenderList } from \"vue/server-renderer\"\n\nimport type { Component } from 'nuxt/schema'\nimport type { ComponentRelationship, ComponentWithRelationships } from '../../types'\nimport Fuse from 'fuse.js'\nimport { computed, ref } from 'vue'\nimport { DETAILS_MAX_ITEMS } from '~/composables/constants'\nimport { getComponentRelationships, getModuleNameFromPath, isNodeModulePath, isNuxtPackageName } from '~/composables/utils'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'ComponentsList',\n __ssrInlineRender: true,\n props: {\n components: {},\n relationships: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst search = ref('')\nconst filterMode = ref<'all' | 'using' | 'not-used'>('all')\n\nconst componentWithRelationships = computed(() => {\n const components = props.components\n .map(c => getComponentRelationships(c, props.relationships))\n if (filterMode.value === 'using')\n return components.filter(c => c.dependents?.length)\n else if (filterMode.value === 'not-used')\n return components.filter(c => !c.dependents?.length)\n return components\n})\n\nconst builtinComponentDocs = {\n ClientOnly: 'https://nuxt.com/docs/api/components/client-only',\n DevOnly: 'https://nuxt.com/docs/api/components/dev-only',\n NuxtClientFallback: 'https://nuxt.com/docs/api/components/nuxt-client-fallback',\n NuxtPicture: 'https://nuxt.com/docs/api/components/nuxt-picture',\n NuxtRouteAnnouncer: 'https://nuxt.com/docs/api/components/nuxt-route-announcer',\n NuxtTime: 'https://nuxt.com/docs/api/components/nuxt-time',\n NuxtPage: 'https://nuxt.com/docs/api/components/nuxt-page',\n NuxtLayout: 'https://nuxt.com/docs/api/components/nuxt-layout',\n NuxtLink: 'https://nuxt.com/docs/api/components/nuxt-link',\n NuxtLoadingIndicator: 'https://nuxt.com/docs/api/components/nuxt-loading-indicator',\n NuxtErrorBoundary: 'https://nuxt.com/docs/api/components/nuxt-error-boundary',\n NuxtWelcome: 'https://nuxt.com/docs/api/components/nuxt-welcome',\n NuxtIsland: 'https://nuxt.com/docs/api/components/nuxt-island',\n NuxtImg: 'https://nuxt.com/docs/api/components/nuxt-img',\n}\n\nconst fuse = computed(() => new Fuse(componentWithRelationships.value, {\n keys: [\n 'component.pascalName',\n 'component.filePath',\n 'component.kebabName',\n ],\n}))\n\nconst filtered = computed(() => {\n const user: ComponentWithRelationships[] = []\n const lib = new Map<string, ComponentWithRelationships[]>()\n const builtin: ComponentWithRelationships[] = []\n const runtime: ComponentWithRelationships[] = []\n\n const count = {\n user: 0,\n lib: 0,\n builtin: 0,\n runtime: 0,\n }\n\n const result = search.value\n ? fuse.value.search(search.value).map(i => i.item)\n : componentWithRelationships.value\n\n result\n .forEach((component) => {\n const c = component.component\n if (c.filePath && isNodeModulePath(c.filePath)) {\n const name = getModuleNameFromPath(c.filePath)\n if (!name)\n return\n if (isNuxtPackageName(name)) {\n c.meta ??= {}\n c.meta.docs ??= builtinComponentDocs?.[c.pascalName as keyof typeof builtinComponentDocs]\n builtin.push(component)\n count.builtin++\n }\n else {\n if (!lib.has(name))\n lib.set(name, [])\n lib.get(name)!.push(component)\n count.lib++\n }\n }\n else if (c.global && !c.filePath) {\n runtime.push(component)\n count.runtime++\n }\n else {\n user.push(component)\n count.user++\n }\n })\n\n return {\n count,\n user,\n builtin,\n lib,\n runtime,\n }\n})\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NNavbar = _resolveComponent(\"NNavbar\")!\n const _component_NIcon = _resolveComponent(\"NIcon\")!\n const _component_NSelectTabs = _resolveComponent(\"NSelectTabs\")!\n const _component_NSectionBlock = _resolveComponent(\"NSectionBlock\")!\n const _component_ComponentItem = _resolveComponent(\"ComponentItem\")!\n const _component_NIconTitle = _resolveComponent(\"NIconTitle\")!\n\n _push(`<!--[-->`)\n _push(_ssrRenderComponent(_component_NNavbar, {\n search: search.value,\n \"onUpdate:search\": ($event: any) => ((search).value = $event),\n pb3: \"\"\n }, {\n actions: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _ssrRenderSlot(_ctx.$slots, \"default\", {}, null, _push, _parent, _scopeId)\n } else {\n return [\n _renderSlot(_ctx.$slots, \"default\")\n ]\n }\n }),\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div flex=\"~ gap-2 items-center\"${_scopeId}>`)\n _push(_ssrRenderComponent(_component_NIcon, {\n icon: \"carbon-filter\",\n op50: \"\"\n }, null, _parent, _scopeId))\n _push(_ssrRenderComponent(_component_NSelectTabs, {\n modelValue: filterMode.value,\n \"onUpdate:modelValue\": ($event: any) => ((filterMode).value = $event),\n n: \"primary sm\",\n options: [\n { label: 'All', value: 'all' },\n { label: 'Using', value: 'using' },\n { label: 'Not used', value: 'not-used' },\n ]\n }, null, _parent, _scopeId))\n _push(`</div>`)\n } else {\n return [\n _createVNode(\"div\", { flex: \"~ gap-2 items-center\" }, [\n _createVNode(_component_NIcon, {\n icon: \"carbon-filter\",\n op50: \"\"\n }),\n _createVNode(_component_NSelectTabs, {\n modelValue: filterMode.value,\n \"onUpdate:modelValue\": ($event: any) => ((filterMode).value = $event),\n n: \"primary sm\",\n options: [\n { label: 'All', value: 'all' },\n { label: 'Using', value: 'using' },\n { label: 'Not used', value: 'not-used' },\n ]\n }, null, 8, [\"modelValue\", \"onUpdate:modelValue\"])\n ])\n ]\n }\n }),\n _: 3\n }, _parent))\n if (filtered.value.user.length) {\n _push(_ssrRenderComponent(_component_NSectionBlock, {\n icon: \"carbon-nominal\",\n text: \"User components\",\n open: filtered.value.user.length <= _unref(DETAILS_MAX_ITEMS),\n description: `Total components: ${filtered.value.count.user}`\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<!--[-->`)\n _ssrRenderList(filtered.value.user, (c) => {\n _push(_ssrRenderComponent(_component_ComponentItem, _mergeProps({\n key: c.component.filePath\n }, { ref_for: true }, c), null, _parent, _scopeId))\n })\n _push(`<!--]-->`)\n } else {\n return [\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(filtered.value.user, (c) => {\n return (_openBlock(), _createBlock(_component_ComponentItem, _mergeProps({\n key: c.component.filePath\n }, { ref_for: true }, c), null, 16))\n }), 128))\n ]\n }\n }),\n _: 1\n }, _parent))\n } else {\n _push(`<!---->`)\n }\n if (filtered.value.runtime.length) {\n _push(_ssrRenderComponent(_component_NSectionBlock, {\n icon: \"carbon-load-balancer-global\",\n open: filtered.value.runtime.length <= _unref(DETAILS_MAX_ITEMS),\n text: \"Runtime components\",\n description: `Total components: ${filtered.value.count.runtime}`\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<!--[-->`)\n _ssrRenderList(filtered.value.runtime, (c) => {\n _push(_ssrRenderComponent(_component_ComponentItem, _mergeProps({\n key: c.component.filePath\n }, { ref_for: true }, c), null, _parent, _scopeId))\n })\n _push(`<!--]-->`)\n } else {\n return [\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(filtered.value.runtime, (c) => {\n return (_openBlock(), _createBlock(_component_ComponentItem, _mergeProps({\n key: c.component.filePath\n }, { ref_for: true }, c), null, 16))\n }), 128))\n ]\n }\n }),\n _: 1\n }, _parent))\n } else {\n _push(`<!---->`)\n }\n if (filtered.value.builtin.length) {\n _push(_ssrRenderComponent(_component_NSectionBlock, {\n icon: \"simple-icons-nuxtdotjs\",\n text: \"Built-in components\",\n description: `Total components: ${filtered.value.count.builtin}`\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<!--[-->`)\n _ssrRenderList(filtered.value.builtin, (c) => {\n _push(_ssrRenderComponent(_component_ComponentItem, _mergeProps({\n key: c.component.filePath\n }, { ref_for: true }, c), null, _parent, _scopeId))\n })\n _push(`<!--]-->`)\n } else {\n return [\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(filtered.value.builtin, (c) => {\n return (_openBlock(), _createBlock(_component_ComponentItem, _mergeProps({\n key: c.component.filePath\n }, { ref_for: true }, c), null, 16))\n }), 128))\n ]\n }\n }),\n _: 1\n }, _parent))\n } else {\n _push(`<!---->`)\n }\n if (filtered.value.lib.size) {\n _push(_ssrRenderComponent(_component_NSectionBlock, {\n open: filtered.value.count.lib <= _unref(DETAILS_MAX_ITEMS),\n icon: \"carbon-3d-mpr-toggle\",\n text: \"Components from libraries\",\n description: `${filtered.value.count.lib} components from ${filtered.value.lib.size} packages`\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<!--[-->`)\n _ssrRenderList(filtered.value.lib.entries(), ([key, value]) => {\n _push(`<div ml-2${_scopeId}>`)\n _push(_ssrRenderComponent(_component_NIconTitle, {\n text: `${key} (${value.length})`,\n py1: \"\",\n op50: \"\"\n }, null, _parent, _scopeId))\n _push(`<div pl4${_scopeId}><!--[-->`)\n _ssrRenderList(value, (c) => {\n _push(_ssrRenderComponent(_component_ComponentItem, _mergeProps({\n key: c.component.filePath\n }, { ref_for: true }, c), null, _parent, _scopeId))\n })\n _push(`<!--]--></div></div>`)\n })\n _push(`<!--]-->`)\n } else {\n return [\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(filtered.value.lib.entries(), ([key, value]) => {\n return (_openBlock(), _createBlock(\"div\", {\n key: key,\n \"ml-2\": \"\"\n }, [\n _createVNode(_component_NIconTitle, {\n text: `${key} (${value.length})`,\n py1: \"\",\n op50: \"\"\n }, null, 8, [\"text\"]),\n _createVNode(\"div\", { pl4: \"\" }, [\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(value, (c) => {\n return (_openBlock(), _createBlock(_component_ComponentItem, _mergeProps({\n key: c.component.filePath\n }, { ref_for: true }, c), null, 16))\n }), 128))\n ])\n ]))\n }), 128))\n ]\n }\n }),\n _: 1\n }, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(`<!--]-->`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { Component } from 'nuxt/schema'\nimport type { ComponentRelationship, ComponentWithRelationships } from '../../types'\nimport Fuse from 'fuse.js'\nimport { computed, ref } from 'vue'\nimport { DETAILS_MAX_ITEMS } from '~/composables/constants'\nimport { getComponentRelationships, getModuleNameFromPath, isNodeModulePath, isNuxtPackageName } from '~/composables/utils'\n\nconst props = defineProps<{\n components: Component[]\n relationships?: ComponentRelationship[] | null\n}>()\n\nconst search = ref('')\nconst filterMode = ref<'all' | 'using' | 'not-used'>('all')\n\nconst componentWithRelationships = computed(() => {\n const components = props.components\n .map(c => getComponentRelationships(c, props.relationships))\n if (filterMode.value === 'using')\n return components.filter(c => c.dependents?.length)\n else if (filterMode.value === 'not-used')\n return components.filter(c => !c.dependents?.length)\n return components\n})\n\nconst builtinComponentDocs = {\n ClientOnly: 'https://nuxt.com/docs/api/components/client-only',\n DevOnly: 'https://nuxt.com/docs/api/components/dev-only',\n NuxtClientFallback: 'https://nuxt.com/docs/api/components/nuxt-client-fallback',\n NuxtPicture: 'https://nuxt.com/docs/api/components/nuxt-picture',\n NuxtRouteAnnouncer: 'https://nuxt.com/docs/api/components/nuxt-route-announcer',\n NuxtTime: 'https://nuxt.com/docs/api/components/nuxt-time',\n NuxtPage: 'https://nuxt.com/docs/api/components/nuxt-page',\n NuxtLayout: 'https://nuxt.com/docs/api/components/nuxt-layout',\n NuxtLink: 'https://nuxt.com/docs/api/components/nuxt-link',\n NuxtLoadingIndicator: 'https://nuxt.com/docs/api/components/nuxt-loading-indicator',\n NuxtErrorBoundary: 'https://nuxt.com/docs/api/components/nuxt-error-boundary',\n NuxtWelcome: 'https://nuxt.com/docs/api/components/nuxt-welcome',\n NuxtIsland: 'https://nuxt.com/docs/api/components/nuxt-island',\n NuxtImg: 'https://nuxt.com/docs/api/components/nuxt-img',\n}\n\nconst fuse = computed(() => new Fuse(componentWithRelationships.value, {\n keys: [\n 'component.pascalName',\n 'component.filePath',\n 'component.kebabName',\n ],\n}))\n\nconst filtered = computed(() => {\n const user: ComponentWithRelationships[] = []\n const lib = new Map<string, ComponentWithRelationships[]>()\n const builtin: ComponentWithRelationships[] = []\n const runtime: ComponentWithRelationships[] = []\n\n const count = {\n user: 0,\n lib: 0,\n builtin: 0,\n runtime: 0,\n }\n\n const result = search.value\n ? fuse.value.search(search.value).map(i => i.item)\n : componentWithRelationships.value\n\n result\n .forEach((component) => {\n const c = component.component\n if (c.filePath && isNodeModulePath(c.filePath)) {\n const name = getModuleNameFromPath(c.filePath)\n if (!name)\n return\n if (isNuxtPackageName(name)) {\n c.meta ??= {}\n c.meta.docs ??= builtinComponentDocs?.[c.pascalName as keyof typeof builtinComponentDocs]\n builtin.push(component)\n count.builtin++\n }\n else {\n if (!lib.has(name))\n lib.set(name, [])\n lib.get(name)!.push(component)\n count.lib++\n }\n }\n else if (c.global && !c.filePath) {\n runtime.push(component)\n count.runtime++\n }\n else {\n user.push(component)\n count.user++\n }\n })\n\n return {\n count,\n user,\n builtin,\n lib,\n runtime,\n }\n})\n</script>\n\n<template>\n <NNavbar v-model:search=\"search\" pb3>\n <template #actions>\n <slot />\n </template>\n <div flex=\"~ gap-2 items-center\">\n <NIcon icon=\"carbon-filter\" op50 />\n <NSelectTabs\n v-model=\"filterMode\"\n n=\"primary sm\"\n :options=\"[\n { label: 'All', value: 'all' },\n { label: 'Using', value: 'using' },\n { label: 'Not used', value: 'not-used' },\n ]\"\n />\n </div>\n </NNavbar>\n <NSectionBlock\n v-if=\"filtered.user.length\"\n icon=\"carbon-nominal\"\n text=\"User components\"\n :open=\"filtered.user.length <= DETAILS_MAX_ITEMS\"\n :description=\"`Total components: ${filtered.count.user}`\"\n >\n <ComponentItem\n v-for=\"c of filtered.user\"\n :key=\"c.component.filePath\"\n v-bind=\"c\"\n />\n </NSectionBlock>\n <NSectionBlock\n v-if=\"filtered.runtime.length\"\n icon=\"carbon-load-balancer-global\"\n :open=\"filtered.runtime.length <= DETAILS_MAX_ITEMS\"\n text=\"Runtime components\"\n :description=\"`Total components: ${filtered.count.runtime}`\"\n >\n <ComponentItem\n v-for=\"c of filtered.runtime\"\n :key=\"c.component.filePath\"\n v-bind=\"c\"\n />\n </NSectionBlock>\n <NSectionBlock\n v-if=\"filtered.builtin.length\"\n icon=\"simple-icons-nuxtdotjs\"\n text=\"Built-in components\"\n :description=\"`Total components: ${filtered.count.builtin}`\"\n >\n <ComponentItem\n v-for=\"c of filtered.builtin\"\n :key=\"c.component.filePath\"\n v-bind=\"c\"\n />\n </NSectionBlock>\n <NSectionBlock\n v-if=\"filtered.lib.size\"\n :open=\"filtered.count.lib <= DETAILS_MAX_ITEMS\"\n icon=\"carbon-3d-mpr-toggle\"\n text=\"Components from libraries\"\n :description=\"`${filtered.count.lib} components from ${filtered.lib.size} packages`\"\n >\n <div v-for=\"[key, value] of filtered.lib.entries()\" :key=\"key\" ml-2>\n <NIconTitle :text=\"`${key} (${value.length})`\" py1 op50 />\n <div pl4>\n <ComponentItem\n v-for=\"c of value\"\n :key=\"c.component.filePath\"\n v-bind=\"c\"\n />\n </div>\n </div>\n </NSectionBlock>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveDynamicComponent as _resolveDynamicComponent, resolveComponent as _resolveComponent, resolveDirective as _resolveDirective, mergeProps as _mergeProps, withCtx as _withCtx, createVNode as _createVNode, withDirectives as _withDirectives, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode } from \"vue\"\nimport { ssrGetDirectiveProps as _ssrGetDirectiveProps, ssrRenderComponent as _ssrRenderComponent, ssrRenderVNode as _ssrRenderVNode } from \"vue/server-renderer\"\n\nimport { definePageMeta } from '#imports'\nimport ComponentsGraph from '~/components/ComponentsGraph.vue'\nimport ComponentsList from '~/components/ComponentsList.vue'\nimport { useClient } from '~/composables/client'\nimport { useComponents, useComponentsRelationships } from '~/composables/state-components'\nimport { useDevToolsOptions } from '../../composables/storage-options'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'components',\n __ssrInlineRender: true,\n setup(__props) {\n\ndefinePageMeta({\n icon: 'i-carbon-assembly-cluster',\n title: 'Components',\n order: 2,\n})\n\nconst client = useClient()\nconst components = useComponents()\nconst relationships = useComponentsRelationships()\n\nconst { componentsView: view } = useDevToolsOptions('ui')\n\nfunction openComponentInspector() {\n client.value?.inspector?.enable()\n}\n\nfunction toggleView() {\n view.value = view.value === 'list' ? 'graph' : 'list'\n}\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NButton = _resolveComponent(\"NButton\")!\n const _component_HelpFab = _resolveComponent(\"HelpFab\")!\n const _component_DocsComponents = _resolveComponent(\"DocsComponents\")!\n const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n _push(`<!--[--><div relative h-full of-auto>`)\n _ssrRenderVNode(_push, _createVNode(_resolveDynamicComponent(_unref(view) === 'list' ? ComponentsList : ComponentsGraph), {\n components: _unref(components),\n relationships: _unref(relationships)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div flex-none flex=\"~ gap3\"${_scopeId}>`)\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n \"text-lg\": \"\",\n border: false,\n icon: _unref(view) === 'graph' ? 'i-carbon-list' : 'i-carbon-network-4',\n title: \"Toggle view\",\n onClick: toggleView\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Toggle View', void 0, { \"bottom-end\": true })), null, _parent, _scopeId))\n if (_unref(client)?.inspector?.isAvailable) {\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n \"text-lg\": \"\",\n border: false,\n icon: \"i-tabler-focus-2\",\n title: \"Inspect Vue components\",\n onClick: openComponentInspector\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Inspect Vue components', void 0, { \"bottom-end\": true })), null, _parent, _scopeId))\n } else {\n _push(`<!---->`)\n }\n _push(`</div>`)\n } else {\n return [\n _createVNode(\"div\", {\n \"flex-none\": \"\",\n flex: \"~ gap3\"\n }, [\n _withDirectives(_createVNode(_component_NButton, {\n \"text-lg\": \"\",\n border: false,\n icon: _unref(view) === 'graph' ? 'i-carbon-list' : 'i-carbon-network-4',\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 (_unref(client)?.inspector?.isAvailable)\n ? _withDirectives((_openBlock(), _createBlock(_component_NButton, {\n key: 0,\n \"text-lg\": \"\",\n border: false,\n icon: \"i-tabler-focus-2\",\n title: \"Inspect Vue components\",\n onClick: openComponentInspector\n }, null, 512)), [\n [\n _directive_tooltip,\n 'Inspect Vue components',\n void 0,\n { \"bottom-end\": true }\n ]\n ])\n : _createCommentVNode(\"\", true)\n ])\n ]\n }\n }),\n _: 1\n }), _parent)\n _push(`</div>`)\n _push(_ssrRenderComponent(_component_HelpFab, null, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_DocsComponents, null, null, _parent, _scopeId))\n } else {\n return [\n _createVNode(_component_DocsComponents)\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(`<!--]-->`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport { definePageMeta } from '#imports'\nimport ComponentsGraph from '~/components/ComponentsGraph.vue'\nimport ComponentsList from '~/components/ComponentsList.vue'\nimport { useClient } from '~/composables/client'\nimport { useComponents, useComponentsRelationships } from '~/composables/state-components'\nimport { useDevToolsOptions } from '../../composables/storage-options'\n\ndefinePageMeta({\n icon: 'i-carbon-assembly-cluster',\n title: 'Components',\n order: 2,\n})\n\nconst client = useClient()\nconst components = useComponents()\nconst relationships = useComponentsRelationships()\n\nconst { componentsView: view } = useDevToolsOptions('ui')\n\nfunction openComponentInspector() {\n client.value?.inspector?.enable()\n}\n\nfunction toggleView() {\n view.value = view.value === 'list' ? 'graph' : 'list'\n}\n</script>\n\n<template>\n <div relative h-full of-auto>\n <component\n :is=\"view === 'list' ? ComponentsList : ComponentsGraph\"\n :components=\"components\"\n :relationships=\"relationships\"\n >\n <div flex-none flex=\"~ gap3\">\n <NButton\n v-tooltip.bottom-end=\"'Toggle View'\"\n text-lg :border=\"false\"\n :icon=\"view === 'graph' ? 'i-carbon-list' : 'i-carbon-network-4'\"\n title=\"Toggle view\"\n @click=\"toggleView\"\n />\n <NButton\n v-if=\"client?.inspector?.isAvailable\"\n v-tooltip.bottom-end=\"'Inspect Vue components'\"\n text-lg :border=\"false\"\n icon=\"i-tabler-focus-2\"\n title=\"Inspect Vue components\"\n @click=\"openComponentInspector\"\n />\n </div>\n </component>\n </div>\n\n <HelpFab>\n <DocsComponents />\n </HelpFab>\n</template>\n"],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"constants-D9kP6ji9.js","mappings":";AAEA,IAAa,kBAAkB;CAC7B,MAAM;EAEJ,cAAc;EACd,cAAc;EACd,WAAW;EACX,UAAU;EACV,UAAU;EACV,SAAS;EACT,aAAa;EACb,kBAAkB;EAClB,cAAc;EACd,YAAY;EACZ,UAAU;EACV,WAAW;EACX,kBAAkB;EAClB,UAAU;EAGV,QAAQ;EACR,iBAAiB;EACjB,aAAa;EACb,qBAAqB;EACrB,gBAAgB;EAChB,YAAY;EACZ,oBAAoB;EACpB,qBAAqB;EACrB,iBAAiB;CACnB;CACA,KAAK;EAEH,KAAK;EACL,UAAU;EACV,UAAU;EACV,OAAO;EACP,aAAa;EACb,iBAAiB;EACjB,iBAAiB;EAGjB,WAAW;EACX,aAAa;EACb,aAAa;EACb,eAAe;EACf,eAAe;EACf,iBAAiB;EACjB,WAAW;EACX,gBAAgB;EAEhB,UAAU;CACZ;AACF;AAEA,IAAa,sBAA8C;CACzD,SAAS;CACT,SAAS;CACT,SAAS;CACT,QAAQ;CACR,OAAO;CACP,MAAM;AACR","names":[],"sources":["../../../../../../../../composables/constants.ts"],"sourcesContent":["export const DETAILS_MAX_ITEMS = 50\n\nexport const ComposablesDocs = {\n nuxt: {\n // composables\n useAppConfig: 'https://nuxt.com/docs/api/composables/use-app-config',\n useAsyncData: 'https://nuxt.com/docs/api/composables/use-async-data',\n useCookie: 'https://nuxt.com/docs/api/composables/use-cookie',\n useError: 'https://nuxt.com/docs/api/composables/use-error',\n useFetch: 'https://nuxt.com/docs/api/composables/use-fetch',\n useHead: 'https://nuxt.com/docs/api/composables/use-head',\n useHeadSafe: 'https://nuxt.com/docs/api/composables/use-head-safe',\n useLazyAsyncData: 'https://nuxt.com/docs/api/composables/use-lazy-async-data',\n useLazyFetch: 'https://nuxt.com/docs/api/composables/use-lazy-fetch',\n useNuxtApp: 'https://nuxt.com/docs/api/composables/use-nuxt-app',\n useRoute: 'https://nuxt.com/docs/api/composables/use-route',\n useRouter: 'https://nuxt.com/docs/api/composables/use-router',\n useRuntimeConfig: 'https://nuxt.com/docs/api/composables/use-runtime-config',\n useState: 'https://nuxt.com/docs/api/composables/use-state',\n\n // utils\n $fetch: 'https://nuxt.com/docs/api/utils/dollarfetch',\n abortNavigation: 'https://nuxt.com/docs/api/utils/abort-navigation',\n createError: 'https://nuxt.com/docs/api/utils/create-error',\n defineNuxtComponent: 'https://nuxt.com/docs/api/utils/define-nuxt-component',\n definePageMeta: 'https://nuxt.com/docs/api/utils/define-page-meta',\n navigateTo: 'https://nuxt.com/docs/api/utils/navigate-to#navigateto',\n onBeforeRouteLeave: 'https://nuxt.com/docs/api/utils/on-before-route-leave',\n onBeforeRouteUpdate: 'https://nuxt.com/docs/api/utils/on-before-route-update',\n updateAppConfig: 'https://nuxt.com/docs/api/utils/update-app-config',\n },\n vue: {\n // reactivity\n ref: 'https://vuejs.org/api/reactivity-core.html#ref',\n computed: 'https://vuejs.org/api/reactivity-core.html#computed',\n reactive: 'https://vuejs.org/api/reactivity-core.html#reactive',\n watch: 'https://vuejs.org/api/reactivity-core.html#watch',\n watchEffect: 'https://vuejs.org/api/reactivity-core.html#watcheffect',\n watchPostEffect: 'https://vuejs.org/api/reactivity-core.html#watchposteffect',\n watchSyncEffect: 'https://vuejs.org/api/reactivity-core.html#watchsynceffect',\n\n // lifecycle\n onMounted: 'https://vuejs.org/api/composition-api-lifecycle.html#onmounted',\n onUnmounted: 'https://vuejs.org/api/composition-api-lifecycle.html#onunmounted',\n onActivated: 'https://vuejs.org/api/composition-api-lifecycle.html#onactivated',\n onDeactivated: 'https://vuejs.org/api/composition-api-lifecycle.html#ondeactivated',\n onBeforeMount: 'https://vuejs.org/api/composition-api-lifecycle.html#onbeforemount',\n onBeforeUnmount: 'https://vuejs.org/api/composition-api-lifecycle.html#onbeforeunmount',\n onUpdated: 'https://vuejs.org/api/composition-api-lifecycle.html#onupdated',\n onBeforeUpdate: 'https://vuejs.org/api/composition-api-lifecycle.html#onbeforeupdate',\n\n nextTick: 'https://vuejs.org/api/general.html#nexttick',\n },\n}\n\nexport const ServerRouteTabIcons: Record<string, string> = {\n snippet: 'i-carbon-code',\n headers: 'i-carbon-html-reference',\n cookies: 'i-carbon-cookie',\n params: 'i-carbon-text-selection',\n query: 'i-carbon-help',\n body: 'i-carbon-document',\n}\n"],"version":3}
|