Merge branch 'ci/pr-conflicts-tagger' into chore/all-my-stuffs

# Conflicts:
#	components.d.ts
#	src/tools/index.ts
This commit is contained in:
ShareVB committed 2024-11-02 10:27:58 +01:00
commit d76ed491be
6 files changed
+69

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
name: "Pull Requests Merge Conflicts Tagger"
on:
# So that PRs touching the same files as the push are updated
push:
# So that the `dirtyLabel` is removed if conflicts are resolve
# We recommend `pull_request_target` so that github secrets are available.
# In `pull_request` we wouldn't be able to change labels of fork PRs
pull_request_target:
types: [synchronize]
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: check if prs are dirty
uses: eps1lon/actions-label-merge-conflict@v3
with:
dirtyLabel: "PR: needs rebase"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request."
# commentOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly."
+1
View File
@@ -36,6 +36,7 @@
"release": "node ./scripts/release.mjs"
},
"dependencies": {
"@github/paste-markdown": "^1.5.3",
"@it-tools/bip39": "^0.0.4",
"@it-tools/oggen": "^1.3.0",
"@regexper/render": "^1.0.0",
+2
View File
@@ -12,6 +12,7 @@ import { tool as jsonToXml } from './json-to-xml';
import { tool as regexTester } from './regex-tester';
import { tool as regexMemo } from './regex-memo';
import { tool as markdownToHtml } from './markdown-to-html';
import { tool as pasteAsMarkdown } from './paste-as-markdown';
import { tool as pdfSignatureChecker } from './pdf-signature-checker';
import { tool as numeronymGenerator } from './numeronym-generator';
import { tool as macAddressGenerator } from './mac-address-generator';
@@ -184,6 +185,7 @@ export const toolsByCategory: ToolCategory[] = [
textDiff,
numeronymGenerator,
asciiTextDrawer,
pasteAsMarkdown,
],
},
{
+12
View 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'),
});
@@ -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>
+2
View File
@@ -137,6 +137,8 @@ onMounted(() => {
defineExpose({
inputWrapperRef,
textareaRef,
inputRef,
focus,
blur,
});