refactor(imports): removed unnecessary imports to vue
This commit is contained in:
		
							parent
							
								
									93799af83c
								
							
						
					
					
						commit
						fe61f0f2f2
					
				| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { computed } from 'vue'; | ||||
| import { RouterView, useRoute } from 'vue-router'; | ||||
| import { NGlobalStyle, NMessageProvider, NNotificationProvider, darkTheme } from 'naive-ui'; | ||||
| import { darkThemeOverrides, lightThemeOverrides } from './themes'; | ||||
|  | ||||
| @ -2,7 +2,6 @@ | ||||
| import { ChevronRight } from '@vicons/tabler'; | ||||
| import { useStorage } from '@vueuse/core'; | ||||
| import { useThemeVars } from 'naive-ui'; | ||||
| import { computed, h, toRefs } from 'vue'; | ||||
| import { RouterLink, useRoute } from 'vue-router'; | ||||
| import MenuIconItem from './MenuIconItem.vue'; | ||||
| import type { Tool, ToolCategory } from '@/tools/tools.types'; | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| <script setup lang="ts"> | ||||
| import { type Component, toRefs } from 'vue'; | ||||
| import type { Component } from 'vue'; | ||||
| 
 | ||||
| const props = defineProps<{ icon: Component; title: string }>(); | ||||
| const { icon, title } = toRefs(props); | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| <script setup lang="ts"> | ||||
| import { FavoriteFilled } from '@vicons/material'; | ||||
| import { computed, toRefs } from 'vue'; | ||||
| 
 | ||||
| import { useToolStore } from '@/tools/tools.store'; | ||||
| import type { Tool } from '@/tools/tools.types'; | ||||
| 
 | ||||
|  | ||||
| @ -1,6 +1,5 @@ | ||||
| <script setup lang="ts"> | ||||
| import { useClipboard, useVModel } from '@vueuse/core'; | ||||
| import { ref } from 'vue'; | ||||
| 
 | ||||
| const props = defineProps<{ value: string }>(); | ||||
| const emit = defineEmits(['update:value']); | ||||
|  | ||||
| @ -1,6 +1,5 @@ | ||||
| <script setup lang="ts"> | ||||
| import { useThemeVars } from 'naive-ui'; | ||||
| import { toRefs } from 'vue'; | ||||
| import type { Tool } from '@/tools/tools.types'; | ||||
| 
 | ||||
| const props = defineProps<{ tool: Tool }>(); | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { computed, toRefs } from 'vue'; | ||||
| import { useStyleStore } from '@/stores/style.store'; | ||||
| 
 | ||||
| const styleStore = useStyleStore(); | ||||
|  | ||||
| @ -1,6 +1,5 @@ | ||||
| <script setup lang="ts"> | ||||
| import { BrandGithub, BrandTwitter, InfoCircle, Moon, Sun } from '@vicons/tabler'; | ||||
| import { toRefs } from 'vue'; | ||||
| import { useStyleStore } from '@/stores/style.store'; | ||||
| import { useThemeStore } from '@/ui/theme/theme.store'; | ||||
| 
 | ||||
|  | ||||
| @ -2,7 +2,6 @@ | ||||
| import { SearchRound } from '@vicons/material'; | ||||
| import { useMagicKeys, whenever } from '@vueuse/core'; | ||||
| import { NInput } from 'naive-ui'; | ||||
| import { computed, h, ref } from 'vue'; | ||||
| import { useRouter } from 'vue-router'; | ||||
| import SearchBarItem from './SearchBarItem.vue'; | ||||
| import type { Tool } from '@/tools/tools.types'; | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script lang="ts" setup> | ||||
| import { toRefs } from 'vue'; | ||||
| import type { Tool } from '@/tools/tools.types'; | ||||
| 
 | ||||
| const props = defineProps<{ tool: Tool }>(); | ||||
|  | ||||
| @ -1,6 +1,5 @@ | ||||
| <script setup lang="ts"> | ||||
| import { useClipboard } from '@vueuse/core'; | ||||
| import { ref, toRefs } from 'vue'; | ||||
| 
 | ||||
| const props = withDefaults(defineProps<{ value?: string }>(), { value: '' }); | ||||
| const { value } = toRefs(props); | ||||
|  | ||||
| @ -6,7 +6,6 @@ import jsonHljs from 'highlight.js/lib/languages/json'; | ||||
| import sqlHljs from 'highlight.js/lib/languages/sql'; | ||||
| import xmlHljs from 'highlight.js/lib/languages/xml'; | ||||
| import yamlHljs from 'highlight.js/lib/languages/yaml'; | ||||
| import { ref, toRefs } from 'vue'; | ||||
| 
 | ||||
| const props = withDefaults( | ||||
|   defineProps<{ | ||||
|  | ||||
| @ -1,6 +1,5 @@ | ||||
| <script setup lang="ts"> | ||||
| import { useThemeVars } from 'naive-ui'; | ||||
| import { toRefs } from 'vue'; | ||||
| import FavoriteButton from './FavoriteButton.vue'; | ||||
| import { useAppTheme } from '@/ui/theme/themes'; | ||||
| import type { Tool } from '@/tools/tools.types'; | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| <script lang="ts" setup> | ||||
| import { NIcon, useThemeVars } from 'naive-ui'; | ||||
| import { computed } from 'vue'; | ||||
| 
 | ||||
| import { RouterLink } from 'vue-router'; | ||||
| import { Heart, Home2, Menu2 } from '@vicons/tabler'; | ||||
| import SearchBar from '../components/SearchBar.vue'; | ||||
|  | ||||
| @ -2,7 +2,7 @@ | ||||
| import { useRoute } from 'vue-router'; | ||||
| import { useHead } from '@vueuse/head'; | ||||
| import type { HeadObject } from '@vueuse/head'; | ||||
| import { computed } from 'vue'; | ||||
| 
 | ||||
| import BaseLayout from './base.layout.vue'; | ||||
| import FavoriteButton from '@/components/FavoriteButton.vue'; | ||||
| import type { Tool } from '@/tools/tools.types'; | ||||
|  | ||||
| @ -2,7 +2,7 @@ | ||||
| import { Upload } from '@vicons/tabler'; | ||||
| import { useBase64 } from '@vueuse/core'; | ||||
| import type { UploadFileInfo } from 'naive-ui'; | ||||
| import { type Ref, ref } from 'vue'; | ||||
| import type { Ref } from 'vue'; | ||||
| import { useCopy } from '@/composable/copy'; | ||||
| import { useDownloadFileFromBase64 } from '@/composable/downloadBase64'; | ||||
| import { useValidation } from '@/composable/validation'; | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { computed, ref } from 'vue'; | ||||
| import { useCopy } from '@/composable/copy'; | ||||
| import { base64ToText, isValidBase64, textToBase64 } from '@/utils/base64'; | ||||
| import { withDefaultOnError } from '@/utils/defaults'; | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { computed, ref } from 'vue'; | ||||
| import { useCopy } from '@/composable/copy'; | ||||
| import { textToBase64 } from '@/utils/base64'; | ||||
| 
 | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { computed, ref } from 'vue'; | ||||
| import { compareSync, hashSync } from 'bcryptjs'; | ||||
| import { useThemeVars } from 'naive-ui'; | ||||
| import { useCopy } from '@/composable/copy'; | ||||
|  | ||||
| @ -2,7 +2,7 @@ | ||||
| import { Plus, Trash } from '@vicons/tabler'; | ||||
| import { useClipboard, useStorage } from '@vueuse/core'; | ||||
| import _ from 'lodash'; | ||||
| import { computed } from 'vue'; | ||||
| 
 | ||||
| import { arrayToMarkdownTable, computeAverage, computeVariance } from './benchmark-builder.models'; | ||||
| import DynamicValues from './dynamic-values.vue'; | ||||
| 
 | ||||
|  | ||||
| @ -15,7 +15,7 @@ import { | ||||
|   spanishWordList, | ||||
| } from '@it-tools/bip39'; | ||||
| import { Copy, Refresh } from '@vicons/tabler'; | ||||
| import { computed, ref } from 'vue'; | ||||
| 
 | ||||
| import { useCopy } from '@/composable/copy'; | ||||
| import { useValidation } from '@/composable/validation'; | ||||
| import { isNotThrowing } from '@/utils/boolean'; | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { ref } from 'vue'; | ||||
| import { | ||||
|   camelCase, | ||||
|   capitalCase, | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| <script setup lang="ts"> | ||||
| import { useThemeVars } from 'naive-ui'; | ||||
| import { computed, ref } from 'vue'; | ||||
| 
 | ||||
| import InputCopyable from '../../components/InputCopyable.vue'; | ||||
| import { computeChmodOctalRepresentation } from './chmod-calculator.service'; | ||||
| 
 | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| <script setup lang="ts"> | ||||
| import { useRafFn } from '@vueuse/core'; | ||||
| import { ref } from 'vue'; | ||||
| 
 | ||||
| import { formatMs } from './chronometer.service'; | ||||
| 
 | ||||
| const isRunning = ref(false); | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { ref } from 'vue'; | ||||
| import { colord, extend } from 'colord'; | ||||
| 
 | ||||
| import cmykPlugin from 'colord/plugins/cmyk'; | ||||
|  | ||||
| @ -1,7 +1,6 @@ | ||||
| <script setup lang="ts"> | ||||
| import cronstrue from 'cronstrue'; | ||||
| import { isValidCron } from 'cron-validator'; | ||||
| import { computed, reactive, ref } from 'vue'; | ||||
| import { useStyleStore } from '@/stores/style.store'; | ||||
| 
 | ||||
| function isCronValid(v: string) { | ||||
|  | ||||
| @ -1,6 +1,5 @@ | ||||
| <script setup lang="ts"> | ||||
| import { useWindowSize } from '@vueuse/core'; | ||||
| import { computed } from 'vue'; | ||||
| 
 | ||||
| const { width, height } = useWindowSize(); | ||||
| 
 | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { computed, ref } from 'vue'; | ||||
| import { MessageType, composerize } from 'composerize-ts'; | ||||
| import { withDefaultOnError } from '@/utils/defaults'; | ||||
| import { useDownloadFileFromBase64 } from '@/composable/downloadBase64'; | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { computed, ref } from 'vue'; | ||||
| import { AES, RC4, Rabbit, TripleDES, enc } from 'crypto-js'; | ||||
| 
 | ||||
| const algos = { AES, TripleDES, Rabbit, RC4 }; | ||||
|  | ||||
| @ -4,7 +4,7 @@ | ||||
| import { addMilliseconds, formatRelative } from 'date-fns'; | ||||
| 
 | ||||
| import { enGB } from 'date-fns/locale'; | ||||
| import { computed, ref } from 'vue'; | ||||
| 
 | ||||
| import { formatMsDuration } from './eta-calculator.service'; | ||||
| 
 | ||||
| const unitCount = ref(3 * 62); | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| <script setup lang="ts"> | ||||
| import type { lib } from 'crypto-js'; | ||||
| import { MD5, RIPEMD160, SHA1, SHA224, SHA256, SHA3, SHA384, SHA512, enc } from 'crypto-js'; | ||||
| import { ref } from 'vue'; | ||||
| 
 | ||||
| import InputCopyable from '../../components/InputCopyable.vue'; | ||||
| import { convertHexToBin } from './hash-text.service'; | ||||
| import { useQueryParam } from '@/composable/queryParams'; | ||||
|  | ||||
| @ -11,7 +11,7 @@ import { | ||||
|   HmacSHA512, | ||||
|   enc, | ||||
| } from 'crypto-js'; | ||||
| import { computed, ref } from 'vue'; | ||||
| 
 | ||||
| import { convertHexToBin } from '../hash-text/hash-text.service'; | ||||
| import { useCopy } from '@/composable/copy'; | ||||
| 
 | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| <script setup lang="ts"> | ||||
| import { escape, unescape } from 'lodash'; | ||||
| import { computed, ref } from 'vue'; | ||||
| 
 | ||||
| import { useCopy } from '@/composable/copy'; | ||||
| 
 | ||||
| const escapeInput = ref('<title>IT Tool</title>'); | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| <script setup lang="ts"> | ||||
| import { type Component, toRefs } from 'vue'; | ||||
| import type { Component } from 'vue'; | ||||
| 
 | ||||
| const props = defineProps<{ icon: Component; title: string; action: () => void; isActive?: () => boolean }>(); | ||||
| const { icon, title, action, isActive } = toRefs(props); | ||||
|  | ||||
| @ -18,7 +18,7 @@ import { | ||||
|   Strikethrough, | ||||
|   TextWrap, | ||||
| } from '@vicons/tabler'; | ||||
| import { type Component, toRefs } from 'vue'; | ||||
| import type { Component } from 'vue'; | ||||
| import MenuBarItem from './menu-bar-item.vue'; | ||||
| 
 | ||||
| const props = defineProps<{ editor: Editor }>(); | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { computed, ref } from 'vue'; | ||||
| import InputCopyable from '../../components/InputCopyable.vue'; | ||||
| import { convertBase } from './integer-base-converter.model'; | ||||
| import { useStyleStore } from '@/stores/style.store'; | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { computed } from 'vue'; | ||||
| import { Netmask } from 'netmask'; | ||||
| import { useStorage } from '@vueuse/core'; | ||||
| import { ArrowLeft, ArrowRight } from '@vicons/tabler'; | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { computed, ref } from 'vue'; | ||||
| import JSON5 from 'json5'; | ||||
| import { useStorage } from '@vueuse/core'; | ||||
| import { formatJson } from './json.models'; | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { computed, ref } from 'vue'; | ||||
| import { decodeJwt } from './jwt-parser.service'; | ||||
| import { useValidation } from '@/composable/validation'; | ||||
| import { isNotThrowing } from '@/utils/boolean'; | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| <script setup lang="ts"> | ||||
| import { useEventListener } from '@vueuse/core'; | ||||
| import { computed, ref } from 'vue'; | ||||
| 
 | ||||
| import InputCopyable from '../../components/InputCopyable.vue'; | ||||
| 
 | ||||
| const event = ref<KeyboardEvent>(); | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { computed, ref } from 'vue'; | ||||
| import { generateLoremIpsum } from './lorem-ipsum-generator.service'; | ||||
| import { useCopy } from '@/composable/copy'; | ||||
| import { randIntFromInterval } from '@/utils/random'; | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| <script setup lang="ts"> | ||||
| import { evaluate } from 'mathjs'; | ||||
| import { computed, ref } from 'vue'; | ||||
| 
 | ||||
| import { withDefaultOnError } from '@/utils/defaults'; | ||||
| 
 | ||||
| const expression = ref(''); | ||||
|  | ||||
| @ -1,7 +1,6 @@ | ||||
| <script setup lang="ts"> | ||||
| import { generateMeta } from '@it-tools/oggen'; | ||||
| import _ from 'lodash'; | ||||
| import { computed, ref, watch } from 'vue'; | ||||
| import { image, ogSchemas, twitter, website } from './og-schemas'; | ||||
| import type { OGSchemaType, OGSchemaTypeElementSelect } from './OGSchemaType.type'; | ||||
| import TextareaCopyable from '@/components/TextareaCopyable.vue'; | ||||
|  | ||||
| @ -1,6 +1,5 @@ | ||||
| <script setup lang="ts"> | ||||
| import { types as extensionToMimeType, extensions as mimeTypeToExtension } from 'mime-types'; | ||||
| import { computed, ref } from 'vue'; | ||||
| 
 | ||||
| const mimeInfos = Object.entries(mimeTypeToExtension).map(([mimeType, extensions]) => ({ mimeType, extensions })); | ||||
| 
 | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { computed, ref } from 'vue'; | ||||
| import { useTimestamp } from '@vueuse/core'; | ||||
| import { useThemeVars } from 'naive-ui'; | ||||
| import { useQRCode } from '../qr-code-generator/useQRCode'; | ||||
|  | ||||
| @ -1,6 +1,5 @@ | ||||
| <script setup lang="ts"> | ||||
| import { useClipboard } from '@vueuse/core'; | ||||
| import { toRefs } from 'vue'; | ||||
| 
 | ||||
| const props = defineProps<{ tokens: { previous: string; current: string; next: string } }>(); | ||||
| const { copy: copyPrevious, copied: previousCopied } = useClipboard(); | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { ref } from 'vue'; | ||||
| import type { QRCodeErrorCorrectionLevel } from 'qrcode'; | ||||
| import { useQRCode } from './useQRCode'; | ||||
| import { useDownloadFileFromBase64 } from '@/composable/downloadBase64'; | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { computed, ref } from 'vue'; | ||||
| import { | ||||
|   MAX_ARABIC_TO_ROMAN, | ||||
|   MIN_ARABIC_TO_ROMAN, | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { ref } from 'vue'; | ||||
| import { generateKeyPair } from './rsa-key-pair-generator.service'; | ||||
| import TextareaCopyable from '@/components/TextareaCopyable.vue'; | ||||
| import { withDefaultOnErrorAsync } from '@/utils/defaults'; | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { computed, ref } from 'vue'; | ||||
| import slugify from '@sindresorhus/slugify'; | ||||
| import { withDefaultOnError } from '@/utils/defaults'; | ||||
| import { useCopy } from '@/composable/copy'; | ||||
|  | ||||
| @ -1,6 +1,5 @@ | ||||
| <script setup lang="ts"> | ||||
| import { type FormatFnOptions, format as formatSQL } from 'sql-formatter'; | ||||
| import { computed, reactive, ref } from 'vue'; | ||||
| import TextareaCopyable from '@/components/TextareaCopyable.vue'; | ||||
| import { useStyleStore } from '@/stores/style.store'; | ||||
| 
 | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { computed, ref } from 'vue'; | ||||
| import TextareaCopyable from '@/components/TextareaCopyable.vue'; | ||||
| import { useCopy } from '@/composable/copy'; | ||||
| import { useDownloadFileFromBase64 } from '@/composable/downloadBase64'; | ||||
|  | ||||
| @ -1,6 +1,5 @@ | ||||
| <script setup lang="ts"> | ||||
| import _ from 'lodash'; | ||||
| import { reactive } from 'vue'; | ||||
| import { | ||||
|   convertCelsiusToKelvin, | ||||
|   convertDelisleToKelvin, | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { ref } from 'vue'; | ||||
| import { getStringSizeInBytes } from './text-statistics.service'; | ||||
| import { formatBytes } from '@/utils/convert'; | ||||
| 
 | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { computed, ref } from 'vue'; | ||||
| import { textToNatoAlphabet } from './text-to-nato-alphabet.service'; | ||||
| import { useCopy } from '@/composable/copy'; | ||||
| 
 | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { computed, ref } from 'vue'; | ||||
| import { useCopy } from '@/composable/copy'; | ||||
| import { useValidation } from '@/composable/validation'; | ||||
| import { isNotThrowing } from '@/utils/boolean'; | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { computed, ref } from 'vue'; | ||||
| import InputCopyable from '../../components/InputCopyable.vue'; | ||||
| import { isNotThrowing } from '@/utils/boolean'; | ||||
| import { withDefaultOnError } from '@/utils/defaults'; | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { computed, ref } from 'vue'; | ||||
| import { UAParser } from 'ua-parser-js'; | ||||
| import { Adjustments, Browser, Cpu, Devices, Engine } from '@vicons/tabler'; | ||||
| import UserAgentResultCards from './user-agent-result-cards.vue'; | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| <script setup lang="ts"> | ||||
| import { toRefs } from 'vue'; | ||||
| import type { UAParser } from 'ua-parser-js'; | ||||
| import type { UserAgentResultSection } from './user-agent-parser.types'; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user