diff --git a/package.json b/package.json index be8a853f..5d75437b 100644 --- a/package.json +++ b/package.json @@ -82,6 +82,7 @@ "@types/figlet": "^1.5.8", "@types/markdown-it": "^13.0.7", "@types/potrace": "^2.1.5", + "@types/punycode": "^2.1.4", "@vicons/material": "^0.12.0", "@vicons/tabler": "^0.12.0", "@vueuse/core": "^10.11.1", @@ -181,6 +182,7 @@ "plausible-tracker": "^0.3.8", "pretty-ms": "^9.1.0", "qpdf-wasm-esm-embedded": "^1.1.1", + "punycode": "^2.3.1", "qrcode": "^1.5.1", "randexp": "^0.5.3", "regex": "^4.3.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 66b828a1..3ebb3a4f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -113,6 +113,9 @@ dependencies: '@types/potrace': specifier: ^2.1.5 version: 2.1.5 + '@types/punycode': + specifier: ^2.1.4 + version: 2.1.4 '@types/turndown': specifier: ^5.0.4 version: 5.0.5 @@ -386,6 +389,9 @@ dependencies: pretty-ms: specifier: ^9.1.0 version: 9.1.0 + punycode: + specifier: ^2.3.1 + version: 2.3.1 qpdf-wasm-esm-embedded: specifier: ^1.1.1 version: 1.1.1 @@ -5236,6 +5242,10 @@ packages: resolution: {integrity: sha512-ZREFYlpUmPQJ0esjxoG1fMvB2HNaD3z+mjqdSosZvd3RalncI9NEur73P8ZJz4YQdL64CmV1w0RuqoRUlhQRBw==} dev: true + /@types/punycode@2.1.4: + resolution: {integrity: sha512-trzh6NzBnq8yw5e35f8xe8VTYjqM3NE7bohBtvDVf/dtUer3zYTLK1Ka3DG3p7bdtoaOHZucma6FfVKlQ134pQ==} + dev: false + /@types/qrcode@1.5.0: resolution: {integrity: sha512-x5ilHXRxUPIMfjtM+1vf/GPTRWZ81nqscursm5gMznJeK9M0YnZ1c3bEvRLQ0zSSgedLx1J6MGL231ObQGGhaA==} dependencies: @@ -6209,7 +6219,7 @@ packages: /@vueuse/shared@10.0.0(vue@3.3.4): resolution: {integrity: sha512-Zh3LgJqvUBWVY3SiMvXanTcfAneGbt63QPczBRDNgQ6jd/ehodO9a1lCFzaA6SWJJoI+ugVTjHFYJdoR656DVQ==} dependencies: - vue-demi: 0.14.10(vue@3.3.4) + vue-demi: 0.14.5(vue@3.3.4) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -10067,7 +10077,6 @@ packages: /jsesc@2.5.2: resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} engines: {node: '>=4'} - hasBin: true /jsesc@3.0.2: resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} @@ -11957,14 +11966,9 @@ packages: resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} dev: false - /punycode@2.3.0: - resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} - engines: {node: '>=6'} - /punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} - dev: true /qpdf-wasm-esm-embedded@1.1.1: resolution: {integrity: sha512-e6Pb8jRw+VflZQvsS+eOfYF9BqjubvTBnxJc44LhI1btg2WYNKE5/lGMmzWZ2gd9YrdWByf8IdNZw6S7+7t27w==} @@ -13261,7 +13265,7 @@ packages: engines: {node: '>=6'} dependencies: psl: 1.9.0 - punycode: 2.3.0 + punycode: 2.3.1 universalify: 0.2.0 url-parse: 1.5.10 dev: true @@ -13280,7 +13284,7 @@ packages: resolution: {integrity: sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==} engines: {node: '>=14'} dependencies: - punycode: 2.3.0 + punycode: 2.3.1 dev: true /tree-sitter-bash@0.23.1(tree-sitter@0.21.1): @@ -13828,7 +13832,7 @@ packages: /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: - punycode: 2.3.0 + punycode: 2.3.1 /url-parse@1.5.10: resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} @@ -14791,7 +14795,6 @@ packages: /yamljs@0.3.0: resolution: {integrity: sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ==} - hasBin: true dependencies: argparse: 1.0.10 glob: 7.2.3 diff --git a/src/tools/index.ts b/src/tools/index.ts index 975e8760..38a99126 100644 --- a/src/tools/index.ts +++ b/src/tools/index.ts @@ -31,6 +31,7 @@ import { tool as mathOcr } from './math-ocr'; import { tool as markdownTocGenerator } from './markdown-toc-generator'; import { tool as passphraseGenerator } from './passphrase-generator'; import { tool as pinCodeGenerator } from './pin-code-generator'; +import { tool as punycodeConverter } from './punycode-converter'; import { tool as cssXpathConverter } from './css-xpath-converter'; import { tool as cssSelectorsMemo } from './css-selectors-memo'; @@ -307,6 +308,7 @@ export const toolsByCategory: ToolCategory[] = [ components: [ ipv4SubnetCalculator, ipv4AddressConverter, + // ipv6AddressConverter, ipv4RangeExpander, macAddressLookup, macAddressGenerator, @@ -318,6 +320,7 @@ export const toolsByCategory: ToolCategory[] = [ ipGeoLocation, macAddressConverter, ipv6UlaGenerator, + punycodeConverter, ], }, { diff --git a/src/tools/punycode-converter/index.ts b/src/tools/punycode-converter/index.ts new file mode 100644 index 00000000..f1a51480 --- /dev/null +++ b/src/tools/punycode-converter/index.ts @@ -0,0 +1,12 @@ +import { World } from '@vicons/tabler'; +import { defineTool } from '../tool'; + +export const tool = defineTool({ + name: 'Punycode Converter', + path: '/punycode-converter', + description: 'Convert international unicode domain names or emails from/to ASCII Punycode version', + keywords: ['punycode', 'converter', 'rfc3492', 'bootstring', 'domain', 'dns'], + component: () => import('./punycode-converter.vue'), + icon: World, + createdAt: new Date('2024-08-15'), +}); diff --git a/src/tools/punycode-converter/punycode-converter.vue b/src/tools/punycode-converter/punycode-converter.vue new file mode 100644 index 00000000..7c0f3a44 --- /dev/null +++ b/src/tools/punycode-converter/punycode-converter.vue @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + +