Merge 19165862dd into 87984e2081
				
					
				
			This commit is contained in:
		
						commit
						4bc900ee9a
					
				
							
								
								
									
										4
									
								
								components.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								components.d.ts
									
									
									
									
										vendored
									
									
								
							| @ -140,16 +140,20 @@ declare module '@vue/runtime-core' { | |||||||
|     NH1: typeof import('naive-ui')['NH1'] |     NH1: typeof import('naive-ui')['NH1'] | ||||||
|     NH3: typeof import('naive-ui')['NH3'] |     NH3: typeof import('naive-ui')['NH3'] | ||||||
|     NIcon: typeof import('naive-ui')['NIcon'] |     NIcon: typeof import('naive-ui')['NIcon'] | ||||||
|  |     NInput: typeof import('naive-ui')['NInput'] | ||||||
|     NInputNumber: typeof import('naive-ui')['NInputNumber'] |     NInputNumber: typeof import('naive-ui')['NInputNumber'] | ||||||
|     NLayout: typeof import('naive-ui')['NLayout'] |     NLayout: typeof import('naive-ui')['NLayout'] | ||||||
|     NLayoutSider: typeof import('naive-ui')['NLayoutSider'] |     NLayoutSider: typeof import('naive-ui')['NLayoutSider'] | ||||||
|  |     NLi: typeof import('naive-ui')['NLi'] | ||||||
|     NMenu: typeof import('naive-ui')['NMenu'] |     NMenu: typeof import('naive-ui')['NMenu'] | ||||||
|  |     NP: typeof import('naive-ui')['NP'] | ||||||
|     NScrollbar: typeof import('naive-ui')['NScrollbar'] |     NScrollbar: typeof import('naive-ui')['NScrollbar'] | ||||||
|     NSlider: typeof import('naive-ui')['NSlider'] |     NSlider: typeof import('naive-ui')['NSlider'] | ||||||
|     NSwitch: typeof import('naive-ui')['NSwitch'] |     NSwitch: typeof import('naive-ui')['NSwitch'] | ||||||
|     NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default'] |     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'] |     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'] |     PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default'] | ||||||
|  |     PasteAsMarkdown: typeof import('./src/tools/paste-as-markdown/paste-as-markdown.vue')['default'] | ||||||
|     PdfSignatureChecker: typeof import('./src/tools/pdf-signature-checker/pdf-signature-checker.vue')['default'] |     PdfSignatureChecker: typeof import('./src/tools/pdf-signature-checker/pdf-signature-checker.vue')['default'] | ||||||
|     PdfSignatureDetails: typeof import('./src/tools/pdf-signature-checker/components/pdf-signature-details.vue')['default'] |     PdfSignatureDetails: typeof import('./src/tools/pdf-signature-checker/components/pdf-signature-details.vue')['default'] | ||||||
|     PercentageCalculator: typeof import('./src/tools/percentage-calculator/percentage-calculator.vue')['default'] |     PercentageCalculator: typeof import('./src/tools/percentage-calculator/percentage-calculator.vue')['default'] | ||||||
|  | |||||||
| @ -35,6 +35,7 @@ | |||||||
|     "release": "node ./scripts/release.mjs" |     "release": "node ./scripts/release.mjs" | ||||||
|   }, |   }, | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|  |     "@github/paste-markdown": "^1.5.3", | ||||||
|     "@it-tools/bip39": "^0.0.4", |     "@it-tools/bip39": "^0.0.4", | ||||||
|     "@it-tools/oggen": "^1.3.0", |     "@it-tools/oggen": "^1.3.0", | ||||||
|     "@sindresorhus/slugify": "^2.2.1", |     "@sindresorhus/slugify": "^2.2.1", | ||||||
|  | |||||||
							
								
								
									
										7
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										7
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							| @ -5,6 +5,9 @@ settings: | |||||||
|   excludeLinksFromLockfile: false |   excludeLinksFromLockfile: false | ||||||
| 
 | 
 | ||||||
| dependencies: | dependencies: | ||||||
|  |   '@github/paste-markdown': | ||||||
|  |     specifier: ^1.5.3 | ||||||
|  |     version: 1.5.3 | ||||||
|   '@it-tools/bip39': |   '@it-tools/bip39': | ||||||
|     specifier: ^0.0.4 |     specifier: ^0.0.4 | ||||||
|     version: 0.0.4 |     version: 0.0.4 | ||||||
| @ -2165,6 +2168,10 @@ packages: | |||||||
|     engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} |     engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} | ||||||
|     dev: true |     dev: true | ||||||
| 
 | 
 | ||||||
|  |   /@github/paste-markdown@1.5.3: | ||||||
|  |     resolution: {integrity: sha512-PzZ1b3PaqBzYqbT4fwKEhiORf38h2OcGp2+JdXNNM7inZ7egaSmfmhyNkQILpqWfS0AYtRS3CDq6z03eZ8yOMQ==} | ||||||
|  |     dev: false | ||||||
|  | 
 | ||||||
|   /@humanwhocodes/config-array@0.11.10: |   /@humanwhocodes/config-array@0.11.10: | ||||||
|     resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==} |     resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==} | ||||||
|     engines: {node: '>=10.10.0'} |     engines: {node: '>=10.10.0'} | ||||||
|  | |||||||
| @ -9,6 +9,7 @@ import { tool as textToUnicode } from './text-to-unicode'; | |||||||
| import { tool as safelinkDecoder } from './safelink-decoder'; | import { tool as safelinkDecoder } from './safelink-decoder'; | ||||||
| import { tool as xmlToJson } from './xml-to-json'; | import { tool as xmlToJson } from './xml-to-json'; | ||||||
| import { tool as jsonToXml } from './json-to-xml'; | import { tool as jsonToXml } from './json-to-xml'; | ||||||
|  | import { tool as pasteAsMarkdown } from './paste-as-markdown'; | ||||||
| import { tool as markdownToHtml } from './markdown-to-html'; | import { tool as markdownToHtml } from './markdown-to-html'; | ||||||
| import { tool as pdfSignatureChecker } from './pdf-signature-checker'; | import { tool as pdfSignatureChecker } from './pdf-signature-checker'; | ||||||
| import { tool as numeronymGenerator } from './numeronym-generator'; | import { tool as numeronymGenerator } from './numeronym-generator'; | ||||||
| @ -180,6 +181,7 @@ export const toolsByCategory: ToolCategory[] = [ | |||||||
|       textDiff, |       textDiff, | ||||||
|       numeronymGenerator, |       numeronymGenerator, | ||||||
|       asciiTextDrawer, |       asciiTextDrawer, | ||||||
|  |       pasteAsMarkdown, | ||||||
|     ], |     ], | ||||||
|   }, |   }, | ||||||
|   { |   { | ||||||
|  | |||||||
							
								
								
									
										12
									
								
								src/tools/paste-as-markdown/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								src/tools/paste-as-markdown/index.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,12 @@ | |||||||
|  | import { Markdown } from '@vicons/tabler'; | ||||||
|  | import { defineTool } from '../tool'; | ||||||
|  | 
 | ||||||
|  | export const tool = defineTool({ | ||||||
|  |   name: 'Paste as Markdown', | ||||||
|  |   path: '/paste-as-markdown', | ||||||
|  |   description: 'Paste cells/tables and links from clipboard content as Markdown', | ||||||
|  |   keywords: ['paste', 'cell', 'table', 'links', 'md', 'markdown'], | ||||||
|  |   component: () => import('./paste-as-markdown.vue'), | ||||||
|  |   icon: Markdown, | ||||||
|  |   createdAt: new Date('2024-07-14'), | ||||||
|  | }); | ||||||
							
								
								
									
										31
									
								
								src/tools/paste-as-markdown/paste-as-markdown.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								src/tools/paste-as-markdown/paste-as-markdown.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,31 @@ | |||||||
|  | <script setup lang="ts"> | ||||||
|  | import { subscribe } from '@github/paste-markdown'; | ||||||
|  | import CInputText from '@/ui/c-input-text/c-input-text.vue'; | ||||||
|  | 
 | ||||||
|  | const inputElement = ref<typeof CInputText>(); | ||||||
|  | const markdown = ref(''); | ||||||
|  | 
 | ||||||
|  | // Subscribe the behavior to the textarea. | ||||||
|  | onMounted(() => { | ||||||
|  |   subscribe(inputElement.value?.textareaRef as never); | ||||||
|  | }); | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <template> | ||||||
|  |   <c-card title="Paste in Markdown" class="paste-zone"> | ||||||
|  |     <n-ul> | ||||||
|  |       <n-li>Paste spreadsheet cells and HTML tables as a Markdown tables.</n-li> | ||||||
|  |       <n-li>Paste URLs on selected text as Markdown links.</n-li> | ||||||
|  |       <n-li>Paste text containing links as text containing Markdown links.</n-li> | ||||||
|  |       <n-li>Paste image URLs as Markdown image links.</n-li> | ||||||
|  |     </n-ul> | ||||||
|  |     <CInputText | ||||||
|  |       ref="inputElement" | ||||||
|  |       v-model:value="markdown" | ||||||
|  |       multiline | ||||||
|  |       placeholder="Paste your content here..." | ||||||
|  |       rows="10" | ||||||
|  |       w-full | ||||||
|  |     /> | ||||||
|  |   </c-card> | ||||||
|  | </template> | ||||||
| @ -137,6 +137,8 @@ onMounted(() => { | |||||||
| 
 | 
 | ||||||
| defineExpose({ | defineExpose({ | ||||||
|   inputWrapperRef, |   inputWrapperRef, | ||||||
|  |   textareaRef, | ||||||
|  |   inputRef, | ||||||
|   focus, |   focus, | ||||||
|   blur, |   blur, | ||||||
| }); | }); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user