mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-28 00:10:00 +03:00
Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65e137d276 | ||
|
|
3042df9a77 | ||
|
|
1af27138d7 | ||
|
|
a2d88762c9 | ||
|
|
ecbd65ca90 | ||
|
|
616e5c9516 | ||
|
|
4784925ee6 | ||
|
|
66bfb2db02 | ||
|
|
04f2ec1729 | ||
|
|
c68388f367 | ||
|
|
b9eead5521 | ||
|
|
fcb8ab2c19 |
No files matched your search
Vendored
+7
-4
@@ -11,7 +11,6 @@ declare module '@vue/runtime-core' {
|
||||
export interface GlobalComponents {
|
||||
'404.page': typeof import('./src/pages/404.page.vue')['default']
|
||||
About: typeof import('./src/pages/About.vue')['default']
|
||||
AiPromptSplitter: typeof import('./src/tools/ai-prompt-splitter/ai-prompt-splitter.vue')['default']
|
||||
App: typeof import('./src/App.vue')['default']
|
||||
AsciiTextDrawer: typeof import('./src/tools/ascii-text-drawer/ascii-text-drawer.vue')['default']
|
||||
'Base.layout': typeof import('./src/layouts/base.layout.vue')['default']
|
||||
@@ -131,20 +130,23 @@ declare module '@vue/runtime-core' {
|
||||
MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default']
|
||||
MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default']
|
||||
NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default']
|
||||
NCheckbox: typeof import('naive-ui')['NCheckbox']
|
||||
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
|
||||
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
||||
NDatePicker: typeof import('naive-ui')['NDatePicker']
|
||||
NDivider: typeof import('naive-ui')['NDivider']
|
||||
NDynamicInput: typeof import('naive-ui')['NDynamicInput']
|
||||
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
||||
NFormItem: typeof import('naive-ui')['NFormItem']
|
||||
NH1: typeof import('naive-ui')['NH1']
|
||||
NH3: typeof import('naive-ui')['NH3']
|
||||
NIcon: typeof import('naive-ui')['NIcon']
|
||||
NInput: typeof import('naive-ui')['NInput']
|
||||
NLayout: typeof import('naive-ui')['NLayout']
|
||||
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
||||
NMenu: typeof import('naive-ui')['NMenu']
|
||||
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
||||
NTag: typeof import('naive-ui')['NTag']
|
||||
NSelect: typeof import('naive-ui')['NSelect']
|
||||
NSpace: typeof import('naive-ui')['NSpace']
|
||||
NSwitch: typeof import('naive-ui')['NSwitch']
|
||||
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
|
||||
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
|
||||
PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default']
|
||||
@@ -175,6 +177,7 @@ declare module '@vue/runtime-core' {
|
||||
TextToBinary: typeof import('./src/tools/text-to-binary/text-to-binary.vue')['default']
|
||||
TextToNatoAlphabet: typeof import('./src/tools/text-to-nato-alphabet/text-to-nato-alphabet.vue')['default']
|
||||
TextToUnicode: typeof import('./src/tools/text-to-unicode/text-to-unicode.vue')['default']
|
||||
TimezoneConverter: typeof import('./src/tools/timezone-converter/timezone-converter.vue')['default']
|
||||
TokenDisplay: typeof import('./src/tools/otp-code-generator-and-validator/token-display.vue')['default']
|
||||
'TokenGenerator.tool': typeof import('./src/tools/token-generator/token-generator.tool.vue')['default']
|
||||
TomlToJson: typeof import('./src/tools/toml-to-json/toml-to-json.vue')['default']
|
||||
|
||||
+2
-1
@@ -54,9 +54,9 @@
|
||||
"@vueuse/router": "^10.0.0",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"change-case": "^4.1.2",
|
||||
"chatgpt-prompt-splitter": "^1.0.5",
|
||||
"colord": "^2.9.3",
|
||||
"composerize-ts": "^0.6.2",
|
||||
"countries-and-timezones": "^3.6.0",
|
||||
"country-code-lookup": "^0.1.0",
|
||||
"cron-validator": "^1.3.1",
|
||||
"cronstrue": "^2.26.0",
|
||||
@@ -68,6 +68,7 @@
|
||||
"figlet": "^1.7.0",
|
||||
"figue": "^1.2.0",
|
||||
"fuse.js": "^6.6.2",
|
||||
"get-timezone-offset": "^1.0.5",
|
||||
"highlight.js": "^11.7.0",
|
||||
"iarna-toml-esm": "^3.0.5",
|
||||
"ibantools": "^4.3.3",
|
||||
|
||||
Generated
+61
-112
@@ -19,7 +19,7 @@ dependencies:
|
||||
version: 2.2.1
|
||||
'@tabler/icons-vue':
|
||||
specifier: ^3.20.0
|
||||
version: 3.24.0(vue@3.3.4)
|
||||
version: 3.20.0(vue@3.3.4)
|
||||
'@tiptap/pm':
|
||||
specifier: 2.1.6
|
||||
version: 2.1.6
|
||||
@@ -56,15 +56,15 @@ dependencies:
|
||||
change-case:
|
||||
specifier: ^4.1.2
|
||||
version: 4.1.2
|
||||
chatgpt-prompt-splitter:
|
||||
specifier: ^1.0.5
|
||||
version: 1.0.5
|
||||
colord:
|
||||
specifier: ^2.9.3
|
||||
version: 2.9.3
|
||||
composerize-ts:
|
||||
specifier: ^0.6.2
|
||||
version: 0.6.2
|
||||
countries-and-timezones:
|
||||
specifier: ^3.6.0
|
||||
version: 3.7.2
|
||||
country-code-lookup:
|
||||
specifier: ^0.1.0
|
||||
version: 0.1.0
|
||||
@@ -98,6 +98,9 @@ dependencies:
|
||||
fuse.js:
|
||||
specifier: ^6.6.2
|
||||
version: 6.6.2
|
||||
get-timezone-offset:
|
||||
specifier: ^1.0.5
|
||||
version: 1.0.5
|
||||
highlight.js:
|
||||
specifier: ^11.7.0
|
||||
version: 11.7.0
|
||||
@@ -309,7 +312,7 @@ devDependencies:
|
||||
version: 5.2.2
|
||||
unocss:
|
||||
specifier: ^0.65.1
|
||||
version: 0.65.1(postcss@8.4.31)(rollup@2.79.1)(vite@4.4.9)(vue@3.3.4)
|
||||
version: 0.65.1(postcss@8.4.49)(rollup@2.79.1)(vite@4.4.9)(vue@3.3.4)
|
||||
unocss-preset-scrollbar:
|
||||
specifier: ^0.2.1
|
||||
version: 0.2.1(unocss@0.65.1)
|
||||
@@ -565,7 +568,7 @@ packages:
|
||||
'@babel/traverse': 7.23.2
|
||||
'@babel/types': 7.23.0
|
||||
convert-source-map: 2.0.0
|
||||
debug: 4.3.4
|
||||
debug: 4.4.0
|
||||
gensync: 1.0.0-beta.2
|
||||
json5: 2.2.3
|
||||
semver: 6.3.1
|
||||
@@ -612,7 +615,7 @@ packages:
|
||||
resolution: {integrity: sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
dependencies:
|
||||
'@babel/types': 7.23.0
|
||||
'@babel/types': 7.26.3
|
||||
dev: true
|
||||
|
||||
/@babel/helper-compilation-targets@7.22.10:
|
||||
@@ -692,7 +695,7 @@ packages:
|
||||
'@babel/core': 7.23.2
|
||||
'@babel/helper-compilation-targets': 7.22.15
|
||||
'@babel/helper-plugin-utils': 7.22.5
|
||||
debug: 4.3.4
|
||||
debug: 4.4.0
|
||||
lodash.debounce: 4.0.8
|
||||
resolve: 1.22.8
|
||||
transitivePeerDependencies:
|
||||
@@ -740,7 +743,7 @@ packages:
|
||||
resolution: {integrity: sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
dependencies:
|
||||
'@babel/types': 7.23.0
|
||||
'@babel/types': 7.26.3
|
||||
dev: true
|
||||
|
||||
/@babel/helper-module-imports@7.22.15:
|
||||
@@ -863,7 +866,7 @@ packages:
|
||||
/@babel/helper-string-parser@7.25.9:
|
||||
resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
dev: false
|
||||
requiresBuild: true
|
||||
|
||||
/@babel/helper-validator-identifier@7.22.20:
|
||||
resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==}
|
||||
@@ -876,7 +879,6 @@ packages:
|
||||
/@babel/helper-validator-identifier@7.25.9:
|
||||
resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
dev: false
|
||||
|
||||
/@babel/helper-validator-option@7.22.15:
|
||||
resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==}
|
||||
@@ -893,7 +895,7 @@ packages:
|
||||
dependencies:
|
||||
'@babel/helper-function-name': 7.23.0
|
||||
'@babel/template': 7.22.15
|
||||
'@babel/types': 7.23.0
|
||||
'@babel/types': 7.26.3
|
||||
dev: true
|
||||
|
||||
/@babel/helpers@7.22.10:
|
||||
@@ -976,7 +978,6 @@ packages:
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@babel/types': 7.26.3
|
||||
dev: false
|
||||
|
||||
/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.15(@babel/core@7.23.2):
|
||||
resolution: {integrity: sha512-FB9iYlz7rURmRJyXRKEnalYPPdn87H5no108cyuQQyMwlpJ2SJtpIUBI27kdTin956pz+LPypkPVPUTlxOmrsg==}
|
||||
@@ -1475,7 +1476,7 @@ packages:
|
||||
'@babel/helper-hoist-variables': 7.22.5
|
||||
'@babel/helper-module-transforms': 7.23.0(@babel/core@7.23.2)
|
||||
'@babel/helper-plugin-utils': 7.22.5
|
||||
'@babel/helper-validator-identifier': 7.22.20
|
||||
'@babel/helper-validator-identifier': 7.25.9
|
||||
dev: true
|
||||
|
||||
/@babel/plugin-transform-modules-umd@7.22.5(@babel/core@7.23.2):
|
||||
@@ -1833,7 +1834,7 @@ packages:
|
||||
'@babel/plugin-transform-unicode-regex': 7.22.5(@babel/core@7.23.2)
|
||||
'@babel/plugin-transform-unicode-sets-regex': 7.22.5(@babel/core@7.23.2)
|
||||
'@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.23.2)
|
||||
'@babel/types': 7.23.0
|
||||
'@babel/types': 7.26.3
|
||||
babel-plugin-polyfill-corejs2: 0.4.6(@babel/core@7.23.2)
|
||||
babel-plugin-polyfill-corejs3: 0.8.6(@babel/core@7.23.2)
|
||||
babel-plugin-polyfill-regenerator: 0.5.3(@babel/core@7.23.2)
|
||||
@@ -1850,7 +1851,7 @@ packages:
|
||||
dependencies:
|
||||
'@babel/core': 7.23.2
|
||||
'@babel/helper-plugin-utils': 7.22.5
|
||||
'@babel/types': 7.23.0
|
||||
'@babel/types': 7.26.3
|
||||
esutils: 2.0.3
|
||||
dev: true
|
||||
|
||||
@@ -1936,7 +1937,7 @@ packages:
|
||||
'@babel/helper-split-export-declaration': 7.22.6
|
||||
'@babel/parser': 7.23.0
|
||||
'@babel/types': 7.23.0
|
||||
debug: 4.3.4
|
||||
debug: 4.4.0
|
||||
globals: 11.12.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
@@ -1971,7 +1972,6 @@ packages:
|
||||
dependencies:
|
||||
'@babel/helper-string-parser': 7.25.9
|
||||
'@babel/helper-validator-identifier': 7.25.9
|
||||
dev: false
|
||||
|
||||
/@css-render/plugin-bem@0.15.12(css-render@0.15.12):
|
||||
resolution: {integrity: sha512-Lq2jSOZn+wYQtsyaFj6QRz2EzAnd3iW5fZeHO1WSXQdVYwvwGX0ZiH3X2JQgtgYLT1yeGtrwrqJdNdMEUD2xTw==}
|
||||
@@ -2609,7 +2609,7 @@ packages:
|
||||
engines: {node: '>=6.0.0'}
|
||||
dependencies:
|
||||
'@jridgewell/set-array': 1.2.1
|
||||
'@jridgewell/sourcemap-codec': 1.4.15
|
||||
'@jridgewell/sourcemap-codec': 1.5.0
|
||||
'@jridgewell/trace-mapping': 0.3.25
|
||||
dev: true
|
||||
|
||||
@@ -2633,8 +2633,8 @@ packages:
|
||||
/@jridgewell/source-map@0.3.5:
|
||||
resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==}
|
||||
dependencies:
|
||||
'@jridgewell/gen-mapping': 0.3.3
|
||||
'@jridgewell/trace-mapping': 0.3.20
|
||||
'@jridgewell/gen-mapping': 0.3.8
|
||||
'@jridgewell/trace-mapping': 0.3.25
|
||||
dev: true
|
||||
|
||||
/@jridgewell/sourcemap-codec@1.4.14:
|
||||
@@ -2662,7 +2662,7 @@ packages:
|
||||
resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==}
|
||||
dependencies:
|
||||
'@jridgewell/resolve-uri': 3.1.1
|
||||
'@jridgewell/sourcemap-codec': 1.4.15
|
||||
'@jridgewell/sourcemap-codec': 1.5.0
|
||||
dev: true
|
||||
|
||||
/@juggle/resize-observer@3.4.0:
|
||||
@@ -2684,7 +2684,7 @@ packages:
|
||||
resolution: {integrity: sha512-YnBq0JlDWMEkTOK+tMo5yEVR0f5V//6qMLToGcLhTyM9g9i+IDFn51Z+5q2hLk7RdG4NBPgbcCXYi2w4RKsPeg==}
|
||||
engines: {node: ^12.16.0 || >=13.7.0}
|
||||
dependencies:
|
||||
debug: 4.3.4
|
||||
debug: 4.4.0
|
||||
picocolors: 1.0.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
@@ -2964,17 +2964,17 @@ packages:
|
||||
resolution: {integrity: sha512-BjJ/7vWNowlX3Z8O4ywT58DqbNRyYlkk6Yz/D13aB7hGmfQTvGX4Tkgtm/ApYlu9M7lCQi15xUEidqMUmdMYwg==}
|
||||
dev: false
|
||||
|
||||
/@tabler/icons-vue@3.24.0(vue@3.3.4):
|
||||
resolution: {integrity: sha512-LfrDZ0K7+d3SR3ffDiAWp7aDheVz3DsXsqB6S/R8ZD2pm9IMDeesbDphwQ2RNCyIUb55bzP0N+c8iblf92WtAw==}
|
||||
/@tabler/icons-vue@3.20.0(vue@3.3.4):
|
||||
resolution: {integrity: sha512-kymV0q+bFNqU6bmdlnfK9ru88xFydYIs+jfe0160bLTmcq94ZxcLfXO5JLMq5kjntUSNb4fBvGk0mXB7aDCYnA==}
|
||||
peerDependencies:
|
||||
vue: '>=3.0.1'
|
||||
dependencies:
|
||||
'@tabler/icons': 3.24.0
|
||||
'@tabler/icons': 3.20.0
|
||||
vue: 3.3.4
|
||||
dev: false
|
||||
|
||||
/@tabler/icons@3.24.0:
|
||||
resolution: {integrity: sha512-qNis9e90QcdxAGV3wNIeX0Ba2R7ktm0cnqOToKHJfC2kj3fvJwEVLsw63K0/fm7NW8rSZjDSTQRmMnSg8g/wrg==}
|
||||
/@tabler/icons@3.20.0:
|
||||
resolution: {integrity: sha512-nXSeUzsCOxX/Of+kdUVQfxL9bG+ck8XCWNf9dGSpE+nhVexRwk/4HiDQDxFDysfT7vfgSut6GXnrZsU5M5dSlA==}
|
||||
dev: false
|
||||
|
||||
/@tiptap/core@2.1.12(@tiptap/pm@2.1.6):
|
||||
@@ -3559,7 +3559,7 @@ packages:
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 5.60.0
|
||||
'@typescript-eslint/visitor-keys': 5.60.0
|
||||
debug: 4.3.4
|
||||
debug: 4.4.0
|
||||
globby: 11.1.0
|
||||
is-glob: 4.0.3
|
||||
semver: 7.5.4
|
||||
@@ -3601,7 +3601,7 @@ packages:
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 6.9.1
|
||||
'@typescript-eslint/visitor-keys': 6.9.1
|
||||
debug: 4.3.4
|
||||
debug: 4.4.0
|
||||
globby: 11.1.0
|
||||
is-glob: 4.0.3
|
||||
semver: 7.5.4
|
||||
@@ -3841,7 +3841,7 @@ packages:
|
||||
- vue
|
||||
dev: true
|
||||
|
||||
/@unocss/postcss@0.65.1(postcss@8.4.31):
|
||||
/@unocss/postcss@0.65.1(postcss@8.4.49):
|
||||
resolution: {integrity: sha512-k7mKObxE4o1gApICri20TpI0lT/dtEQv+uYEOrFz267jgPVo3VD6umHsTOLA+OoQ5Bf7VEYQXSeV0oA96j0o1w==}
|
||||
engines: {node: '>=14'}
|
||||
peerDependencies:
|
||||
@@ -3851,7 +3851,7 @@ packages:
|
||||
'@unocss/core': 0.65.1
|
||||
'@unocss/rule-utils': 0.65.1
|
||||
css-tree: 3.1.0
|
||||
postcss: 8.4.31
|
||||
postcss: 8.4.49
|
||||
tinyglobby: 0.2.10
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
@@ -4113,17 +4113,6 @@ packages:
|
||||
estree-walker: 2.0.2
|
||||
source-map-js: 1.0.2
|
||||
|
||||
/@vue/compiler-core@3.3.7:
|
||||
resolution: {integrity: sha512-pACdY6YnTNVLXsB86YD8OF9ihwpolzhhtdLVHhBL6do/ykr6kKXNYABRtNMGrsQXpEXXyAdwvWWkuTbs4MFtPQ==}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
'@babel/parser': 7.23.0
|
||||
'@vue/shared': 3.3.7
|
||||
estree-walker: 2.0.2
|
||||
source-map-js: 1.0.2
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@vue/compiler-core@3.5.13:
|
||||
resolution: {integrity: sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==}
|
||||
dependencies:
|
||||
@@ -4132,7 +4121,6 @@ packages:
|
||||
entities: 4.5.0
|
||||
estree-walker: 2.0.2
|
||||
source-map-js: 1.2.1
|
||||
dev: false
|
||||
|
||||
/@vue/compiler-dom@3.2.47:
|
||||
resolution: {integrity: sha512-dBBnEHEPoftUiS03a4ggEig74J2YBZ2UIeyfpcRM2tavgMWo4bsEfgCGsu+uJIL/vax9S+JztH8NmQerUo7shQ==}
|
||||
@@ -4147,20 +4135,11 @@ packages:
|
||||
'@vue/compiler-core': 3.3.4
|
||||
'@vue/shared': 3.3.4
|
||||
|
||||
/@vue/compiler-dom@3.3.7:
|
||||
resolution: {integrity: sha512-0LwkyJjnUPssXv/d1vNJ0PKfBlDoQs7n81CbO6Q0zdL7H1EzqYRrTVXDqdBVqro0aJjo/FOa1qBAPVI4PGSHBw==}
|
||||
dependencies:
|
||||
'@vue/compiler-core': 3.3.7
|
||||
'@vue/shared': 3.3.7
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@vue/compiler-dom@3.5.13:
|
||||
resolution: {integrity: sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==}
|
||||
dependencies:
|
||||
'@vue/compiler-core': 3.5.13
|
||||
'@vue/shared': 3.5.13
|
||||
dev: false
|
||||
|
||||
/@vue/compiler-sfc@3.2.47:
|
||||
resolution: {integrity: sha512-rog05W+2IFfxjMcFw10tM9+f7i/+FFpZJJ5XHX72NP9eC2uRD+42M3pYcQqDXVYoj74kHMSEdQ/WmCjt8JFksQ==}
|
||||
@@ -4218,21 +4197,11 @@ packages:
|
||||
'@vue/compiler-dom': 3.3.4
|
||||
'@vue/shared': 3.3.4
|
||||
|
||||
/@vue/compiler-ssr@3.3.7:
|
||||
resolution: {integrity: sha512-TxOfNVVeH3zgBc82kcUv+emNHo+vKnlRrkv8YvQU5+Y5LJGJwSNzcmLUoxD/dNzv0bhQ/F0s+InlgV0NrApJZg==}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
'@vue/compiler-dom': 3.3.7
|
||||
'@vue/shared': 3.3.7
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@vue/compiler-ssr@3.5.13:
|
||||
resolution: {integrity: sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==}
|
||||
dependencies:
|
||||
'@vue/compiler-dom': 3.5.13
|
||||
'@vue/shared': 3.5.13
|
||||
dev: false
|
||||
|
||||
/@vue/devtools-api@6.5.0:
|
||||
resolution: {integrity: sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==}
|
||||
@@ -4324,13 +4293,13 @@ packages:
|
||||
'@vue/shared': 3.3.4
|
||||
vue: 3.3.4
|
||||
|
||||
/@vue/server-renderer@3.3.7(vue@3.3.4):
|
||||
resolution: {integrity: sha512-UlpKDInd1hIZiNuVVVvLgxpfnSouxKQOSE2bOfQpBuGwxRV/JqqTCyyjXUWiwtVMyeRaZhOYYqntxElk8FhBhw==}
|
||||
/@vue/server-renderer@3.5.13(vue@3.3.4):
|
||||
resolution: {integrity: sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==}
|
||||
peerDependencies:
|
||||
vue: 3.3.7
|
||||
vue: 3.5.13
|
||||
dependencies:
|
||||
'@vue/compiler-ssr': 3.3.7
|
||||
'@vue/shared': 3.3.7
|
||||
'@vue/compiler-ssr': 3.5.13
|
||||
'@vue/shared': 3.5.13
|
||||
vue: 3.3.4
|
||||
dev: true
|
||||
optional: true
|
||||
@@ -4352,15 +4321,8 @@ packages:
|
||||
/@vue/shared@3.3.4:
|
||||
resolution: {integrity: sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==}
|
||||
|
||||
/@vue/shared@3.3.7:
|
||||
resolution: {integrity: sha512-N/tbkINRUDExgcPTBvxNkvHGu504k8lzlNQRITVnm6YjOjwa4r0nnbd4Jb01sNpur5hAllyRJzSK5PvB9PPwRg==}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@vue/shared@3.5.13:
|
||||
resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==}
|
||||
dev: false
|
||||
|
||||
/@vue/test-utils@2.3.2(vue@3.3.4):
|
||||
resolution: {integrity: sha512-hJnVaYhbrIm0yBS0+e1Y0Sj85cMyAi+PAbK4JHqMRUZ6S622Goa+G7QzkRSyvCteG8wop7tipuEbHoZo26wsSA==}
|
||||
@@ -4370,8 +4332,8 @@ packages:
|
||||
js-beautify: 1.14.6
|
||||
vue: 3.3.4
|
||||
optionalDependencies:
|
||||
'@vue/compiler-dom': 3.3.7
|
||||
'@vue/server-renderer': 3.3.7(vue@3.3.4)
|
||||
'@vue/compiler-dom': 3.5.13
|
||||
'@vue/server-renderer': 3.5.13(vue@3.3.4)
|
||||
dev: true
|
||||
|
||||
/@vue/tsconfig@0.4.0:
|
||||
@@ -4505,7 +4467,7 @@ packages:
|
||||
resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==}
|
||||
engines: {node: '>= 6.0.0'}
|
||||
dependencies:
|
||||
debug: 4.3.4
|
||||
debug: 4.4.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
@@ -4909,10 +4871,6 @@ packages:
|
||||
resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==}
|
||||
dev: true
|
||||
|
||||
/chatgpt-prompt-splitter@1.0.5:
|
||||
resolution: {integrity: sha512-8buXXnxZ5Y5BloPTMEhGTVld9vrVB8WVrUFrjgOpIJ4/VsT+rTnLszbaS1L1KAB0SDSCqj8GU472S2gMyhH8EA==}
|
||||
dev: false
|
||||
|
||||
/check-error@1.0.2:
|
||||
resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==}
|
||||
dev: true
|
||||
@@ -5105,6 +5063,11 @@ packages:
|
||||
browserslist: 4.22.1
|
||||
dev: true
|
||||
|
||||
/countries-and-timezones@3.7.2:
|
||||
resolution: {integrity: sha512-BHAMt4pKb3U3r/mRfiIlVnDhRd8m6VC20gwCWtpZGZkSsjZmnMDKFnnjWYGWhBmypQAqcQILFJwmEhIgWGVTmw==}
|
||||
engines: {node: '>=8.x', npm: '>=5.x'}
|
||||
dev: false
|
||||
|
||||
/country-code-lookup@0.1.0:
|
||||
resolution: {integrity: sha512-IOI66HEG+8bXfWPy+sTzuN7161vmDZOHg1wgIPFf3WfD73FeLajnn6C+fnxOIa9RL1WRBDMXQQWW/FOaOYaQ3w==}
|
||||
dev: false
|
||||
@@ -5177,7 +5140,7 @@ packages:
|
||||
engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0}
|
||||
dependencies:
|
||||
mdn-data: 2.12.2
|
||||
source-map-js: 1.0.2
|
||||
source-map-js: 1.2.1
|
||||
dev: true
|
||||
|
||||
/css-what@6.1.0:
|
||||
@@ -5279,6 +5242,7 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
ms: 2.1.2
|
||||
dev: true
|
||||
|
||||
/debug@4.4.0:
|
||||
resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==}
|
||||
@@ -5290,7 +5254,6 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
ms: 2.1.3
|
||||
dev: true
|
||||
|
||||
/decamelize@1.2.0:
|
||||
resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==}
|
||||
@@ -5498,7 +5461,7 @@ packages:
|
||||
/email-normalizer@1.0.0:
|
||||
resolution: {integrity: sha512-wZYuuMtL4kUOmg/TPtCrf9hAZjbFq+FcjWA85Z5nr2lGllRnWJPxCJw3gy4Cx+adMoyVw4VJfGGvt/OHgIW+qg==}
|
||||
dependencies:
|
||||
typescript: 5.7.2
|
||||
typescript: 5.5.4
|
||||
dev: false
|
||||
|
||||
/emitter-component@1.1.1:
|
||||
@@ -5792,7 +5755,7 @@ packages:
|
||||
eslint: 8.47.0
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.4.1)(eslint-import-resolver-node@0.3.9)(eslint@8.47.0)
|
||||
get-tsconfig: 4.7.2
|
||||
get-tsconfig: 4.8.1
|
||||
is-glob: 4.0.3
|
||||
minimatch: 3.1.2
|
||||
resolve: 1.22.8
|
||||
@@ -6379,11 +6342,10 @@ packages:
|
||||
get-intrinsic: 1.2.2
|
||||
dev: true
|
||||
|
||||
/get-tsconfig@4.7.2:
|
||||
resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==}
|
||||
dependencies:
|
||||
resolve-pkg-maps: 1.0.0
|
||||
dev: true
|
||||
/get-timezone-offset@1.0.5:
|
||||
resolution: {integrity: sha512-+B+/vEJ9qJgZheDVNmuY+4il8sJhTFXRvSiiqyRfwiCEhTaZqn/yCoNToDzQL+Mv9DLKlyO1bSIP5nUCJQN9Aw==}
|
||||
engines: {node: '>=4.0.0'}
|
||||
dev: false
|
||||
|
||||
/get-tsconfig@4.8.1:
|
||||
resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==}
|
||||
@@ -7521,7 +7483,7 @@ packages:
|
||||
/micromark@2.11.4:
|
||||
resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==}
|
||||
dependencies:
|
||||
debug: 4.3.4
|
||||
debug: 4.4.0
|
||||
parse-entities: 2.0.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
@@ -7623,11 +7585,11 @@ packages:
|
||||
|
||||
/ms@2.1.2:
|
||||
resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
|
||||
dev: true
|
||||
|
||||
/ms@2.1.3:
|
||||
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
|
||||
/muggle-string@0.3.1:
|
||||
resolution: {integrity: sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg==}
|
||||
@@ -7667,7 +7629,6 @@ packages:
|
||||
resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==}
|
||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||
hasBin: true
|
||||
dev: false
|
||||
|
||||
/natural-compare@1.4.0:
|
||||
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
|
||||
@@ -8054,7 +8015,6 @@ packages:
|
||||
|
||||
/picocolors@1.1.1:
|
||||
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
|
||||
dev: false
|
||||
|
||||
/picomatch@2.3.1:
|
||||
resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
|
||||
@@ -8150,15 +8110,6 @@ packages:
|
||||
picocolors: 1.0.0
|
||||
source-map-js: 1.0.2
|
||||
|
||||
/postcss@8.4.31:
|
||||
resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==}
|
||||
engines: {node: ^10 || ^12 || >=14}
|
||||
dependencies:
|
||||
nanoid: 3.3.6
|
||||
picocolors: 1.0.0
|
||||
source-map-js: 1.0.2
|
||||
dev: true
|
||||
|
||||
/postcss@8.4.49:
|
||||
resolution: {integrity: sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==}
|
||||
engines: {node: ^10 || ^12 || >=14}
|
||||
@@ -8166,7 +8117,6 @@ packages:
|
||||
nanoid: 3.3.8
|
||||
picocolors: 1.1.1
|
||||
source-map-js: 1.2.1
|
||||
dev: false
|
||||
|
||||
/prelude-ls@1.2.1:
|
||||
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
|
||||
@@ -8853,7 +8803,6 @@ packages:
|
||||
/source-map-js@1.2.1:
|
||||
resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: false
|
||||
|
||||
/source-map-support@0.5.21:
|
||||
resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==}
|
||||
@@ -9117,7 +9066,7 @@ packages:
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@jridgewell/source-map': 0.3.5
|
||||
acorn: 8.11.2
|
||||
acorn: 8.14.0
|
||||
commander: 2.20.3
|
||||
source-map-support: 0.5.21
|
||||
dev: true
|
||||
@@ -9349,8 +9298,8 @@ packages:
|
||||
engines: {node: '>=14.17'}
|
||||
hasBin: true
|
||||
|
||||
/typescript@5.7.2:
|
||||
resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==}
|
||||
/typescript@5.5.4:
|
||||
resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==}
|
||||
engines: {node: '>=14.17'}
|
||||
hasBin: true
|
||||
dev: false
|
||||
@@ -9495,10 +9444,10 @@ packages:
|
||||
unocss: '>= 0.31.13 < 1'
|
||||
dependencies:
|
||||
'@unocss/preset-mini': 0.31.17
|
||||
unocss: 0.65.1(postcss@8.4.31)(rollup@2.79.1)(vite@4.4.9)(vue@3.3.4)
|
||||
unocss: 0.65.1(postcss@8.4.49)(rollup@2.79.1)(vite@4.4.9)(vue@3.3.4)
|
||||
dev: true
|
||||
|
||||
/unocss@0.65.1(postcss@8.4.31)(rollup@2.79.1)(vite@4.4.9)(vue@3.3.4):
|
||||
/unocss@0.65.1(postcss@8.4.49)(rollup@2.79.1)(vite@4.4.9)(vue@3.3.4):
|
||||
resolution: {integrity: sha512-WK8EZlduulTcy2i1O4/hVPIYlgcztMbOqsIrxY18Hx1LXSkI5LgTl0FVEyf+xLcwqoUzt4VH2BWEEkzQ13+GAg==}
|
||||
engines: {node: '>=14'}
|
||||
peerDependencies:
|
||||
@@ -9513,7 +9462,7 @@ packages:
|
||||
'@unocss/astro': 0.65.1(rollup@2.79.1)(vite@4.4.9)(vue@3.3.4)
|
||||
'@unocss/cli': 0.65.1(rollup@2.79.1)
|
||||
'@unocss/core': 0.65.1
|
||||
'@unocss/postcss': 0.65.1(postcss@8.4.31)
|
||||
'@unocss/postcss': 0.65.1(postcss@8.4.49)
|
||||
'@unocss/preset-attributify': 0.65.1
|
||||
'@unocss/preset-icons': 0.65.1
|
||||
'@unocss/preset-mini': 0.65.1
|
||||
|
||||
@@ -128,7 +128,7 @@ function activateOption(option: PaletteOption) {
|
||||
<c-input-text ref="inputRef" v-model:value="searchPrompt" raw-text placeholder="Type to search a tool or a command..." autofocus clearable />
|
||||
|
||||
<div v-for="(options, category) in filteredSearchResult" :key="category">
|
||||
<div ml-3 mt-3 text-sm text-primary font-bold op-60>
|
||||
<div ml-3 mt-3 text-sm font-bold text-primary op-60>
|
||||
{{ category }}
|
||||
</div>
|
||||
<command-palette-option v-for="option in options" :key="option.name" :option="option" :selected="selectedOptionIndex === getOptionIndex(option)" @activated="activateOption" />
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import promptSplitter from 'chatgpt-prompt-splitter';
|
||||
import { useValidation } from '@/composable/validation';
|
||||
|
||||
const prompt = ref('');
|
||||
const splitLength = ref(1024);
|
||||
|
||||
const splittedPrompts = computed(() => {
|
||||
try {
|
||||
return promptSplitter({
|
||||
prompt: prompt.value,
|
||||
splitLength: splitLength.value,
|
||||
newLine: true,
|
||||
});
|
||||
}
|
||||
catch (e: any) {
|
||||
return [e.toString()];
|
||||
}
|
||||
});
|
||||
|
||||
const promptValidation = useValidation({
|
||||
source: prompt,
|
||||
rules: [
|
||||
{
|
||||
validator: v => v !== '',
|
||||
message: 'Prompt must not be empty',
|
||||
},
|
||||
],
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div style="max-width: 600px;">
|
||||
<c-card title="Prompt and options" mb-2>
|
||||
<c-input-text
|
||||
v-model:value="prompt"
|
||||
label="Full Prompt"
|
||||
multiline
|
||||
placeholder="Put your full prompt here..."
|
||||
rows="10"
|
||||
:validation="promptValidation"
|
||||
mb-2
|
||||
/>
|
||||
<n-form-item label="Character length for each chunk">
|
||||
<n-input-number v-model:value="splitLength" :min="1" />
|
||||
</n-form-item>
|
||||
</c-card>
|
||||
|
||||
<c-card title="Divided prompts">
|
||||
<div v-for="(splittedPrompt, index) in splittedPrompts" :key="index">
|
||||
<TextareaCopyable :value="splittedPrompt" />
|
||||
</div>
|
||||
</c-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,7 +0,0 @@
|
||||
declare module "chatgpt-prompt-splitter" {
|
||||
export default function promptSplitter(options: {
|
||||
prompt: string
|
||||
splitLength: number
|
||||
newLine: boolean
|
||||
}): Array<string>;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
import { Prompt } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'AI Prompt Splitter',
|
||||
path: '/ai-prompt-splitter',
|
||||
description: 'Split a long document to multiple chat (ie ChatGPT) prompts',
|
||||
keywords: ['ai', 'chatgpt', 'gpt', 'prompt', 'splitter'],
|
||||
component: () => import('./ai-prompt-splitter.vue'),
|
||||
icon: Prompt,
|
||||
createdAt: new Date('2024-07-14'),
|
||||
});
|
||||
+2
-2
@@ -9,7 +9,7 @@ import { tool as textToUnicode } from './text-to-unicode';
|
||||
import { tool as safelinkDecoder } from './safelink-decoder';
|
||||
import { tool as xmlToJson } from './xml-to-json';
|
||||
import { tool as jsonToXml } from './json-to-xml';
|
||||
import { tool as aiPromptSplitter } from './ai-prompt-splitter';
|
||||
import { tool as timezoneConverter } from './timezone-converter';
|
||||
import { tool as regexTester } from './regex-tester';
|
||||
import { tool as regexMemo } from './regex-memo';
|
||||
import { tool as markdownToHtml } from './markdown-to-html';
|
||||
@@ -98,6 +98,7 @@ export const toolsByCategory: ToolCategory[] = [
|
||||
name: 'Converter',
|
||||
components: [
|
||||
dateTimeConverter,
|
||||
timezoneConverter,
|
||||
baseConverter,
|
||||
romanNumeralConverter,
|
||||
base64StringConverter,
|
||||
@@ -184,7 +185,6 @@ export const toolsByCategory: ToolCategory[] = [
|
||||
stringObfuscator,
|
||||
textDiff,
|
||||
numeronymGenerator,
|
||||
aiPromptSplitter,
|
||||
asciiTextDrawer,
|
||||
],
|
||||
},
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
declare module "get-timezone-offset" {
|
||||
export default function(timeZoneName: string, date: Date);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { CalendarTime } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Timezone Converter',
|
||||
path: '/timezone-converter',
|
||||
description: 'Convert Date-Time from a timezone to others and get timezone vs countries infos',
|
||||
keywords: ['timezone', 'tz', 'date', 'time', 'country', 'converter'],
|
||||
component: () => import('./timezone-converter.vue'),
|
||||
icon: CalendarTime,
|
||||
createdAt: new Date('2024-08-15'),
|
||||
});
|
||||
@@ -0,0 +1,141 @@
|
||||
<script setup lang="ts">
|
||||
import ctz from 'countries-and-timezones';
|
||||
import getTimezoneOffset from 'get-timezone-offset';
|
||||
|
||||
const browserTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
const allTimezones = Object.values(ctz.getAllTimezones()).map(tz => ({
|
||||
value: tz.name,
|
||||
label: `${tz.name === browserTimezone ? 'Browser TZ - ' : ''}${tz.name} (${tz.utcOffset === tz.dstOffset ? tz.utcOffsetStr : `${tz.utcOffsetStr}/${tz.dstOffsetStr}`})`,
|
||||
}));
|
||||
|
||||
function convertMinsToHrsMins(minutes: number) {
|
||||
const h = String(Math.floor(minutes / 60)).padStart(2, '0');
|
||||
const m = String(minutes % 60).padStart(2, '0');
|
||||
return `${h}:${m}`;
|
||||
}
|
||||
|
||||
const otherTimezones = useStorage<{ name: string }[]>('timezone-conv:zones', [{ name: 'Etc/GMT' }]);
|
||||
const currentTimezone = useStorage<string>('timezone-conv:current', browserTimezone);
|
||||
const use24HourTimeFormat = useStorage<boolean>('timezone-conv:24h', true);
|
||||
const format = computed(() => use24HourTimeFormat.value ? 'yyyy-MM-dd HH:mm:ss' : 'yyyy-MM-dd hh:mm:ss a');
|
||||
const timePickerProps = computed(() => use24HourTimeFormat.value ? ({ use12Hours: false }) : ({ use12Hours: true }));
|
||||
|
||||
const now = Date.now();
|
||||
const currentDatetimeRange = ref<[number, number]>([now, now]);
|
||||
const currentTimezoneOffset = computed(() => {
|
||||
return convertMinsToHrsMins(-getTimezoneOffset(currentTimezone.value, new Date(currentDatetimeRange.value[0])));
|
||||
});
|
||||
function convertToTimezone(tz: string, timestamp: number) {
|
||||
return new Date(
|
||||
timestamp
|
||||
+ getTimezoneOffset(currentTimezone.value, new Date()) * 60 * 1000
|
||||
- getTimezoneOffset(browserTimezone, new Date()) * 60 * 1000,
|
||||
).toLocaleString(undefined,
|
||||
{ timeZone: tz, timeZoneName: undefined, hour12: !use24HourTimeFormat.value });
|
||||
}
|
||||
|
||||
const tzToCountriesInput = ref(browserTimezone);
|
||||
const tzToCountriesOutput = computed(() => ctz.getCountriesForTimezone(tzToCountriesInput.value));
|
||||
|
||||
const allCountries = Object.values(ctz.getAllCountries()).map(c => ({
|
||||
value: c.id,
|
||||
label: `${c.name} (${c.id})`,
|
||||
}));
|
||||
const countryToTimezonesInput = ref('FR');
|
||||
const countryToTimezonesOutput = computed(() => ctz.getTimezonesForCountry(countryToTimezonesInput.value));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<c-card title="Timezones Date-Time Converter" mb-2>
|
||||
<c-select
|
||||
v-model:value="currentTimezone"
|
||||
label="Timezone"
|
||||
label-position="left"
|
||||
searchable
|
||||
:options="allTimezones"
|
||||
mb-2
|
||||
/>
|
||||
<n-form-item label="Date/time interval to convert:" label-placement="top">
|
||||
<n-date-picker
|
||||
:key="format"
|
||||
v-model:value="currentDatetimeRange"
|
||||
type="datetimerange"
|
||||
:format="format"
|
||||
:time-picker-props="timePickerProps"
|
||||
mb-2
|
||||
w-full
|
||||
/>
|
||||
</n-form-item>
|
||||
|
||||
<n-space justify="space-evenly">
|
||||
<n-form-item label="Current Timezone Offset:" label-placement="left">
|
||||
<n-input :value="currentTimezoneOffset" readonly style="width:5em" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Use 24 hour time format" label-placement="left">
|
||||
<n-switch v-model:value="use24HourTimeFormat" />
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
|
||||
<c-card title="Date-Time in other timezones">
|
||||
<n-dynamic-input
|
||||
v-model:value="otherTimezones"
|
||||
show-sort-button
|
||||
:on-create="() => ({ name: browserTimezone })"
|
||||
>
|
||||
<template #default="{ value }">
|
||||
<div flex flex-wrap items-center gap-1>
|
||||
<n-select
|
||||
v-model:value="value.name"
|
||||
filterable
|
||||
placeholder="Please select a timezone"
|
||||
:options="allTimezones"
|
||||
w-full
|
||||
/>
|
||||
<div w-full flex items-baseline gap-1>
|
||||
<n-input style="min-width: 49%" readonly :value="convertToTimezone(value.name, currentDatetimeRange[0])" />
|
||||
<n-input style="min-width: 49%" readonly :value="convertToTimezone(value.name, currentDatetimeRange[1])" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</n-dynamic-input>
|
||||
</c-card>
|
||||
</c-card>
|
||||
|
||||
<c-card title="Country to Timezones" mb-2>
|
||||
<c-select
|
||||
v-model:value="countryToTimezonesInput"
|
||||
label="Country"
|
||||
label-position="left"
|
||||
searchable
|
||||
:options="allCountries"
|
||||
/>
|
||||
|
||||
<n-divider />
|
||||
|
||||
<ul>
|
||||
<li v-for="(tz, ix) in countryToTimezonesOutput" :key="ix">
|
||||
{{ tz.name }} ({{ tz.countries.join(', ') }}): UTC= {{ tz.utcOffsetStr }}, DST= {{ tz.dstOffsetStr }}
|
||||
</li>
|
||||
</ul>
|
||||
</c-card>
|
||||
|
||||
<c-card title="Timezones to Countries" mb-2>
|
||||
<c-select
|
||||
v-model:value="tzToCountriesInput"
|
||||
label="Timezone"
|
||||
label-position="left"
|
||||
searchable
|
||||
:options="allTimezones"
|
||||
/>
|
||||
|
||||
<n-divider />
|
||||
|
||||
<ul>
|
||||
<li v-for="(country, ix) in tzToCountriesOutput" :key="ix">
|
||||
{{ country.name }} ({{ country.id }}): {{ country.timezones.join(', ') }}
|
||||
</li>
|
||||
</ul>
|
||||
</c-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -151,7 +151,7 @@ function onSearchInput() {
|
||||
>
|
||||
<div flex-1 truncate>
|
||||
<slot name="displayed-value">
|
||||
<input v-if="searchable && isOpen" ref="searchInputRef" v-model="searchQuery" type="text" placeholder="Search..." class="search-input" w-full color-current lh-normal @input="onSearchInput">
|
||||
<input v-if="searchable && isOpen" ref="searchInputRef" v-model="searchQuery" type="text" placeholder="Search..." class="search-input" w-full lh-normal color-current @input="onSearchInput">
|
||||
<span v-else-if="selectedOption" lh-normal>
|
||||
{{ selectedOption.label }}
|
||||
</span>
|
||||
|
||||
@@ -39,7 +39,7 @@ const headers = computed(() => {
|
||||
<template>
|
||||
<div class="relative overflow-x-auto rounded">
|
||||
<table class="w-full border-collapse text-left text-sm text-gray-500 dark:text-gray-400" role="table" :aria-label="description">
|
||||
<thead v-if="!hideHeaders" class="bg-#ffffff text-gray-700 uppercase dark:bg-#333333 dark:text-gray-400" border-b="1px solid dark:transparent #efeff5">
|
||||
<thead v-if="!hideHeaders" class="bg-#ffffff uppercase text-gray-700 dark:bg-#333333 dark:text-gray-400" border-b="1px solid dark:transparent #efeff5">
|
||||
<tr>
|
||||
<th v-for="header in headers" :key="header.key" scope="col" class="px-6 py-3 text-xs">
|
||||
{{ header.label }}
|
||||
|
||||
Reference in new issue
Block a user