diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..58439813 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1 @@ +name: CI diff --git a/apps/web/messages/af.json b/apps/web/messages/af.json index 28db2096..4b40d785 100644 --- a/apps/web/messages/af.json +++ b/apps/web/messages/af.json @@ -292,6 +292,10 @@ "title": "GraphQL-formateerder", "description": "Formateer GraphQL met sintaksuitligting en ’n eenvoudige navrae-bouer." }, + "yamlFormatter": { + "title": "YAML Formatteerder", + "description": "Formateer, valideer en omskep YAML na JSON in die blaaier." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "Kon nie hierdie SQL formateer nie." } }, + "YamlFormatter": { + "title": "YAML Formatteerder", + "subtitle": "Formateer, valideer en omskep YAML in jou blaaier. Niks word opgelaai nie.", + "outputLabel": "Uitvoer", + "outputModes": { + "yaml": "YAML (geformateer)", + "json": "JSON" + }, + "indentLabel": "Inkeping", + "spaces": "{n} spasies", + "format": "Formateer", + "clear": "Vee uit", + "copy": "Kopieer", + "counter": "{current} / {max} karakters", + "inputPanel": "Invoer", + "outputPanel": "Uitvoer", + "errors": { + "tooLong": "Invoer is beperk tot {max} karakters.", + "couldNotFormat": "Kon hierdie YAML nie ontleed nie." + } + }, "GraphqlFormatter": { "title": "GraphQL-formateerder", "subtitle": "Formateer GraphQL-navrae, mutasies en intekeninge in jou blaaier. Niks word opgelaai nie.", diff --git a/apps/web/messages/ar.json b/apps/web/messages/ar.json index 0e528378..4307e4f3 100644 --- a/apps/web/messages/ar.json +++ b/apps/web/messages/ar.json @@ -292,6 +292,10 @@ "title": "منسّق GraphQL", "description": "نسّق GraphQL مع تمييز الصيغة ومُنشئ استعلامات بسيط." }, + "yamlFormatter": { + "title": "منسّق YAML", + "description": "نسّق YAML وتحقق منه وحوّله إلى JSON في المتصفح." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "تعذر تنسيق SQL." } }, + "YamlFormatter": { + "title": "منسّق YAML", + "subtitle": "نسّق YAML وتحقق منه وحوّله في متصفحك. لا يتم رفع أي شيء.", + "outputLabel": "الإخراج", + "outputModes": { + "yaml": "YAML (منسّق)", + "json": "JSON" + }, + "indentLabel": "الإزاحة", + "spaces": "{n} مسافات", + "format": "تنسيق", + "clear": "مسح", + "copy": "نسخ", + "counter": "{current} / {max} حرف", + "inputPanel": "الإدخال", + "outputPanel": "الإخراج", + "errors": { + "tooLong": "الإدخال محدود بـ {max} حرف.", + "couldNotFormat": "تعذّر تحليل هذا YAML." + } + }, "GraphqlFormatter": { "title": "منسّق GraphQL", "subtitle": "نسّق استعلامات GraphQL والطفرات والاشتراكات داخل المتصفح. لا يتم رفع أي شيء.", diff --git a/apps/web/messages/ca.json b/apps/web/messages/ca.json index cf517c3a..03fc1618 100644 --- a/apps/web/messages/ca.json +++ b/apps/web/messages/ca.json @@ -292,6 +292,10 @@ "title": "Formatador GraphQL", "description": "Formata GraphQL amb ressaltat de sintaxi i un editor de consultes senzill." }, + "yamlFormatter": { + "title": "Formatador YAML", + "description": "Formata, valida i converteix YAML a JSON al navegador." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "No s’ha pogut formatar aquest SQL." } }, + "YamlFormatter": { + "title": "Formatador YAML", + "subtitle": "Formata, valida i converteix YAML al teu navegador. Res no es puja.", + "outputLabel": "Sortida", + "outputModes": { + "yaml": "YAML (formatat)", + "json": "JSON" + }, + "indentLabel": "Sagnat", + "spaces": "{n} espais", + "format": "Formata", + "clear": "Esborra", + "copy": "Copia", + "counter": "{current} / {max} caràcters", + "inputPanel": "Entrada", + "outputPanel": "Sortida", + "errors": { + "tooLong": "L'entrada està limitada a {max} caràcters.", + "couldNotFormat": "No s'ha pogut analitzar aquest YAML." + } + }, "GraphqlFormatter": { "title": "Formatador GraphQL", "subtitle": "Formata consultes, mutacions i subscripcions GraphQL al navegador. No es puja res.", diff --git a/apps/web/messages/cs.json b/apps/web/messages/cs.json index 45b985cc..69f734e2 100644 --- a/apps/web/messages/cs.json +++ b/apps/web/messages/cs.json @@ -292,6 +292,10 @@ "title": "Formátovač GraphQL", "description": "Formátujte GraphQL se zvýrazněním syntaxe a jednoduchým editorem dotazů." }, + "yamlFormatter": { + "title": "Formátovač YAML", + "description": "Formátujte, ověřujte a převádějte YAML do JSON v prohlížeči." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "Tento SQL se nepodařilo naformátovat." } }, + "YamlFormatter": { + "title": "Formátovač YAML", + "subtitle": "Formátujte, ověřujte a převádějte YAML v prohlížeči. Nic se nenahrává.", + "outputLabel": "Výstup", + "outputModes": { + "yaml": "YAML (formátovaný)", + "json": "JSON" + }, + "indentLabel": "Odsazení", + "spaces": "{n} mezery", + "format": "Formátovat", + "clear": "Vymazat", + "copy": "Kopírovat", + "counter": "{current} / {max} znaků", + "inputPanel": "Vstup", + "outputPanel": "Výstup", + "errors": { + "tooLong": "Vstup je omezen na {max} znaků.", + "couldNotFormat": "Nepodařilo se analyzovat tento YAML." + } + }, "GraphqlFormatter": { "title": "Formátovač GraphQL", "subtitle": "Formátujte dotazy, mutace a odběry GraphQL v prohlížeči. Nic se neodesílá.", diff --git a/apps/web/messages/da.json b/apps/web/messages/da.json index 24184579..6d577d13 100644 --- a/apps/web/messages/da.json +++ b/apps/web/messages/da.json @@ -292,6 +292,10 @@ "title": "GraphQL-formater", "description": "Formatér GraphQL med syntaksfremhævning og en enkel forespørgselsbygger." }, + "yamlFormatter": { + "title": "YAML-formatering", + "description": "Formater, valider og konverter YAML til JSON i browseren." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "Kunne ikke formatere denne SQL." } }, + "YamlFormatter": { + "title": "YAML-formatering", + "subtitle": "Formater, valider og konverter YAML i din browser. Intet uploades.", + "outputLabel": "Output", + "outputModes": { + "yaml": "YAML (formateret)", + "json": "JSON" + }, + "indentLabel": "Indrykning", + "spaces": "{n} mellemrum", + "format": "Formater", + "clear": "Ryd", + "copy": "Kopiér", + "counter": "{current} / {max} tegn", + "inputPanel": "Input", + "outputPanel": "Output", + "errors": { + "tooLong": "Input er begrænset til {max} tegn.", + "couldNotFormat": "Kunne ikke fortolke dette YAML." + } + }, "GraphqlFormatter": { "title": "GraphQL-formater", "subtitle": "Formatér GraphQL-forespørgsler, mutationer og abonnementer i browseren. Intet uploades.", diff --git a/apps/web/messages/de.json b/apps/web/messages/de.json index 15a13493..f66fa504 100644 --- a/apps/web/messages/de.json +++ b/apps/web/messages/de.json @@ -292,6 +292,10 @@ "title": "GraphQL-Formatierer", "description": "GraphQL mit Syntaxhervorhebung formatieren und mit einem einfachen Abfrage-Editor zusammenstellen." }, + "yamlFormatter": { + "title": "YAML-Formatierer", + "description": "YAML im Browser formatieren, validieren und in JSON konvertieren." + }, "diffChecker": { "title": "Textvergleich", "description": "Zwei Texte zeilenweise nebeneinander vergleichen." @@ -1990,6 +1994,27 @@ "couldNotFormat": "SQL konnte nicht formatiert werden." } }, + "YamlFormatter": { + "title": "YAML-Formatierer", + "subtitle": "YAML im Browser formatieren, validieren und konvertieren. Es wird nichts hochgeladen.", + "outputLabel": "Ausgabe", + "outputModes": { + "yaml": "YAML (formatiert)", + "json": "JSON" + }, + "indentLabel": "Einzug", + "spaces": "{n} Leerzeichen", + "format": "Formatieren", + "clear": "Löschen", + "copy": "Kopieren", + "counter": "{current} / {max} Zeichen", + "inputPanel": "Eingabe", + "outputPanel": "Ausgabe", + "errors": { + "tooLong": "Die Eingabe ist auf {max} Zeichen begrenzt.", + "couldNotFormat": "Dieses YAML konnte nicht verarbeitet werden." + } + }, "GraphqlFormatter": { "title": "GraphQL-Formatierer", "subtitle": "Formatiert GraphQL-Abfragen, Mutationen und Subscriptions im Browser. Es wird nichts hochgeladen.", diff --git a/apps/web/messages/el.json b/apps/web/messages/el.json index 71eaa4b4..ddb54c06 100644 --- a/apps/web/messages/el.json +++ b/apps/web/messages/el.json @@ -292,6 +292,10 @@ "title": "Μορφοποιητής GraphQL", "description": "Μορφοποιήστε GraphQL με επισήμανση σύνταξης και απλό επεξεργαστή ερωτημάτων." }, + "yamlFormatter": { + "title": "Μορφοποιητής YAML", + "description": "Μορφοποίηση, επαλήθευση και μετατροπή YAML σε JSON στον περιηγητή." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "Δεν ήταν δυνατή η μορφοποίηση αυτού του SQL." } }, + "YamlFormatter": { + "title": "Μορφοποιητής YAML", + "subtitle": "Μορφοποιήστε, επαληθεύστε και μετατρέψτε YAML στον περιηγητή σας. Τίποτα δεν ανεβαίνει.", + "outputLabel": "Έξοδος", + "outputModes": { + "yaml": "YAML (μορφοποιημένο)", + "json": "JSON" + }, + "indentLabel": "Εσοχή", + "spaces": "{n} κενά", + "format": "Μορφοποίηση", + "clear": "Καθαρισμός", + "copy": "Αντιγραφή", + "counter": "{current} / {max} χαρακτήρες", + "inputPanel": "Είσοδος", + "outputPanel": "Έξοδος", + "errors": { + "tooLong": "Η είσοδος περιορίζεται σε {max} χαρακτήρες.", + "couldNotFormat": "Δεν ήταν δυνατή η ανάλυση αυτού του YAML." + } + }, "GraphqlFormatter": { "title": "Μορφοποιητής GraphQL", "subtitle": "Μορφοποιήστε ερωτήματα, μεταλλάξεις και συνδρομές GraphQL στο πρόγραμμα περιήγησης. Δεν ανεβαίνει τίποτα.", diff --git a/apps/web/messages/en.json b/apps/web/messages/en.json index 71487d4e..ebfbaf57 100644 --- a/apps/web/messages/en.json +++ b/apps/web/messages/en.json @@ -357,6 +357,10 @@ "title": "GraphQL Formatter", "description": "Format queries with syntax highlighting and a simple query builder." }, + "yamlFormatter": { + "title": "YAML Formatter", + "description": "Format, validate, and convert YAML to JSON in the browser." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1992,6 +1996,27 @@ "couldNotFormat": "Could not format this SQL." } }, + "YamlFormatter": { + "title": "YAML Formatter", + "subtitle": "Format, validate, and convert YAML in your browser. Nothing is uploaded.", + "outputLabel": "Output", + "outputModes": { + "yaml": "YAML (formatted)", + "json": "JSON" + }, + "indentLabel": "Indent", + "spaces": "{n} spaces", + "format": "Format", + "clear": "Clear", + "copy": "Copy", + "counter": "{current} / {max} characters", + "inputPanel": "Input", + "outputPanel": "Output", + "errors": { + "tooLong": "Input is limited to {max} characters.", + "couldNotFormat": "Could not parse this YAML." + } + }, "GraphqlFormatter": { "title": "GraphQL formatter", "subtitle": "Format GraphQL queries, mutations, and subscriptions in your browser. Nothing is uploaded.", diff --git a/apps/web/messages/es.json b/apps/web/messages/es.json index 719988c7..92139112 100644 --- a/apps/web/messages/es.json +++ b/apps/web/messages/es.json @@ -292,6 +292,10 @@ "title": "Formateador GraphQL", "description": "Formatea GraphQL con resaltado de sintaxis y un editor de consultas sencillo." }, + "yamlFormatter": { + "title": "Formateador YAML", + "description": "Formatea, valida y convierte YAML a JSON en el navegador." + }, "diffChecker": { "title": "Comparador de diferencias", "description": "Diferencias línea a línea entre dos textos en paralelo." @@ -1990,6 +1994,27 @@ "couldNotFormat": "No se pudo formatear este SQL." } }, + "YamlFormatter": { + "title": "Formateador YAML", + "subtitle": "Formatea, valida y convierte YAML en tu navegador. Nada se sube.", + "outputLabel": "Salida", + "outputModes": { + "yaml": "YAML (formateado)", + "json": "JSON" + }, + "indentLabel": "Sangría", + "spaces": "{n} espacios", + "format": "Formatear", + "clear": "Limpiar", + "copy": "Copiar", + "counter": "{current} / {max} caracteres", + "inputPanel": "Entrada", + "outputPanel": "Salida", + "errors": { + "tooLong": "La entrada está limitada a {max} caracteres.", + "couldNotFormat": "No se pudo analizar este YAML." + } + }, "GraphqlFormatter": { "title": "Formateador GraphQL", "subtitle": "Formatea consultas, mutaciones y suscripciones GraphQL en el navegador. No se sube nada.", diff --git a/apps/web/messages/fa.json b/apps/web/messages/fa.json index 72776ea0..5399e085 100644 --- a/apps/web/messages/fa.json +++ b/apps/web/messages/fa.json @@ -292,6 +292,10 @@ "title": "قالب‌بند GraphQL", "description": "GraphQL را با برجسته‌سازی نحو و ویرایشگر سادهٔ پرس‌وجو قالب‌بندی کنید." }, + "yamlFormatter": { + "title": "قالب‌بند YAML", + "description": "قالب‌بندی، اعتبارسنجی و تبدیل YAML به JSON در مرورگر." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "فرمت‌کردن این SQL ممکن نبود." } }, + "YamlFormatter": { + "title": "قالب‌بند YAML", + "subtitle": "YAML را در مرورگر خود قالب‌بندی، اعتبارسنجی و تبدیل کنید. هیچ چیز آپلود نمی‌شود.", + "outputLabel": "خروجی", + "outputModes": { + "yaml": "YAML (قالب‌بندی‌شده)", + "json": "JSON" + }, + "indentLabel": "تورفتگی", + "spaces": "{n} فاصله", + "format": "قالب‌بندی", + "clear": "پاک کردن", + "copy": "کپی", + "counter": "{current} / {max} کاراکتر", + "inputPanel": "ورودی", + "outputPanel": "خروجی", + "errors": { + "tooLong": "ورودی محدود به {max} کاراکتر است.", + "couldNotFormat": "این YAML قابل تجزیه نیست." + } + }, "GraphqlFormatter": { "title": "قالب‌بند GraphQL", "subtitle": "پرس‌وجوها، جهش‌ها و اشتراک‌های GraphQL را در مرورگر قالب‌بندی کنید. چیزی آپلود نمی‌شود.", diff --git a/apps/web/messages/fr.json b/apps/web/messages/fr.json index a051ab6e..4b944f04 100644 --- a/apps/web/messages/fr.json +++ b/apps/web/messages/fr.json @@ -292,6 +292,10 @@ "title": "Formateur GraphQL", "description": "Formatez du GraphQL avec coloration syntaxique et un éditeur de requêtes simple." }, + "yamlFormatter": { + "title": "Formateur YAML", + "description": "Formatez, validez et convertissez du YAML en JSON dans le navigateur." + }, "diffChecker": { "title": "Comparateur de différences", "description": "Différences ligne par ligne côte à côte entre deux textes." @@ -1990,6 +1994,27 @@ "couldNotFormat": "Impossible de formater ce SQL." } }, + "YamlFormatter": { + "title": "Formateur YAML", + "subtitle": "Formatez, validez et convertissez du YAML dans votre navigateur. Rien n'est téléversé.", + "outputLabel": "Sortie", + "outputModes": { + "yaml": "YAML (formaté)", + "json": "JSON" + }, + "indentLabel": "Indentation", + "spaces": "{n} espaces", + "format": "Formater", + "clear": "Effacer", + "copy": "Copier", + "counter": "{current} / {max} caractères", + "inputPanel": "Entrée", + "outputPanel": "Sortie", + "errors": { + "tooLong": "L'entrée est limitée à {max} caractères.", + "couldNotFormat": "Impossible d'analyser ce YAML." + } + }, "GraphqlFormatter": { "title": "Formateur GraphQL", "subtitle": "Formatez les requêtes, mutations et abonnements GraphQL dans le navigateur. Rien n’est téléversé.", diff --git a/apps/web/messages/id.json b/apps/web/messages/id.json index ec07a25f..13c559ba 100644 --- a/apps/web/messages/id.json +++ b/apps/web/messages/id.json @@ -292,6 +292,10 @@ "title": "Pemformat GraphQL", "description": "Format GraphQL dengan penyorotan sintaks dan pembangun kueri sederhana." }, + "yamlFormatter": { + "title": "Pemformat YAML", + "description": "Format, validasi, dan konversi YAML ke JSON di browser." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "Tidak dapat memformat SQL ini." } }, + "YamlFormatter": { + "title": "Pemformat YAML", + "subtitle": "Format, validasi, dan konversi YAML di browser Anda. Tidak ada yang diunggah.", + "outputLabel": "Keluaran", + "outputModes": { + "yaml": "YAML (diformat)", + "json": "JSON" + }, + "indentLabel": "Indentasi", + "spaces": "{n} spasi", + "format": "Format", + "clear": "Hapus", + "copy": "Salin", + "counter": "{current} / {max} karakter", + "inputPanel": "Masukan", + "outputPanel": "Keluaran", + "errors": { + "tooLong": "Masukan dibatasi hingga {max} karakter.", + "couldNotFormat": "Tidak dapat mengurai YAML ini." + } + }, "GraphqlFormatter": { "title": "Pemformat GraphQL", "subtitle": "Format kueri, mutasi, dan langganan GraphQL di peramban. Tidak ada yang diunggah.", diff --git a/apps/web/messages/it.json b/apps/web/messages/it.json index f2fd5330..c1967d11 100644 --- a/apps/web/messages/it.json +++ b/apps/web/messages/it.json @@ -292,6 +292,10 @@ "title": "Formattatore GraphQL", "description": "Formatta GraphQL con evidenziazione della sintassi e un editor di query semplice." }, + "yamlFormatter": { + "title": "Formattatore YAML", + "description": "Formatta, valida e converti YAML in JSON nel browser." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "Impossibile formattare questo SQL." } }, + "YamlFormatter": { + "title": "Formattatore YAML", + "subtitle": "Formatta, valida e converti YAML nel browser. Nulla viene caricato.", + "outputLabel": "Output", + "outputModes": { + "yaml": "YAML (formattato)", + "json": "JSON" + }, + "indentLabel": "Rientro", + "spaces": "{n} spazi", + "format": "Formatta", + "clear": "Cancella", + "copy": "Copia", + "counter": "{current} / {max} caratteri", + "inputPanel": "Input", + "outputPanel": "Output", + "errors": { + "tooLong": "L'input è limitato a {max} caratteri.", + "couldNotFormat": "Impossibile analizzare questo YAML." + } + }, "GraphqlFormatter": { "title": "Formattatore GraphQL", "subtitle": "Formatta query, mutazioni e subscription GraphQL nel browser. Nulla viene caricato.", diff --git a/apps/web/messages/ja.json b/apps/web/messages/ja.json index 1c341ddf..48319a13 100644 --- a/apps/web/messages/ja.json +++ b/apps/web/messages/ja.json @@ -292,6 +292,10 @@ "title": "GraphQL フォーマッター", "description": "GraphQL を整形し、シンタックスハイライトとシンプルなクエリビルダーを提供します。" }, + "yamlFormatter": { + "title": "YAMLフォーマッター", + "description": "ブラウザでYAMLを整形・検証・JSON変換します。" + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "このSQLを整形できませんでした。" } }, + "YamlFormatter": { + "title": "YAMLフォーマッター", + "subtitle": "YAMLをブラウザ内で整形・検証・変換します。アップロードされません。", + "outputLabel": "出力", + "outputModes": { + "yaml": "YAML(整形済み)", + "json": "JSON" + }, + "indentLabel": "インデント", + "spaces": "{n} スペース", + "format": "整形", + "clear": "クリア", + "copy": "コピー", + "counter": "{current} / {max} 文字", + "inputPanel": "入力", + "outputPanel": "出力", + "errors": { + "tooLong": "入力は {max} 文字以内にしてください。", + "couldNotFormat": "このYAMLを解析できませんでした。" + } + }, "GraphqlFormatter": { "title": "GraphQL フォーマッター", "subtitle": "ブラウザで GraphQL のクエリ・ミューテーション・サブスクリプションを整形します。アップロードは行われません。", diff --git a/apps/web/messages/ko.json b/apps/web/messages/ko.json index 867675a9..3b047b46 100644 --- a/apps/web/messages/ko.json +++ b/apps/web/messages/ko.json @@ -292,6 +292,10 @@ "title": "GraphQL 포매터", "description": "구문 강조와 간단한 쿼리 빌더로 GraphQL을 포맷합니다." }, + "yamlFormatter": { + "title": "YAML 포매터", + "description": "브라우저에서 YAML을 형식화, 유효성 검사, JSON 변환합니다." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "이 SQL을 포맷할 수 없습니다." } }, + "YamlFormatter": { + "title": "YAML 포매터", + "subtitle": "브라우저에서 YAML을 형식화, 유효성 검사, 변환합니다. 업로드되지 않습니다.", + "outputLabel": "출력", + "outputModes": { + "yaml": "YAML (형식화됨)", + "json": "JSON" + }, + "indentLabel": "들여쓰기", + "spaces": "{n} 칸", + "format": "형식화", + "clear": "지우기", + "copy": "복사", + "counter": "{current} / {max} 자", + "inputPanel": "입력", + "outputPanel": "출력", + "errors": { + "tooLong": "입력은 {max}자로 제한됩니다.", + "couldNotFormat": "이 YAML을 파싱할 수 없습니다." + } + }, "GraphqlFormatter": { "title": "GraphQL 포매터", "subtitle": "브라우저에서 GraphQL 쿼리·뮤테이션·구독을 포맷합니다. 업로드되지 않습니다.", diff --git a/apps/web/messages/ms.json b/apps/web/messages/ms.json index 645e031b..3e78f43a 100644 --- a/apps/web/messages/ms.json +++ b/apps/web/messages/ms.json @@ -298,6 +298,10 @@ "title": "Pemformat GraphQL", "description": "Format GraphQL dengan pensyntaksan sorotan dan pembina pertanyaan ringkas." }, + "yamlFormatter": { + "title": "Pemformat YAML", + "description": "Format, sahkan dan tukarkan YAML ke JSON dalam pelayar." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "Tidak dapat memformat SQL ini." } }, + "YamlFormatter": { + "title": "Pemformat YAML", + "subtitle": "Format, sahkan dan tukarkan YAML dalam pelayar anda. Tiada yang dimuat naik.", + "outputLabel": "Output", + "outputModes": { + "yaml": "YAML (diformatkan)", + "json": "JSON" + }, + "indentLabel": "Inden", + "spaces": "{n} ruang", + "format": "Format", + "clear": "Kosongkan", + "copy": "Salin", + "counter": "{current} / {max} aksara", + "inputPanel": "Input", + "outputPanel": "Output", + "errors": { + "tooLong": "Input terhad kepada {max} aksara.", + "couldNotFormat": "Tidak dapat menghurai YAML ini." + } + }, "GraphqlFormatter": { "title": "Pemformat GraphQL", "subtitle": "Format pertanyaan, mutasi dan langganan GraphQL dalam pelayar. Tiada apa dimuat naik.", diff --git a/apps/web/messages/nb.json b/apps/web/messages/nb.json index 1026fd96..217cf305 100644 --- a/apps/web/messages/nb.json +++ b/apps/web/messages/nb.json @@ -292,6 +292,10 @@ "title": "GraphQL-formaterer", "description": "Formater GraphQL med syntaksutheving og en enkel spørringsbygger." }, + "yamlFormatter": { + "title": "YAML-formaterer", + "description": "Formater, valider og konverter YAML til JSON i nettleseren." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "Kunne ikke formatere denne SQL-en." } }, + "YamlFormatter": { + "title": "YAML-formaterer", + "subtitle": "Formater, valider og konverter YAML i nettleseren. Ingenting lastes opp.", + "outputLabel": "Utdata", + "outputModes": { + "yaml": "YAML (formatert)", + "json": "JSON" + }, + "indentLabel": "Innrykk", + "spaces": "{n} mellomrom", + "format": "Formater", + "clear": "Tøm", + "copy": "Kopier", + "counter": "{current} / {max} tegn", + "inputPanel": "Inndata", + "outputPanel": "Utdata", + "errors": { + "tooLong": "Inndata er begrenset til {max} tegn.", + "couldNotFormat": "Kunne ikke tolke denne YAML." + } + }, "GraphqlFormatter": { "title": "GraphQL-formaterer", "subtitle": "Formater GraphQL-spørsmål, mutasjoner og abonnementer i nettleseren. Ingenting lastes opp.", diff --git a/apps/web/messages/nl.json b/apps/web/messages/nl.json index 97b46f5e..a0dac056 100644 --- a/apps/web/messages/nl.json +++ b/apps/web/messages/nl.json @@ -292,6 +292,10 @@ "title": "GraphQL-formatter", "description": "Formatteer GraphQL met syntax highlighting en een eenvoudige querybouwer." }, + "yamlFormatter": { + "title": "YAML-formatter", + "description": "Formatteer, valideer en converteer YAML naar JSON in de browser." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "Kon deze SQL niet formatteren." } }, + "YamlFormatter": { + "title": "YAML-formatter", + "subtitle": "Formatteer, valideer en converteer YAML in uw browser. Er wordt niets geüpload.", + "outputLabel": "Uitvoer", + "outputModes": { + "yaml": "YAML (geformatteerd)", + "json": "JSON" + }, + "indentLabel": "Inspringing", + "spaces": "{n} spaties", + "format": "Formatteren", + "clear": "Wissen", + "copy": "Kopiëren", + "counter": "{current} / {max} tekens", + "inputPanel": "Invoer", + "outputPanel": "Uitvoer", + "errors": { + "tooLong": "De invoer is beperkt tot {max} tekens.", + "couldNotFormat": "Kan deze YAML niet verwerken." + } + }, "GraphqlFormatter": { "title": "GraphQL-formatter", "subtitle": "Formatteer GraphQL-query’s, mutaties en subscriptions in je browser. Er wordt niets geüpload.", diff --git a/apps/web/messages/pl.json b/apps/web/messages/pl.json index d66ccab3..d67dab2b 100644 --- a/apps/web/messages/pl.json +++ b/apps/web/messages/pl.json @@ -292,6 +292,10 @@ "title": "Formatter GraphQL", "description": "Formatuj GraphQL z podświetlaniem składni i prostym edytorem zapytań." }, + "yamlFormatter": { + "title": "Formatyzator YAML", + "description": "Formatuj, weryfikuj i konwertuj YAML do JSON w przeglądarce." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "Nie udało się sformatować tego SQL." } }, + "YamlFormatter": { + "title": "Formatyzator YAML", + "subtitle": "Formatuj, weryfikuj i konwertuj YAML w przeglądarce. Nic nie jest przesyłane.", + "outputLabel": "Wyjście", + "outputModes": { + "yaml": "YAML (sformatowany)", + "json": "JSON" + }, + "indentLabel": "Wcięcie", + "spaces": "{n} spacje", + "format": "Formatuj", + "clear": "Wyczyść", + "copy": "Kopiuj", + "counter": "{current} / {max} znaków", + "inputPanel": "Wejście", + "outputPanel": "Wyjście", + "errors": { + "tooLong": "Wejście jest ograniczone do {max} znaków.", + "couldNotFormat": "Nie można przetworzyć tego YAML." + } + }, "GraphqlFormatter": { "title": "Formatter GraphQL", "subtitle": "Formatuj zapytania, mutacje i subskrypcje GraphQL w przeglądarce. Nic nie jest wysyłane.", diff --git a/apps/web/messages/pt-BR.json b/apps/web/messages/pt-BR.json index ed3ca606..165a2b7a 100644 --- a/apps/web/messages/pt-BR.json +++ b/apps/web/messages/pt-BR.json @@ -292,6 +292,10 @@ "title": "Formatador GraphQL", "description": "Formate GraphQL com realce de sintaxe e um editor de consultas simples." }, + "yamlFormatter": { + "title": "Formatador YAML", + "description": "Formate, valide e converta YAML para JSON no navegador." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "Não foi possível formatar este SQL." } }, + "YamlFormatter": { + "title": "Formatador YAML", + "subtitle": "Formate, valide e converta YAML no navegador. Nada é enviado.", + "outputLabel": "Saída", + "outputModes": { + "yaml": "YAML (formatado)", + "json": "JSON" + }, + "indentLabel": "Recuo", + "spaces": "{n} espaços", + "format": "Formatar", + "clear": "Limpar", + "copy": "Copiar", + "counter": "{current} / {max} caracteres", + "inputPanel": "Entrada", + "outputPanel": "Saída", + "errors": { + "tooLong": "A entrada é limitada a {max} caracteres.", + "couldNotFormat": "Não foi possível analisar este YAML." + } + }, "GraphqlFormatter": { "title": "Formatador GraphQL", "subtitle": "Formate consultas, mutações e assinaturas GraphQL no navegador. Nada é enviado.", diff --git a/apps/web/messages/pt.json b/apps/web/messages/pt.json index fe58ccb3..40cea507 100644 --- a/apps/web/messages/pt.json +++ b/apps/web/messages/pt.json @@ -292,6 +292,10 @@ "title": "Formatador GraphQL", "description": "Formate GraphQL com realce de sintaxe e um editor de consultas simples." }, + "yamlFormatter": { + "title": "Formatador YAML", + "description": "Formate, valide e converta YAML para JSON no navegador." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "Não foi possível formatar este SQL." } }, + "YamlFormatter": { + "title": "Formatador YAML", + "subtitle": "Formate, valide e converta YAML no navegador. Nada é carregado.", + "outputLabel": "Saída", + "outputModes": { + "yaml": "YAML (formatado)", + "json": "JSON" + }, + "indentLabel": "Recuo", + "spaces": "{n} espaços", + "format": "Formatar", + "clear": "Limpar", + "copy": "Copiar", + "counter": "{current} / {max} caracteres", + "inputPanel": "Entrada", + "outputPanel": "Saída", + "errors": { + "tooLong": "A entrada está limitada a {max} caracteres.", + "couldNotFormat": "Não foi possível analisar este YAML." + } + }, "GraphqlFormatter": { "title": "Formatador GraphQL", "subtitle": "Formate consultas, mutações e subscrições GraphQL no navegador. Nada é enviado.", diff --git a/apps/web/messages/ru.json b/apps/web/messages/ru.json index 8b11d21d..9fd0d799 100644 --- a/apps/web/messages/ru.json +++ b/apps/web/messages/ru.json @@ -292,6 +292,10 @@ "title": "Форматтер GraphQL", "description": "Форматируйте GraphQL с подсветкой синтаксиса и простым конструктором запросов." }, + "yamlFormatter": { + "title": "Форматировщик YAML", + "description": "Форматируйте, проверяйте и конвертируйте YAML в JSON в браузере." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "Не удалось отформатировать этот SQL." } }, + "YamlFormatter": { + "title": "Форматировщик YAML", + "subtitle": "Форматируйте, проверяйте и конвертируйте YAML в браузере. Ничего не загружается.", + "outputLabel": "Вывод", + "outputModes": { + "yaml": "YAML (форматированный)", + "json": "JSON" + }, + "indentLabel": "Отступ", + "spaces": "{n} пробела", + "format": "Форматировать", + "clear": "Очистить", + "copy": "Копировать", + "counter": "{current} / {max} символов", + "inputPanel": "Ввод", + "outputPanel": "Вывод", + "errors": { + "tooLong": "Ввод ограничен {max} символами.", + "couldNotFormat": "Не удалось разобрать этот YAML." + } + }, "GraphqlFormatter": { "title": "Форматтер GraphQL", "subtitle": "Форматируйте запросы, мутации и подписки GraphQL в браузере. Ничего не загружается.", diff --git a/apps/web/messages/sv.json b/apps/web/messages/sv.json index db50b519..94302ef8 100644 --- a/apps/web/messages/sv.json +++ b/apps/web/messages/sv.json @@ -292,6 +292,10 @@ "title": "GraphQL-formaterare", "description": "Formatera GraphQL med syntaxmarkering och en enkel frågebyggare." }, + "yamlFormatter": { + "title": "YAML-formaterare", + "description": "Formatera, validera och konvertera YAML till JSON i webbläsaren." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "Kunde inte formatera denna SQL." } }, + "YamlFormatter": { + "title": "YAML-formaterare", + "subtitle": "Formatera, validera och konvertera YAML i webbläsaren. Ingenting laddas upp.", + "outputLabel": "Utdata", + "outputModes": { + "yaml": "YAML (formaterat)", + "json": "JSON" + }, + "indentLabel": "Indragning", + "spaces": "{n} mellanslag", + "format": "Formatera", + "clear": "Rensa", + "copy": "Kopiera", + "counter": "{current} / {max} tecken", + "inputPanel": "Indata", + "outputPanel": "Utdata", + "errors": { + "tooLong": "Indata är begränsad till {max} tecken.", + "couldNotFormat": "Kunde inte tolka denna YAML." + } + }, "GraphqlFormatter": { "title": "GraphQL-formaterare", "subtitle": "Formatera GraphQL-frågor, mutationer och prenumerationer i webbläsaren. Inget laddas upp.", diff --git a/apps/web/messages/tr.json b/apps/web/messages/tr.json index 1bc5f4b7..c96a1d2e 100644 --- a/apps/web/messages/tr.json +++ b/apps/web/messages/tr.json @@ -292,6 +292,10 @@ "title": "GraphQL Biçimlendirici", "description": "Sözdizimi vurgulama ve basit bir sorgu oluşturucuyla GraphQL biçimlendirin." }, + "yamlFormatter": { + "title": "YAML Biçimleyici", + "description": "YAML'ı tarayıcıda biçimlendirin, doğrulayın ve JSON'a dönüştürün." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "Bu SQL biçimlendirilemedi." } }, + "YamlFormatter": { + "title": "YAML Biçimleyici", + "subtitle": "YAML'ı tarayıcınızda biçimlendirin, doğrulayın ve dönüştürün. Hiçbir şey yüklenmez.", + "outputLabel": "Çıktı", + "outputModes": { + "yaml": "YAML (biçimlendirilmiş)", + "json": "JSON" + }, + "indentLabel": "Girinti", + "spaces": "{n} boşluk", + "format": "Biçimlendir", + "clear": "Temizle", + "copy": "Kopyala", + "counter": "{current} / {max} karakter", + "inputPanel": "Girdi", + "outputPanel": "Çıktı", + "errors": { + "tooLong": "Girdi {max} karakterle sınırlıdır.", + "couldNotFormat": "Bu YAML ayrıştırılamadı." + } + }, "GraphqlFormatter": { "title": "GraphQL biçimlendirici", "subtitle": "GraphQL sorgularını, mutasyonlarını ve aboneliklerini tarayıcıda biçimlendirin. Hiçbir şey yüklenmez.", diff --git a/apps/web/messages/uk.json b/apps/web/messages/uk.json index 39b66171..18344d6e 100644 --- a/apps/web/messages/uk.json +++ b/apps/web/messages/uk.json @@ -292,6 +292,10 @@ "title": "Форматувач GraphQL", "description": "Форматуйте GraphQL із підсвітленням синтаксису й простим конструктором запитів." }, + "yamlFormatter": { + "title": "Форматувальник YAML", + "description": "Форматуйте, перевіряйте та конвертуйте YAML у JSON у браузері." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "Не вдалося відформатувати цей SQL." } }, + "YamlFormatter": { + "title": "Форматувальник YAML", + "subtitle": "Форматуйте, перевіряйте та конвертуйте YAML у браузері. Нічого не завантажується.", + "outputLabel": "Вивід", + "outputModes": { + "yaml": "YAML (відформатований)", + "json": "JSON" + }, + "indentLabel": "Відступ", + "spaces": "{n} пробіли", + "format": "Форматувати", + "clear": "Очистити", + "copy": "Копіювати", + "counter": "{current} / {max} символів", + "inputPanel": "Введення", + "outputPanel": "Вивід", + "errors": { + "tooLong": "Введення обмежено {max} символами.", + "couldNotFormat": "Не вдалося розібрати цей YAML." + } + }, "GraphqlFormatter": { "title": "Форматувач GraphQL", "subtitle": "Форматуйте запити, мутації й підписки GraphQL у браузері. Нічого не завантажується.", diff --git a/apps/web/messages/vi.json b/apps/web/messages/vi.json index 34dfb280..250ce885 100644 --- a/apps/web/messages/vi.json +++ b/apps/web/messages/vi.json @@ -292,6 +292,10 @@ "title": "Trình định dạng GraphQL", "description": "Định dạng GraphQL với tô sáng cú pháp và trình xây dựng truy vấn đơn giản." }, + "yamlFormatter": { + "title": "Trình định dạng YAML", + "description": "Định dạng, xác thực và chuyển đổi YAML sang JSON trong trình duyệt." + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "Không thể định dạng SQL này." } }, + "YamlFormatter": { + "title": "Trình định dạng YAML", + "subtitle": "Định dạng, xác thực và chuyển đổi YAML trong trình duyệt. Không có gì được tải lên.", + "outputLabel": "Đầu ra", + "outputModes": { + "yaml": "YAML (đã định dạng)", + "json": "JSON" + }, + "indentLabel": "Thụt lề", + "spaces": "{n} khoảng trắng", + "format": "Định dạng", + "clear": "Xóa", + "copy": "Sao chép", + "counter": "{current} / {max} ký tự", + "inputPanel": "Đầu vào", + "outputPanel": "Đầu ra", + "errors": { + "tooLong": "Đầu vào giới hạn {max} ký tự.", + "couldNotFormat": "Không thể phân tích cú pháp YAML này." + } + }, "GraphqlFormatter": { "title": "Trình định dạng GraphQL", "subtitle": "Định dạng truy vấn, mutation và subscription GraphQL trong trình duyệt. Không tải dữ liệu lên.", diff --git a/apps/web/messages/zh.json b/apps/web/messages/zh.json index c55aba64..8f7c5d84 100644 --- a/apps/web/messages/zh.json +++ b/apps/web/messages/zh.json @@ -292,6 +292,10 @@ "title": "GraphQL 格式化", "description": "格式化 GraphQL,提供语法高亮与简易查询构建器。" }, + "yamlFormatter": { + "title": "YAML 格式化", + "description": "在浏览器中格式化、验证并将 YAML 转换为 JSON。" + }, "diffChecker": { "title": "Diff checker", "description": "Side-by-side line diff of two texts." @@ -1990,6 +1994,27 @@ "couldNotFormat": "无法格式化该 SQL。" } }, + "YamlFormatter": { + "title": "YAML 格式化", + "subtitle": "在浏览器中格式化、验证和转换 YAML。不会上传任何内容。", + "outputLabel": "输出", + "outputModes": { + "yaml": "YAML(已格式化)", + "json": "JSON" + }, + "indentLabel": "缩进", + "spaces": "{n} 空格", + "format": "格式化", + "clear": "清除", + "copy": "复制", + "counter": "{current} / {max} 字符", + "inputPanel": "输入", + "outputPanel": "输出", + "errors": { + "tooLong": "输入限制为 {max} 个字符。", + "couldNotFormat": "无法解析此 YAML。" + } + }, "GraphqlFormatter": { "title": "GraphQL 格式化", "subtitle": "在浏览器中格式化 GraphQL 查询、变更与订阅。不会上传任何内容。", diff --git a/apps/web/src/app/app/yaml-formatter/page.tsx b/apps/web/src/app/app/yaml-formatter/page.tsx new file mode 100644 index 00000000..0e44b0b2 --- /dev/null +++ b/apps/web/src/app/app/yaml-formatter/page.tsx @@ -0,0 +1,12 @@ +import { YamlFormatterLayoutLazy } from '@/components/app-tools/client-only-tool-loaders' +import { generateToolMetadata } from '@/lib/metadata' + +export const metadata = generateToolMetadata('yaml-formatter') + +export default function YamlFormatterPage() { + return ( +
+ +
+ ) +} diff --git a/apps/web/src/app/globals.css b/apps/web/src/app/globals.css index 60816ddd..0c948110 100644 --- a/apps/web/src/app/globals.css +++ b/apps/web/src/app/globals.css @@ -3,29 +3,34 @@ @tailwind utilities; body { - font-family: Arial, Helvetica, sans-serif; + font-family: var(--font-geist-sans), ui-sans-serif, system-ui, sans-serif; + font-size: 15px; + line-height: 1.6; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + letter-spacing: -0.01em; } @layer base { :root { - --background: 40 20% 97%; - --foreground: 220 14% 16%; - --card: 40 15% 99%; - --card-foreground: 220 14% 16%; - --popover: 40 15% 99%; - --popover-foreground: 220 14% 16%; + --background: 40 18% 93%; + --foreground: 220 14% 14%; + --card: 40 14% 95%; + --card-foreground: 220 14% 14%; + --popover: 40 14% 95%; + --popover-foreground: 220 14% 14%; --primary: 220 14% 16%; - --primary-foreground: 40 20% 97%; - --secondary: 40 10% 93%; - --secondary-foreground: 220 14% 16%; - --muted: 40 10% 93%; - --muted-foreground: 220 8% 46%; - --accent: 40 10% 93%; - --accent-foreground: 220 14% 16%; + --primary-foreground: 40 18% 93%; + --secondary: 40 10% 89%; + --secondary-foreground: 220 14% 14%; + --muted: 40 10% 89%; + --muted-foreground: 220 12% 34%; + --accent: 40 10% 89%; + --accent-foreground: 220 14% 14%; --destructive: 0 72% 51%; - --destructive-foreground: 40 20% 97%; - --border: 40 10% 88%; - --input: 40 10% 88%; + --destructive-foreground: 40 18% 93%; + --border: 40 10% 83%; + --input: 40 10% 83%; --ring: 220 14% 16%; --chart-1: 12 76% 61%; --chart-2: 173 58% 39%; @@ -33,16 +38,16 @@ body { --chart-4: 43 74% 66%; --chart-5: 27 87% 67%; --radius: 0.5rem; - --surface-1: 40 15% 95%; - --surface-2: 40 12% 92%; - --surface-3: 40 10% 88%; - --sidebar-background: 40 15% 96%; - --sidebar-foreground: 220 10% 26%; + --surface-1: 40 14% 91%; + --surface-2: 40 12% 87%; + --surface-3: 40 10% 83%; + --sidebar-background: 40 14% 91%; + --sidebar-foreground: 220 10% 24%; --sidebar-primary: 220 14% 16%; - --sidebar-primary-foreground: 40 20% 97%; - --sidebar-accent: 40 10% 93%; - --sidebar-accent-foreground: 220 14% 16%; - --sidebar-border: 40 10% 88%; + --sidebar-primary-foreground: 40 18% 93%; + --sidebar-accent: 40 10% 89%; + --sidebar-accent-foreground: 220 14% 14%; + --sidebar-border: 40 10% 83%; --sidebar-ring: 220 14% 16%; --sidebar-width: 247px; --main-content-width: calc(100% - var(--sidebar-width)); diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx index c6953fe6..6fa80af1 100644 --- a/apps/web/src/app/layout.tsx +++ b/apps/web/src/app/layout.tsx @@ -1,6 +1,7 @@ import type { Metadata } from "next"; import { ThemeProvider } from "@/components/theme-provider" import { cn } from "@/lib/utils" +import { GeistSans } from 'geist/font/sans' import { GeistMono } from 'geist/font/mono' import { NextIntlClientProvider } from 'next-intl'; @@ -99,6 +100,7 @@ export default async function RootLayout({ return ( diff --git a/apps/web/src/components/app-tools/client-only-tool-loaders.tsx b/apps/web/src/components/app-tools/client-only-tool-loaders.tsx index bb1aebcb..71f1ab7c 100644 --- a/apps/web/src/components/app-tools/client-only-tool-loaders.tsx +++ b/apps/web/src/components/app-tools/client-only-tool-loaders.tsx @@ -77,6 +77,14 @@ export const GraphqlFormatterLayoutLazy = dynamic( { ssr: false, loading: toolLoading } ) +export const YamlFormatterLayoutLazy = dynamic( + () => + import('@/components/yaml-formatter/yaml-formatter-layout').then( + m => m.YamlFormatterLayout + ), + { ssr: false, loading: toolLoading } +) + export const Game2048LayoutLazy = dynamic( () => import('@/components/break-room/2048/game-2048-layout').then( diff --git a/apps/web/src/components/sidebar/data/sidebar-data.ts b/apps/web/src/components/sidebar/data/sidebar-data.ts index 09d8b461..a07bd53e 100644 --- a/apps/web/src/components/sidebar/data/sidebar-data.ts +++ b/apps/web/src/components/sidebar/data/sidebar-data.ts @@ -164,6 +164,12 @@ export const sidebarData: SidebarData = { icon: IconBrandGraphql, description: 'Format GraphQL with syntax highlighting and a query builder.', }, + { + title: 'YAML Formatter', + url: '/app/yaml-formatter', + icon: IconFileCode, + description: 'Format, validate, and convert YAML to JSON in the browser.', + }, { title: 'Markdown Preview', url: '/app/markdown-preview-html', diff --git a/apps/web/src/components/yaml-formatter/yaml-formatter-layout.tsx b/apps/web/src/components/yaml-formatter/yaml-formatter-layout.tsx new file mode 100644 index 00000000..1baed8a0 --- /dev/null +++ b/apps/web/src/components/yaml-formatter/yaml-formatter-layout.tsx @@ -0,0 +1,243 @@ +'use client' + +import { useCallback, useState } from 'react' +import * as yaml from 'js-yaml' +import { Button } from '@/components/ui/button' +import { Card } from '@/components/ui/card' +import { Label } from '@/components/ui/label' +import { useIsMobile } from '@/components/hooks/use-mobile' +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from '@/components/ui/select' +import { AlertCircle, Check, Copy, Trash2, Wand2 } from 'lucide-react' +import { useTranslations } from 'next-intl' +import CodeEditor from '@/components/ui/code-editor' + +const SAMPLE = `# Example YAML document +server: + host: localhost + port: 8080 + debug: true + +database: + url: postgres://user:pass@localhost:5432/mydb + pool: + min: 2 + max: 10 + +features: + - name: auth + enabled: true + - name: metrics + enabled: false +` + +const MAX_LEN = 500_000 + +type OutputMode = 'yaml' | 'json' + +export function YamlFormatterLayout() { + const t = useTranslations('YamlFormatter') + const isMobile = useIsMobile() + const [mobileTab, setMobileTab] = useState<'input' | 'output'>('input') + const [input, setInput] = useState(SAMPLE) + const [output, setOutput] = useState('') + const [outputLang, setOutputLang] = useState('yaml') + const [indent, setIndent] = useState('2') + const [outputMode, setOutputMode] = useState('yaml') + const [error, setError] = useState('') + const [copied, setCopied] = useState(false) + + const runFormat = useCallback(() => { + setError('') + setCopied(false) + if (isMobile) setMobileTab('output') + const src = input + if (!src.trim()) { + setOutput('') + return + } + if (src.length > MAX_LEN) { + setError(t('errors.tooLong', { max: MAX_LEN.toLocaleString() })) + setOutput('') + return + } + + const indentNum = parseInt(indent, 10) || 2 + + try { + const parsed = yaml.load(src) + + if (outputMode === 'json') { + setOutput(JSON.stringify(parsed, null, indentNum)) + setOutputLang('json') + } else { + setOutput(yaml.dump(parsed, { indent: indentNum, lineWidth: -1, noRefs: true })) + setOutputLang('yaml') + } + } catch (e) { + setOutput('') + setError(e instanceof Error ? e.message : t('errors.couldNotFormat')) + } + }, [input, indent, outputMode, t, isMobile]) + + const handleCopy = async () => { + if (!output) return + try { + await navigator.clipboard.writeText(output) + setCopied(true) + setTimeout(() => setCopied(false), 2000) + } catch { + // ignore clipboard failures + } + } + + return ( +
+
+

{t('title')}

+

{t('subtitle')}

+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+

+ {t('counter', { current: input.length.toLocaleString(), max: MAX_LEN.toLocaleString() })} +

+
+ + {error && ( +
+ +

{error}

+
+ )} + + {isMobile && ( +
+ + +
+ )} + +
+ {(!isMobile || mobileTab === 'input') && ( + +
+ +
+
+ +
+
+ )} + + {(!isMobile || mobileTab === 'output') && ( + +
+ + +
+
+ +
+
+ )} +
+
+ ) +} diff --git a/apps/web/src/lib/metadata.ts b/apps/web/src/lib/metadata.ts index 47d46bbe..95983599 100644 --- a/apps/web/src/lib/metadata.ts +++ b/apps/web/src/lib/metadata.ts @@ -219,6 +219,12 @@ export const toolsMetadata: Record = { keywords: ['graphql formatter', 'graphql pretty print', 'graphql query builder', 'graphql minify', 'graphql syntax'], aiSummary: 'Format or minify GraphQL queries, mutations, and subscriptions with Monaco syntax highlighting. Answers "GraphQL formatter online", "pretty print GraphQL query", or "minify GraphQL".', }, + 'yaml-formatter': { + title: 'YAML Formatter & Validator', + description: 'Format and validate YAML in the browser. Supports pretty-printing, indentation control, and conversion to JSON. Nothing is uploaded.', + keywords: ['yaml formatter', 'yaml validator', 'yaml to json', 'json to yaml', 'yaml pretty print', 'format yaml online', 'yaml lint'], + aiSummary: 'Format, validate, and pretty-print YAML in the browser with optional JSON conversion. Answers "yaml formatter online", "validate yaml", "yaml to json converter", or "pretty print yaml".', + }, 'diff-checker': { title: 'Text Diff Checker', description: 'Compare two texts side by side with additions and removals highlighted. Runs entirely in your browser.', diff --git a/apps/web/src/lib/route-config.ts b/apps/web/src/lib/route-config.ts index d1f9c9b2..f146f031 100644 --- a/apps/web/src/lib/route-config.ts +++ b/apps/web/src/lib/route-config.ts @@ -98,6 +98,7 @@ export const routeConfig: Record = { '/app/cron-builder': { title: 'Cron Builder', icon: Repeat, namespace: 'CronBuilder' }, '/app/sql-formatter': { title: 'SQL Formatter', icon: Table2, namespace: 'SqlFormatter' }, '/app/graphql-formatter': { title: 'GraphQL Formatter', icon: GitMerge, namespace: 'GraphqlFormatter' }, + '/app/yaml-formatter': { title: 'YAML Formatter', icon: FileCode2, namespace: 'YamlFormatter' }, '/app/diff-checker': { title: 'Diff checker', icon: GitCompare, namespace: 'DiffChecker' }, '/app/csv-excel-json': { title: 'CSV / Excel ↔ JSON', icon: FileSpreadsheet, namespace: 'CsvExcelJson' }, '/app/snippet-manager': { title: 'Code Snippets', icon: FileCode, namespace: 'SnippetManager' }, diff --git a/apps/web/src/lib/tab-registry.tsx b/apps/web/src/lib/tab-registry.tsx index 4f42c2e3..431629cb 100644 --- a/apps/web/src/lib/tab-registry.tsx +++ b/apps/web/src/lib/tab-registry.tsx @@ -63,6 +63,7 @@ const TAB_REGISTRY: Record = { '/app/cron-builder': dynamic(() => import('@/app/app/cron-builder/page'), { ssr: false, loading }), '/app/sql-formatter': dynamic(() => import('@/app/app/sql-formatter/page'), { ssr: false, loading }), '/app/graphql-formatter': dynamic(() => import('@/app/app/graphql-formatter/page'), { ssr: false, loading }), + '/app/yaml-formatter': dynamic(() => import('@/app/app/yaml-formatter/page'), { ssr: false, loading }), '/app/diff-checker': dynamic(() => import('@/app/app/diff-checker/page'), { ssr: false, loading }), '/app/csv-excel-json': dynamic(() => import('@/app/app/csv-excel-json/page'), { ssr: false, loading }), '/app/snippet-manager': dynamic(() => import('@/app/app/snippet-manager/page'), { ssr: false, loading }), diff --git a/apps/web/src/lib/tool-categories.ts b/apps/web/src/lib/tool-categories.ts index c332de9d..020aca2b 100644 --- a/apps/web/src/lib/tool-categories.ts +++ b/apps/web/src/lib/tool-categories.ts @@ -15,6 +15,7 @@ export const toolCategoryMap: Record = { 'json-schema-generator': 'Formatters', 'sql-formatter': 'Formatters', 'graphql-formatter': 'Formatters', + 'yaml-formatter': 'Formatters', 'markdown-preview-html': 'Formatters', 'format-converter': 'Formatters', 'diff-checker': 'Formatters', diff --git a/apps/web/src/lib/tool-i18n.ts b/apps/web/src/lib/tool-i18n.ts index 3bf2d16f..70d25b70 100644 --- a/apps/web/src/lib/tool-i18n.ts +++ b/apps/web/src/lib/tool-i18n.ts @@ -15,6 +15,7 @@ export const TOOL_PATH_TO_MESSAGE_KEY: Record = { '/app/json-schema-generator': 'jsonSchemaGenerator', '/app/sql-formatter': 'sqlFormatter', '/app/graphql-formatter': 'graphqlFormatter', + '/app/yaml-formatter': 'yamlFormatter', '/app/diff-checker': 'diffChecker', '/app/regex-tester': 'regexTester', '/app/timestamp-converter': 'timestampConverter', diff --git a/apps/web/src/store/tool-visibility-store.ts b/apps/web/src/store/tool-visibility-store.ts index cbd066b1..4ce13f02 100644 --- a/apps/web/src/store/tool-visibility-store.ts +++ b/apps/web/src/store/tool-visibility-store.ts @@ -15,6 +15,7 @@ export const DEFAULT_ENABLED_TOOLS = [ '/app/json-formatter', '/app/json-schema-generator', '/app/sql-formatter', + '/app/yaml-formatter', '/app/graphql-formatter', '/app/diff-checker', '/app/regex-tester', diff --git a/apps/web/tailwind.config.ts b/apps/web/tailwind.config.ts index 2ebdcfb4..482441e2 100644 --- a/apps/web/tailwind.config.ts +++ b/apps/web/tailwind.config.ts @@ -10,6 +10,10 @@ export default { ], theme: { extend: { + fontFamily: { + sans: ['var(--font-geist-sans)', 'ui-sans-serif', 'system-ui', 'sans-serif'], + mono: ['var(--font-geist-mono)', 'ui-monospace', 'SFMono-Regular', 'monospace'], + }, colors: { background: 'hsl(var(--background))', foreground: 'hsl(var(--foreground))',