mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-24 23:00:19 +03:00
Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8371d208b1 | ||
|
|
3f7745de2c | ||
|
|
cb37d5837f | ||
|
|
786991433a | ||
|
|
d92a285cb2 | ||
|
|
4c014a63e1 | ||
|
|
dbfe5113b0 | ||
|
|
e32d38c057 |
No files matched your search
Vendored
+12
-3
@@ -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']
|
||||
@@ -122,7 +121,7 @@ declare module '@vue/runtime-core' {
|
||||
LoremIpsumGenerator: typeof import('./src/tools/lorem-ipsum-generator/lorem-ipsum-generator.vue')['default']
|
||||
MacAddressGenerator: typeof import('./src/tools/mac-address-generator/mac-address-generator.vue')['default']
|
||||
MacAddressLookup: typeof import('./src/tools/mac-address-lookup/mac-address-lookup.vue')['default']
|
||||
MarkdownToHtml: typeof import('./src/tools/markdown-to-html/markdown-to-html.vue')['default']
|
||||
MarkdownTocGenerator: typeof import('./src/tools/markdown-toc-generator/markdown-toc-generator.vue')['default']
|
||||
MathEvaluator: typeof import('./src/tools/math-evaluator/math-evaluator.vue')['default']
|
||||
MenuBar: typeof import('./src/tools/html-wysiwyg-editor/editor/menu-bar.vue')['default']
|
||||
MenuBarItem: typeof import('./src/tools/html-wysiwyg-editor/editor/menu-bar-item.vue')['default']
|
||||
@@ -132,19 +131,29 @@ declare module '@vue/runtime-core' {
|
||||
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']
|
||||
NCode: typeof import('naive-ui')['NCode']
|
||||
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
|
||||
NColorPicker: typeof import('naive-ui')['NColorPicker']
|
||||
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
||||
NDivider: typeof import('naive-ui')['NDivider']
|
||||
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
||||
NForm: typeof import('naive-ui')['NForm']
|
||||
NFormItem: typeof import('naive-ui')['NFormItem']
|
||||
NGi: typeof import('naive-ui')['NGi']
|
||||
NGrid: typeof import('naive-ui')['NGrid']
|
||||
NH1: typeof import('naive-ui')['NH1']
|
||||
NH3: typeof import('naive-ui')['NH3']
|
||||
NIcon: typeof import('naive-ui')['NIcon']
|
||||
NImage: typeof import('naive-ui')['NImage']
|
||||
NInputNumber: typeof import('naive-ui')['NInputNumber']
|
||||
NLabel: typeof import('naive-ui')['NLabel']
|
||||
NLayout: typeof import('naive-ui')['NLayout']
|
||||
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
||||
NMenu: typeof import('naive-ui')['NMenu']
|
||||
NP: typeof import('naive-ui')['NP']
|
||||
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
||||
NTag: typeof import('naive-ui')['NTag']
|
||||
NSpace: typeof import('naive-ui')['NSpace']
|
||||
NSpin: typeof import('naive-ui')['NSpin']
|
||||
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']
|
||||
|
||||
+2
-1
@@ -54,7 +54,6 @@
|
||||
"@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",
|
||||
"country-code-lookup": "^0.1.0",
|
||||
@@ -89,6 +88,7 @@
|
||||
"pinia": "^2.0.34",
|
||||
"plausible-tracker": "^0.3.8",
|
||||
"qrcode": "^1.5.1",
|
||||
"sanitize-html": "^2.13.1",
|
||||
"randexp": "^0.5.3",
|
||||
"sql-formatter": "^13.0.0",
|
||||
"ua-parser-js": "^1.0.35",
|
||||
@@ -123,6 +123,7 @@
|
||||
"@types/node": "^18.15.11",
|
||||
"@types/node-forge": "^1.3.2",
|
||||
"@types/qrcode": "^1.5.0",
|
||||
"@types/sanitize-html": "^2.13.0",
|
||||
"@types/ua-parser-js": "^0.7.36",
|
||||
"@types/uuid": "^9.0.0",
|
||||
"@unocss/eslint-config": "^0.57.0",
|
||||
|
||||
Generated
+68
-93
@@ -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.26.0(vue@3.3.4)
|
||||
'@tiptap/pm':
|
||||
specifier: 2.1.6
|
||||
version: 2.1.6
|
||||
@@ -56,9 +56,6 @@ 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
|
||||
@@ -164,6 +161,9 @@ dependencies:
|
||||
randexp:
|
||||
specifier: ^0.5.3
|
||||
version: 0.5.3
|
||||
sanitize-html:
|
||||
specifier: ^2.13.1
|
||||
version: 2.13.1
|
||||
sql-formatter:
|
||||
specifier: ^13.0.0
|
||||
version: 13.0.0
|
||||
@@ -259,6 +259,9 @@ devDependencies:
|
||||
'@types/qrcode':
|
||||
specifier: ^1.5.0
|
||||
version: 1.5.0
|
||||
'@types/sanitize-html':
|
||||
specifier: ^2.13.0
|
||||
version: 2.13.0
|
||||
'@types/ua-parser-js':
|
||||
specifier: ^0.7.36
|
||||
version: 0.7.36
|
||||
@@ -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)
|
||||
@@ -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:
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -2656,13 +2656,13 @@ packages:
|
||||
resolution: {integrity: sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==}
|
||||
dependencies:
|
||||
'@jridgewell/resolve-uri': 3.1.1
|
||||
'@jridgewell/sourcemap-codec': 1.4.15
|
||||
'@jridgewell/sourcemap-codec': 1.5.0
|
||||
|
||||
/@jridgewell/trace-mapping@0.3.25:
|
||||
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:
|
||||
@@ -2913,8 +2913,8 @@ packages:
|
||||
rollup: 2.79.1
|
||||
dev: true
|
||||
|
||||
/@rollup/pluginutils@5.1.3(rollup@2.79.1):
|
||||
resolution: {integrity: sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==}
|
||||
/@rollup/pluginutils@5.1.4(rollup@2.79.1):
|
||||
resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0
|
||||
@@ -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.26.0(vue@3.3.4):
|
||||
resolution: {integrity: sha512-jsZxEfiJSB+HtNpk4+RXMXV8aA8dedJ9+VhQnhNAiYH1dq/TQoSdlvL/707sTiG8NfVKixTNHasjm6MiiDS1Bw==}
|
||||
peerDependencies:
|
||||
vue: '>=3.0.1'
|
||||
dependencies:
|
||||
'@tabler/icons': 3.24.0
|
||||
'@tabler/icons': 3.26.0
|
||||
vue: 3.3.4
|
||||
dev: false
|
||||
|
||||
/@tabler/icons@3.24.0:
|
||||
resolution: {integrity: sha512-qNis9e90QcdxAGV3wNIeX0Ba2R7ktm0cnqOToKHJfC2kj3fvJwEVLsw63K0/fm7NW8rSZjDSTQRmMnSg8g/wrg==}
|
||||
/@tabler/icons@3.26.0:
|
||||
resolution: {integrity: sha512-oO3D4ss+DxzxqU1aDy0f1HmToyrO0gcQWIMpzHAfV1quPUx0BZYvNm5xz1DQb4DxNm/+xNvbBGLJy4pzTLYWag==}
|
||||
dev: false
|
||||
|
||||
/@tiptap/core@2.1.12(@tiptap/pm@2.1.6):
|
||||
@@ -3403,6 +3403,12 @@ packages:
|
||||
'@types/node': 18.18.8
|
||||
dev: true
|
||||
|
||||
/@types/sanitize-html@2.13.0:
|
||||
resolution: {integrity: sha512-X31WxbvW9TjIhZZNyNBZ/p5ax4ti7qsNDBDEnH4zAgmEh35YnFD1UiS6z9Cd34kKm0LslFW0KPmTQzu/oGtsqQ==}
|
||||
dependencies:
|
||||
htmlparser2: 8.0.2
|
||||
dev: true
|
||||
|
||||
/@types/semver@7.5.0:
|
||||
resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==}
|
||||
dev: true
|
||||
@@ -3750,7 +3756,7 @@ packages:
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@ampproject/remapping': 2.3.0
|
||||
'@rollup/pluginutils': 5.1.3(rollup@2.79.1)
|
||||
'@rollup/pluginutils': 5.1.4(rollup@2.79.1)
|
||||
'@unocss/config': 0.65.1
|
||||
'@unocss/core': 0.65.1
|
||||
'@unocss/preset-uno': 0.65.1
|
||||
@@ -3841,7 +3847,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 +3857,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
|
||||
@@ -3968,7 +3974,7 @@ packages:
|
||||
vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0
|
||||
dependencies:
|
||||
'@ampproject/remapping': 2.3.0
|
||||
'@rollup/pluginutils': 5.1.3(rollup@2.79.1)
|
||||
'@rollup/pluginutils': 5.1.4(rollup@2.79.1)
|
||||
'@unocss/config': 0.65.1
|
||||
'@unocss/core': 0.65.1
|
||||
'@unocss/inspector': 0.65.1(vue@3.3.4)
|
||||
@@ -4113,17 +4119,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 +4127,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 +4141,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 +4203,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 +4299,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 +4327,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 +4338,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:
|
||||
@@ -4909,10 +4877,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
|
||||
@@ -5161,7 +5125,7 @@ packages:
|
||||
engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0, npm: '>=7.0.0'}
|
||||
dependencies:
|
||||
mdn-data: 2.0.28
|
||||
source-map-js: 1.0.2
|
||||
source-map-js: 1.2.1
|
||||
dev: true
|
||||
|
||||
/css-tree@2.3.1:
|
||||
@@ -5177,7 +5141,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:
|
||||
@@ -5417,11 +5381,9 @@ packages:
|
||||
domelementtype: 2.3.0
|
||||
domhandler: 5.0.3
|
||||
entities: 4.5.0
|
||||
dev: true
|
||||
|
||||
/domelementtype@2.3.0:
|
||||
resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==}
|
||||
dev: true
|
||||
|
||||
/domexception@4.0.0:
|
||||
resolution: {integrity: sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==}
|
||||
@@ -5435,7 +5397,6 @@ packages:
|
||||
engines: {node: '>= 4'}
|
||||
dependencies:
|
||||
domelementtype: 2.3.0
|
||||
dev: true
|
||||
|
||||
/dompurify@3.0.6:
|
||||
resolution: {integrity: sha512-ilkD8YEnnGh1zJ240uJsW7AzE+2qpbOUYjacomn3AvJ6J4JhKGSZ2nh4wUIXPZrEPppaCLx5jFe8T89Rk8tQ7w==}
|
||||
@@ -5447,7 +5408,6 @@ packages:
|
||||
dom-serializer: 2.0.0
|
||||
domelementtype: 2.3.0
|
||||
domhandler: 5.0.3
|
||||
dev: true
|
||||
|
||||
/dot-case@2.1.1:
|
||||
resolution: {integrity: sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug==}
|
||||
@@ -6615,7 +6575,6 @@ packages:
|
||||
domhandler: 5.0.3
|
||||
domutils: 3.1.0
|
||||
entities: 4.5.0
|
||||
dev: true
|
||||
|
||||
/http-proxy-agent@5.0.0:
|
||||
resolution: {integrity: sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==}
|
||||
@@ -6946,6 +6905,11 @@ packages:
|
||||
isobject: 3.0.1
|
||||
dev: false
|
||||
|
||||
/is-plain-object@5.0.0:
|
||||
resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: false
|
||||
|
||||
/is-potential-custom-element-name@1.0.1:
|
||||
resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==}
|
||||
dev: true
|
||||
@@ -7667,7 +7631,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==}
|
||||
@@ -7965,6 +7928,10 @@ packages:
|
||||
engines: {node: '>= 0.10'}
|
||||
dev: true
|
||||
|
||||
/parse-srcset@1.0.2:
|
||||
resolution: {integrity: sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q==}
|
||||
dev: false
|
||||
|
||||
/parse5@7.1.2:
|
||||
resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==}
|
||||
dependencies:
|
||||
@@ -8054,7 +8021,6 @@ packages:
|
||||
|
||||
/picocolors@1.1.1:
|
||||
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
|
||||
dev: false
|
||||
|
||||
/picomatch@2.3.1:
|
||||
resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
|
||||
@@ -8157,7 +8123,7 @@ packages:
|
||||
nanoid: 3.3.6
|
||||
picocolors: 1.0.0
|
||||
source-map-js: 1.0.2
|
||||
dev: true
|
||||
dev: false
|
||||
|
||||
/postcss@8.4.49:
|
||||
resolution: {integrity: sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==}
|
||||
@@ -8166,7 +8132,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==}
|
||||
@@ -8672,6 +8637,17 @@ packages:
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
|
||||
/sanitize-html@2.13.1:
|
||||
resolution: {integrity: sha512-ZXtKq89oue4RP7abL9wp/9URJcqQNABB5GGJ2acW1sdO8JTVl92f4ygD7Yc9Ze09VAZhnt2zegeU0tbNsdcLYg==}
|
||||
dependencies:
|
||||
deepmerge: 4.3.1
|
||||
escape-string-regexp: 4.0.0
|
||||
htmlparser2: 8.0.2
|
||||
is-plain-object: 5.0.0
|
||||
parse-srcset: 1.0.2
|
||||
postcss: 8.4.31
|
||||
dev: false
|
||||
|
||||
/sax@1.2.4:
|
||||
resolution: {integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==}
|
||||
requiresBuild: true
|
||||
@@ -8853,7 +8829,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==}
|
||||
@@ -9495,10 +9470,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 +9488,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
@@ -1,6 +1,7 @@
|
||||
import { tool as base64FileConverter } from './base64-file-converter';
|
||||
import { tool as base64StringConverter } from './base64-string-converter';
|
||||
import { tool as basicAuthGenerator } from './basic-auth-generator';
|
||||
import { tool as markdownTocGenerator } from './markdown-toc-generator';
|
||||
import { tool as emailNormalizer } from './email-normalizer';
|
||||
|
||||
import { tool as asciiTextDrawer } from './ascii-text-drawer';
|
||||
@@ -9,7 +10,6 @@ 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 regexTester } from './regex-tester';
|
||||
import { tool as regexMemo } from './regex-memo';
|
||||
import { tool as markdownToHtml } from './markdown-to-html';
|
||||
@@ -114,6 +114,7 @@ export const toolsByCategory: ToolCategory[] = [
|
||||
listConverter,
|
||||
tomlToJson,
|
||||
tomlToYaml,
|
||||
markdownTocGenerator,
|
||||
xmlToJson,
|
||||
jsonToXml,
|
||||
markdownToHtml,
|
||||
@@ -184,7 +185,6 @@ export const toolsByCategory: ToolCategory[] = [
|
||||
stringObfuscator,
|
||||
textDiff,
|
||||
numeronymGenerator,
|
||||
aiPromptSplitter,
|
||||
asciiTextDrawer,
|
||||
],
|
||||
},
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Table } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Markdown toc generator',
|
||||
path: '/markdown-toc-generator',
|
||||
description: 'Generate a TOC from a markdown file/content',
|
||||
keywords: ['markdown', 'md', 'toc', 'generator'],
|
||||
component: () => import('./markdown-toc-generator.vue'),
|
||||
icon: Table,
|
||||
createdAt: new Date('2024-05-11'),
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
declare module 'markdown-contents'{
|
||||
declare class MarkdownContents {
|
||||
markdown(): string;
|
||||
}
|
||||
export default function Create(markdown: string):MarkdownContents;
|
||||
}
|
||||
@@ -0,0 +1,380 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import {
|
||||
getTocMarkdown,
|
||||
} from './markdown-toc-generator.service';
|
||||
|
||||
describe('markdown-toc-generator', () => {
|
||||
it('Generate TOC correctly', async () => {
|
||||
expect(getTocMarkdown({
|
||||
markdown: '',
|
||||
})).to.equal('');
|
||||
|
||||
const sourceMarkdown = `# Some main title
|
||||
|
||||
[TOC]
|
||||
|
||||
## First Title
|
||||
|
||||
Some text
|
||||
|
||||
## Second Spaced Title
|
||||
|
||||
Some text
|
||||
|
||||
### Title with Link [TOC](http://it-tools.tech)
|
||||
|
||||
\`\`\`
|
||||
## some bash code
|
||||
echo 'test';
|
||||
\`\`\`
|
||||
|
||||
### Title with code \`var\`
|
||||
|
||||
Some text
|
||||
|
||||
## Last Title`;
|
||||
|
||||
expect(getTocMarkdown({
|
||||
markdown: sourceMarkdown,
|
||||
anchorPrefix: 'h-',
|
||||
})).to.equal(`# Some main title
|
||||
|
||||
<!-- TOC START -->
|
||||
- [First Title](#h-first-title)
|
||||
- [Second Spaced Title](#h-second-spaced-title)
|
||||
* [Title with Link TOC](#h-title-with-link-toc)
|
||||
* [Title with code \`var\`](#h-title-with-code-var)
|
||||
- [Last Title](#h-last-title)
|
||||
<!-- TOC END -->
|
||||
|
||||
<!-- TOC ANCHOR --><a name="first-title"></a>
|
||||
## First Title
|
||||
|
||||
Some text
|
||||
|
||||
<!-- TOC ANCHOR --><a name="second-spaced-title"></a>
|
||||
## Second Spaced Title
|
||||
|
||||
Some text
|
||||
|
||||
<!-- TOC ANCHOR --><a name="title-with-link-toc"></a>
|
||||
### Title with Link [TOC](http://it-tools.tech)
|
||||
|
||||
\`\`\`
|
||||
## some bash code
|
||||
echo 'test';
|
||||
\`\`\`
|
||||
|
||||
<!-- TOC ANCHOR --><a name="title-with-code-var"></a>
|
||||
### Title with code \`var\`
|
||||
|
||||
Some text
|
||||
|
||||
<!-- TOC ANCHOR --><a name="last-title"></a>
|
||||
## Last Title`);
|
||||
expect(getTocMarkdown({
|
||||
markdown: sourceMarkdown,
|
||||
maxLevel: 2,
|
||||
})).to.equal(`# Some main title
|
||||
|
||||
<!-- TOC START -->
|
||||
- [First Title](#first-title)
|
||||
- [Second Spaced Title](#second-spaced-title)
|
||||
- [Last Title](#last-title)
|
||||
<!-- TOC END -->
|
||||
|
||||
<!-- TOC ANCHOR --><a name="first-title"></a>
|
||||
## First Title
|
||||
|
||||
Some text
|
||||
|
||||
<!-- TOC ANCHOR --><a name="second-spaced-title"></a>
|
||||
## Second Spaced Title
|
||||
|
||||
Some text
|
||||
|
||||
### Title with Link [TOC](http://it-tools.tech)
|
||||
|
||||
\`\`\`
|
||||
## some bash code
|
||||
echo 'test';
|
||||
\`\`\`
|
||||
|
||||
### Title with code \`var\`
|
||||
|
||||
Some text
|
||||
|
||||
<!-- TOC ANCHOR --><a name="last-title"></a>
|
||||
## Last Title`);
|
||||
expect(getTocMarkdown({
|
||||
markdown: sourceMarkdown,
|
||||
commentStyle: 'liquid',
|
||||
})).to.equal(`# Some main title
|
||||
|
||||
{%- # TOC START -%}
|
||||
- [First Title](#first-title)
|
||||
- [Second Spaced Title](#second-spaced-title)
|
||||
* [Title with Link TOC](#title-with-link-toc)
|
||||
* [Title with code \`var\`](#title-with-code-var)
|
||||
- [Last Title](#last-title)
|
||||
{%- # TOC END -%}
|
||||
|
||||
{%- # TOC ANCHOR -%}<a name="first-title"></a>
|
||||
## First Title
|
||||
|
||||
Some text
|
||||
|
||||
{%- # TOC ANCHOR -%}<a name="second-spaced-title"></a>
|
||||
## Second Spaced Title
|
||||
|
||||
Some text
|
||||
|
||||
{%- # TOC ANCHOR -%}<a name="title-with-link-toc"></a>
|
||||
### Title with Link [TOC](http://it-tools.tech)
|
||||
|
||||
\`\`\`
|
||||
## some bash code
|
||||
echo 'test';
|
||||
\`\`\`
|
||||
|
||||
{%- # TOC ANCHOR -%}<a name="title-with-code-var"></a>
|
||||
### Title with code \`var\`
|
||||
|
||||
Some text
|
||||
|
||||
{%- # TOC ANCHOR -%}<a name="last-title"></a>
|
||||
## Last Title`);
|
||||
expect(getTocMarkdown({
|
||||
markdown: sourceMarkdown,
|
||||
generateAnchors: false,
|
||||
})).to.equal(`# Some main title
|
||||
|
||||
<!-- TOC START -->
|
||||
- [First Title](#first-title)
|
||||
- [Second Spaced Title](#second-spaced-title)
|
||||
* [Title with Link TOC](#title-with-link-toc)
|
||||
* [Title with code \`var\`](#title-with-code-var)
|
||||
- [Last Title](#last-title)
|
||||
<!-- TOC END -->
|
||||
|
||||
## First Title
|
||||
|
||||
Some text
|
||||
|
||||
## Second Spaced Title
|
||||
|
||||
Some text
|
||||
|
||||
### Title with Link [TOC](http://it-tools.tech)
|
||||
|
||||
\`\`\`
|
||||
## some bash code
|
||||
echo 'test';
|
||||
\`\`\`
|
||||
|
||||
### Title with code \`var\`
|
||||
|
||||
Some text
|
||||
|
||||
## Last Title`);
|
||||
expect(getTocMarkdown({
|
||||
markdown: sourceMarkdown,
|
||||
indentSpaces: 4,
|
||||
indentChars: '-',
|
||||
concatSpaces: false,
|
||||
})).to.equal(`# Some main title
|
||||
|
||||
<!-- TOC START -->
|
||||
- [First Title](#first-title)
|
||||
- [Second Spaced Title](#second--spaced--title)
|
||||
- [Title with Link TOC](#title-with-link-toc)
|
||||
- [Title with code \`var\`](#title-with-code-var)
|
||||
- [Last Title](#last-title)
|
||||
<!-- TOC END -->
|
||||
|
||||
<!-- TOC ANCHOR --><a name="first-title"></a>
|
||||
## First Title
|
||||
|
||||
Some text
|
||||
|
||||
<!-- TOC ANCHOR --><a name="second--spaced--title"></a>
|
||||
## Second Spaced Title
|
||||
|
||||
Some text
|
||||
|
||||
<!-- TOC ANCHOR --><a name="title-with-link-toc"></a>
|
||||
### Title with Link [TOC](http://it-tools.tech)
|
||||
|
||||
\`\`\`
|
||||
## some bash code
|
||||
echo 'test';
|
||||
\`\`\`
|
||||
|
||||
<!-- TOC ANCHOR --><a name="title-with-code-var"></a>
|
||||
### Title with code \`var\`
|
||||
|
||||
Some text
|
||||
|
||||
<!-- TOC ANCHOR --><a name="last-title"></a>
|
||||
## Last Title`);
|
||||
});
|
||||
|
||||
it('Regenerate TOC correctly', async () => {
|
||||
expect(getTocMarkdown({
|
||||
markdown: `# Some main title
|
||||
|
||||
<!-- TOC START -->
|
||||
- [First Title](#first-title)
|
||||
- [Second Spaced Title](#second--spaced--title)
|
||||
- [Title with Link TOC](#title-with-link-toc)
|
||||
- [Title with code \`var\`](#title-with-code-var)
|
||||
- [Last Title](#last-title)
|
||||
<!-- TOC END -->
|
||||
|
||||
<!-- TOC ANCHOR --><a name="first-title"></a>
|
||||
## First Title
|
||||
|
||||
Some text
|
||||
|
||||
<!-- TOC ANCHOR --><a name="second--spaced--title"></a>
|
||||
## Second Spaced Title
|
||||
|
||||
Some text
|
||||
|
||||
<!-- TOC ANCHOR --><a name="title-with-link-toc"></a>
|
||||
### Title with Link [TOC](http://it-tools.tech)
|
||||
|
||||
\`\`\`
|
||||
## some bash code
|
||||
echo 'test';
|
||||
\`\`\`
|
||||
|
||||
<!-- TOC ANCHOR --><a name="title-with-code-var"></a>
|
||||
### Title with code \`var\`
|
||||
|
||||
Some text
|
||||
|
||||
<!-- TOC ANCHOR --><a name="last-title"></a>
|
||||
## Last Title`,
|
||||
anchorPrefix: 'h-',
|
||||
})).to.equal(`# Some main title
|
||||
|
||||
<!-- TOC START -->
|
||||
- [First Title](#h-first-title)
|
||||
- [Second Spaced Title](#h-second-spaced-title)
|
||||
* [Title with Link TOC](#h-title-with-link-toc)
|
||||
* [Title with code \`var\`](#h-title-with-code-var)
|
||||
- [Last Title](#h-last-title)
|
||||
<!-- TOC END -->
|
||||
|
||||
<!-- TOC ANCHOR --><a name="first-title"></a>
|
||||
## First Title
|
||||
|
||||
Some text
|
||||
|
||||
<!-- TOC ANCHOR --><a name="second-spaced-title"></a>
|
||||
## Second Spaced Title
|
||||
|
||||
Some text
|
||||
|
||||
<!-- TOC ANCHOR --><a name="title-with-link-toc"></a>
|
||||
### Title with Link [TOC](http://it-tools.tech)
|
||||
|
||||
\`\`\`
|
||||
## some bash code
|
||||
echo 'test';
|
||||
\`\`\`
|
||||
|
||||
<!-- TOC ANCHOR --><a name="title-with-code-var"></a>
|
||||
### Title with code \`var\`
|
||||
|
||||
Some text
|
||||
|
||||
<!-- TOC ANCHOR --><a name="last-title"></a>
|
||||
## Last Title`);
|
||||
});
|
||||
|
||||
it('Generate distinct TOC ids', async () => {
|
||||
expect(getTocMarkdown({
|
||||
markdown: `# Some main title
|
||||
|
||||
[TOC]
|
||||
|
||||
## Same Title 1
|
||||
|
||||
Some text
|
||||
|
||||
## Same Title 1
|
||||
|
||||
Some text
|
||||
|
||||
### Same title 1
|
||||
|
||||
Some text`,
|
||||
anchorPrefix: 'h-',
|
||||
})).to.equal(`# Some main title
|
||||
|
||||
<!-- TOC START -->
|
||||
- [Same Title 1](#h-same-title-1)
|
||||
- [Same Title 1](#h-same-title-1-1)
|
||||
* [Same title 1](#h-same-title-1-2)
|
||||
<!-- TOC END -->
|
||||
|
||||
<!-- TOC ANCHOR --><a name="same-title-1"></a>
|
||||
## Same Title 1
|
||||
|
||||
Some text
|
||||
|
||||
<!-- TOC ANCHOR --><a name="same-title-1-1"></a>
|
||||
## Same Title 1
|
||||
|
||||
Some text
|
||||
|
||||
<!-- TOC ANCHOR --><a name="same-title-1-2"></a>
|
||||
### Same title 1
|
||||
|
||||
Some text`);
|
||||
});
|
||||
|
||||
it('Generate ids for non latin', async () => {
|
||||
expect(getTocMarkdown({
|
||||
markdown: `# Some main title
|
||||
|
||||
[TOC]
|
||||
|
||||
## Привет non-latin 你好
|
||||
|
||||
Some text
|
||||
|
||||
## 😄 emoji
|
||||
|
||||
Some text
|
||||
|
||||
### Other title 1
|
||||
|
||||
Some text`,
|
||||
anchorPrefix: 'h-',
|
||||
})).to.equal(`# Some main title
|
||||
|
||||
<!-- TOC START -->
|
||||
- [Привет non-latin 你好](#h--non-latin-)
|
||||
- [😄 emoji](#h--emoji)
|
||||
* [Other title 1](#h-other-title-1)
|
||||
<!-- TOC END -->
|
||||
|
||||
<!-- TOC ANCHOR --><a name="-non-latin-"></a>
|
||||
## Привет non-latin 你好
|
||||
|
||||
Some text
|
||||
|
||||
<!-- TOC ANCHOR --><a name="-emoji"></a>
|
||||
## 😄 emoji
|
||||
|
||||
Some text
|
||||
|
||||
<!-- TOC ANCHOR --><a name="other-title-1"></a>
|
||||
### Other title 1
|
||||
|
||||
Some text`);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,183 @@
|
||||
import sanitizeHtml from 'sanitize-html';
|
||||
|
||||
function stripNonLatinCharacters(text: string) {
|
||||
return text.replace(/[^A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u02BB\u02EE\uA78C\d\s_-]/g, '');
|
||||
};
|
||||
|
||||
function transformInlineCode(text: string, transform: (s: string) => string) {
|
||||
return text.replace(/`(.*?)`/g, (_, p) => {
|
||||
return `\`${transform(p)}\``;
|
||||
});
|
||||
};
|
||||
|
||||
function spacesToDash(text: string) {
|
||||
return text.replace(/\s/g, '-');
|
||||
};
|
||||
|
||||
function stripHtmlTags(text: string) {
|
||||
return sanitizeHtml(text, {
|
||||
allowedTags: [],
|
||||
allowedAttributes: {},
|
||||
});
|
||||
}
|
||||
|
||||
function stripMarkdownLinks(text: string, replacement: string = '$1') {
|
||||
return text.replace(/\[([^\]]*)\]\([^\)]*\)/g, replacement); // NOSONAR
|
||||
};
|
||||
|
||||
function concatDashes(text: string) {
|
||||
return text.replace(/--+/g, '-');
|
||||
};
|
||||
|
||||
function removeUnderscoreBoldAndItalics(text: string) {
|
||||
const underscoreBoldAndItalicsRegexes = ['__', '_'].map((it) => {
|
||||
return new RegExp(`\\b${it}([^_\\s]|[^_\\s].*?[^_\\s])${it}\\b`, 'g');
|
||||
});
|
||||
|
||||
let result = text;
|
||||
|
||||
underscoreBoldAndItalicsRegexes.forEach((regex) => {
|
||||
result = result.replace(regex, '$1');
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
||||
function genericAnchorGenerator(text: string, concatSpaces: boolean) {
|
||||
let result = text;
|
||||
result = result.toLowerCase();
|
||||
result = transformInlineCode(result, (s: string) => {
|
||||
return stripNonLatinCharacters(s);
|
||||
});
|
||||
result = removeUnderscoreBoldAndItalics(result);
|
||||
result = stripHtmlTags(result);
|
||||
result = stripMarkdownLinks(result);
|
||||
result = result.trim();
|
||||
result = stripNonLatinCharacters(result);
|
||||
result = spacesToDash(result);
|
||||
if (concatSpaces) {
|
||||
result = concatDashes(result);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
function escapeRegExp(string: string) {
|
||||
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
||||
}
|
||||
|
||||
interface Title {
|
||||
level: number
|
||||
id: string
|
||||
name: string
|
||||
md: string
|
||||
}
|
||||
|
||||
function getTitles(markdown: string, idGenerator: (titleMarkdownContent: string) => string) {
|
||||
const titles: Title[] = [];
|
||||
|
||||
markdown = markdown.replace(/^```[\s\S]*?\n```/mg, () => {
|
||||
return '';
|
||||
});
|
||||
markdown = markdown.replace(/^~~~[\s\S]*?\n~~~/mg, () => {
|
||||
return '';
|
||||
});
|
||||
|
||||
[...markdown.matchAll(/^(#+)(.*$)/mg)].forEach( // NOSONAR
|
||||
([match, levelString, titleContent]) => {
|
||||
const level = levelString.length;
|
||||
|
||||
titles.push({
|
||||
md: match,
|
||||
level,
|
||||
id: idGenerator(titleContent),
|
||||
name: titleContent.trim(),
|
||||
});
|
||||
});
|
||||
|
||||
return titles;
|
||||
};
|
||||
|
||||
export function getTocMarkdown({
|
||||
markdown,
|
||||
generateAnchors = true,
|
||||
indentChars = '-*+',
|
||||
indentSpaces = 2,
|
||||
maxLevel = -1,
|
||||
anchorPrefix = '',
|
||||
concatSpaces = true,
|
||||
commentStyle = 'html',
|
||||
}: {
|
||||
markdown: string
|
||||
generateAnchors?: boolean
|
||||
indentChars?: string
|
||||
indentSpaces?: number
|
||||
maxLevel?: number
|
||||
anchorPrefix?: string
|
||||
concatSpaces?: boolean
|
||||
commentStyle?: 'html' | 'liquid'
|
||||
}) {
|
||||
const allIds: { [id: string]: number } = {};
|
||||
const getFinalId = (id: string) => {
|
||||
if (typeof allIds[id] === 'undefined') {
|
||||
allIds[id] = 0;
|
||||
return id;
|
||||
}
|
||||
else {
|
||||
allIds[id] += 1;
|
||||
return `${id}-${allIds[id]}`;
|
||||
}
|
||||
};
|
||||
const titles = getTitles(markdown, titleContent => getFinalId(genericAnchorGenerator(titleContent, concatSpaces)));
|
||||
|
||||
const createLink = (linkText: string, url: string) => {
|
||||
return `[${linkText.replace(/\[/g, '\\[').replace(/\]/g, '\\]')}](${url.replace(/\(/g, '%28').replace(/\(/g, '%29')})`;
|
||||
};
|
||||
|
||||
let markdownTOC = '';
|
||||
let resultMarkdown = markdown;
|
||||
const commentOpen = commentStyle === 'html' ? '<!--' : '{%- #';
|
||||
const commentClose = commentStyle === 'html' ? '-->' : '-%}';
|
||||
|
||||
resultMarkdown = resultMarkdown.replace(
|
||||
new RegExp(`\n${escapeRegExp(commentOpen)} TOC START.*?TOC END ${escapeRegExp(commentClose)}\n`, 'smg'),
|
||||
'\n[TOC]\n',
|
||||
);
|
||||
resultMarkdown = resultMarkdown.replace(
|
||||
new RegExp(`^${escapeRegExp(commentOpen)} TOC ANCHOR.*?\n`, 'mg'),
|
||||
'',
|
||||
);
|
||||
|
||||
titles.forEach((title) => {
|
||||
if (title.level === 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (maxLevel > 0 && title.level > maxLevel) {
|
||||
return;
|
||||
}
|
||||
|
||||
const level = title.level - 2;
|
||||
let offset = '';
|
||||
if (level) {
|
||||
offset = `${Array.from({ length: level * indentSpaces }).join(' ')} `;
|
||||
}
|
||||
const bulletChar = indentChars[level] ?? indentChars.slice(-1)[0];
|
||||
|
||||
const anchorName = `${anchorPrefix}${title.id}`;
|
||||
|
||||
markdownTOC += `${offset}${bulletChar} ${createLink(stripMarkdownLinks(title.name), `#${anchorName}`)}\n`;
|
||||
|
||||
if (generateAnchors) {
|
||||
resultMarkdown = resultMarkdown.replace(
|
||||
new RegExp(`(?<!^${commentOpen} TOC ANCHOR.*\n)^${escapeRegExp(title.md)}`, 'm'),
|
||||
`${commentOpen} TOC ANCHOR ${commentClose}<a name="${title.id}"></a>\n${title.md}`,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
resultMarkdown = resultMarkdown.replace(
|
||||
/^\[TOC\]\n/mg,
|
||||
`${commentOpen} TOC START ${commentClose}\n${markdownTOC}${commentOpen} TOC END ${commentClose}\n`,
|
||||
);
|
||||
|
||||
return resultMarkdown;
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
<script setup lang="ts">
|
||||
import { withDefaultOnError } from '../../utils/defaults';
|
||||
import {
|
||||
getTocMarkdown,
|
||||
} from './markdown-toc-generator.service';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
|
||||
const markdown = ref(`# Some main title
|
||||
|
||||
[TOC]
|
||||
|
||||
## First Title
|
||||
|
||||
Some text
|
||||
|
||||
## Second Spaced Title
|
||||
|
||||
Some text
|
||||
|
||||
### Title with Link [TOC](http://it-tools.tech)
|
||||
|
||||
\`\`\`
|
||||
## some bash code
|
||||
echo 'test';
|
||||
\`\`\`
|
||||
|
||||
### Title with code \`var\`
|
||||
|
||||
Some text
|
||||
|
||||
## Last Title`);
|
||||
const generateAnchors = useQueryParamOrStorage({ name: 'anchors', storageName: 'md-toc-gen:anchors', defaultValue: true });
|
||||
const indentChars = useQueryParamOrStorage({ name: 'bullets', storageName: 'md-toc-gen:bullets', defaultValue: '-*+' });
|
||||
const indentSpaces = ref(3);
|
||||
const maxLevel = useQueryParamOrStorage({ name: 'max', storageName: 'md-toc-gen:max', defaultValue: -1 });
|
||||
const anchorPrefix = useQueryParamOrStorage({ name: 'prefix', storageName: 'md-toc-gen:prefix', defaultValue: '' });
|
||||
const concatSpaces = useQueryParamOrStorage({ name: 'concat', storageName: 'md-toc-gen:concat', defaultValue: false });
|
||||
const commentStyle = useQueryParamOrStorage({ name: 'comment', storageName: 'md-toc-gen:comment', defaultValue: 'html' });
|
||||
|
||||
const markdownWithTOC = computed(() => withDefaultOnError(() => {
|
||||
return getTocMarkdown({
|
||||
markdown: markdown.value,
|
||||
anchorPrefix: anchorPrefix.value,
|
||||
commentStyle: commentStyle.value as ('html' | 'liquid'),
|
||||
concatSpaces: concatSpaces.value,
|
||||
generateAnchors: generateAnchors.value,
|
||||
indentChars: indentChars.value,
|
||||
indentSpaces: indentSpaces.value,
|
||||
maxLevel: maxLevel.value,
|
||||
});
|
||||
}, ''));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<c-card title="Options" mb-2>
|
||||
<n-space>
|
||||
<n-form-item label-placement="left">
|
||||
<n-checkbox v-model:checked="generateAnchors">
|
||||
Generate Anchors
|
||||
</n-checkbox>
|
||||
</n-form-item>
|
||||
<n-form-item label="Max Heading Level:" label-placement="left">
|
||||
<n-input-number
|
||||
v-model:value="maxLevel"
|
||||
placeholder="Max Heading Level..."
|
||||
:max="6" :min="-1"
|
||||
/>
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
|
||||
<details>
|
||||
<summary>Advanced</summary>
|
||||
<n-space>
|
||||
<n-form-item label-placement="left">
|
||||
<n-checkbox v-model:checked="concatSpaces">
|
||||
Concat Spaces
|
||||
</n-checkbox>
|
||||
</n-form-item>
|
||||
<c-input-text
|
||||
v-model:value="indentChars"
|
||||
label="Bullet Chars"
|
||||
label-position="left"
|
||||
placeholder="Bullet Chars"
|
||||
/>
|
||||
<c-input-text
|
||||
v-model:value="anchorPrefix"
|
||||
label="Anchors Prefix"
|
||||
label-position="left"
|
||||
placeholder="Anchors Prefix"
|
||||
/>
|
||||
<n-form-item label="Indents: " label-placement="left">
|
||||
<n-input-number
|
||||
v-model:value="indentSpaces"
|
||||
placeholder="Indents..."
|
||||
:max="10" :min="1"
|
||||
/>
|
||||
</n-form-item>
|
||||
<c-select
|
||||
v-model:value="commentStyle"
|
||||
label="Comment Styles"
|
||||
label-position="left"
|
||||
:options="['html', 'liquid']"
|
||||
placeholder="Comment Styles"
|
||||
/>
|
||||
</n-space>
|
||||
</details>
|
||||
</c-card>
|
||||
|
||||
<c-card title="Input markdown" mb-2>
|
||||
<n-p>You can paste a document with existing TOC (generated by this tool) or add a <code>[TOC]</code> marker in your document (on a single line)</n-p>
|
||||
<c-input-text
|
||||
v-model:value="markdown"
|
||||
placeholder="Put your markdown here..."
|
||||
multiline
|
||||
rows="8"
|
||||
/>
|
||||
</c-card>
|
||||
|
||||
<c-card title="Output markdown with TOC" mb-2>
|
||||
<textarea-copyable
|
||||
language="markdown"
|
||||
:value="markdownWithTOC"
|
||||
/>
|
||||
</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