From 408e90130e07e4f16376115f9138ad26da0fbacc Mon Sep 17 00:00:00 2001 From: Archit1235 Date: Sat, 8 Nov 2025 15:54:27 +0530 Subject: [PATCH 1/5] error correction level selection to QR code generator --- package-lock.json | 41 ++++++++++++++++++- .../tools/image/generic/qr-code/index.tsx | 26 +++++++++++- .../tools/image/generic/qr-code/types.ts | 3 ++ 3 files changed, 67 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 250551e7..36f09629 100644 --- a/package-lock.json +++ b/package-lock.json @@ -584,6 +584,7 @@ "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.14.0.tgz", "integrity": "sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.13.5", @@ -627,6 +628,7 @@ "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.14.1.tgz", "integrity": "sha512-qEEJt42DuToa3gurlH4Qqc1kVpNq8wO8cJtDzU46TjlzWjDlsVyevtYCRijVq3SrHsROS+gVQ8Fnea108GnKzw==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.13.5", @@ -1576,6 +1578,7 @@ "resolved": "https://registry.npmjs.org/@jimp/custom/-/custom-0.22.12.tgz", "integrity": "sha512-xcmww1O/JFP2MrlGUMd3Q78S3Qu6W3mYTXYuIqFq33EorgYHV/HqymHfXy9GjiCJ7OI+7lWx6nYFOzU7M4rd1Q==", "license": "MIT", + "peer": true, "dependencies": { "@jimp/core": "^0.22.12" } @@ -1612,6 +1615,7 @@ "resolved": "https://registry.npmjs.org/@jimp/plugin-blit/-/plugin-blit-0.22.12.tgz", "integrity": "sha512-xslz2ZoFZOPLY8EZ4dC29m168BtDx95D6K80TzgUi8gqT7LY6CsajWO0FAxDwHz6h0eomHMfyGX0stspBrTKnQ==", "license": "MIT", + "peer": true, "dependencies": { "@jimp/utils": "^0.22.12" }, @@ -1624,6 +1628,7 @@ "resolved": "https://registry.npmjs.org/@jimp/plugin-blur/-/plugin-blur-0.22.12.tgz", "integrity": "sha512-S0vJADTuh1Q9F+cXAwFPlrKWzDj2F9t/9JAbUvaaDuivpyWuImEKXVz5PUZw2NbpuSHjwssbTpOZ8F13iJX4uw==", "license": "MIT", + "peer": true, "dependencies": { "@jimp/utils": "^0.22.12" }, @@ -1648,6 +1653,7 @@ "resolved": "https://registry.npmjs.org/@jimp/plugin-color/-/plugin-color-0.22.12.tgz", "integrity": "sha512-xImhTE5BpS8xa+mAN6j4sMRWaUgUDLoaGHhJhpC+r7SKKErYDR0WQV4yCE4gP+N0gozD0F3Ka1LUSaMXrn7ZIA==", "license": "MIT", + "peer": true, "dependencies": { "@jimp/utils": "^0.22.12", "tinycolor2": "^1.6.0" @@ -1691,6 +1697,7 @@ "resolved": "https://registry.npmjs.org/@jimp/plugin-crop/-/plugin-crop-0.22.12.tgz", "integrity": "sha512-FNuUN0OVzRCozx8XSgP9MyLGMxNHHJMFt+LJuFjn1mu3k0VQxrzqbN06yIl46TVejhyAhcq5gLzqmSCHvlcBVw==", "license": "MIT", + "peer": true, "dependencies": { "@jimp/utils": "^0.22.12" }, @@ -1814,6 +1821,7 @@ "resolved": "https://registry.npmjs.org/@jimp/plugin-resize/-/plugin-resize-0.22.12.tgz", "integrity": "sha512-3NyTPlPbTnGKDIbaBgQ3HbE6wXbAlFfxHVERmrbqAi8R3r6fQPxpCauA8UVDnieg5eo04D0T8nnnNIX//i/sXg==", "license": "MIT", + "peer": true, "dependencies": { "@jimp/utils": "^0.22.12" }, @@ -1826,6 +1834,7 @@ "resolved": "https://registry.npmjs.org/@jimp/plugin-rotate/-/plugin-rotate-0.22.12.tgz", "integrity": "sha512-9YNEt7BPAFfTls2FGfKBVgwwLUuKqy+E8bDGGEsOqHtbuhbshVGxN2WMZaD4gh5IDWvR+emmmPPWGgaYNYt1gA==", "license": "MIT", + "peer": true, "dependencies": { "@jimp/utils": "^0.22.12" }, @@ -1841,6 +1850,7 @@ "resolved": "https://registry.npmjs.org/@jimp/plugin-scale/-/plugin-scale-0.22.12.tgz", "integrity": "sha512-dghs92qM6MhHj0HrV2qAwKPMklQtjNpoYgAB94ysYpsXslhRTiPisueSIELRwZGEr0J0VUxpUY7HgJwlSIgGZw==", "license": "MIT", + "peer": true, "dependencies": { "@jimp/utils": "^0.22.12" }, @@ -2071,6 +2081,7 @@ "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.18.0.tgz", "integrity": "sha512-bbH/HaJZpFtXGvWg3TsBWG4eyt3gah3E7nCNU8GLyRjVoWcA91Vm/T+sjHfUcwgJSw9iLtucfHBoq+qW/T30aA==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.23.9", "@mui/core-downloads-tracker": "^5.18.0", @@ -3478,6 +3489,7 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.19.tgz", "integrity": "sha512-pb1Uqj5WJP7wrcbLU7Ru4QtA0+3kAXrkutGiD26wUKzSMgNNaPARTUDQmElUXp64kh3cWdou3Q0C7qwwxqSFmg==", "license": "MIT", + "peer": true, "dependencies": { "undici-types": "~6.21.0" } @@ -3526,6 +3538,7 @@ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.25.tgz", "integrity": "sha512-oSVZmGtDPmRZtVDqvdKUi/qgCsWp5IDY29wp8na8Bj4B3cc99hfNzvNhlMkVVxctkAOGUA3Km7MMpBHAnWfcIA==", "license": "MIT", + "peer": true, "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" @@ -3536,6 +3549,7 @@ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", "license": "MIT", + "peer": true, "peerDependencies": { "@types/react": "^18.0.0" } @@ -3639,6 +3653,7 @@ "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", "dev": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "6.21.0", "@typescript-eslint/types": "6.21.0", @@ -3918,6 +3933,7 @@ "integrity": "sha512-xa57bCPGuzEFqGjPs3vVLyqareG8DX0uMkr5U/v5vLv5/ZUrBrPL7gzxzTJedEyZxFMfsozwTIbbYfEQVo3kgg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@vitest/utils": "1.6.1", "fast-glob": "^3.3.2", @@ -3990,6 +4006,7 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -4581,6 +4598,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.8.9", "caniuse-lite": "^1.0.30001746", @@ -5231,6 +5249,7 @@ "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", @@ -5391,7 +5410,8 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/csvjson": { "version": "5.1.0", @@ -6180,6 +6200,7 @@ "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -6236,6 +6257,7 @@ "integrity": "sha512-iI1f+D2ViGn+uvv5HuHVUamg8ll4tN+JRHGc6IJi4TP9Kl976C57fzPXgseXNs8v0iA8aSJpHsTWjDb9QJamGQ==", "dev": true, "license": "MIT", + "peer": true, "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -7508,6 +7530,7 @@ "integrity": "sha512-JzUXOh0wdNGY54oKng5hliuBkq/+aT1V3YpTM+lrN/GoLQTANZsMaIvmHiHe612rauHvPJnDZkZ+5GZR++1Abg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "css.escape": "^1.5.1", "entities": "^4.5.0", @@ -7731,6 +7754,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.27.6" }, @@ -8766,7 +8790,8 @@ "url": "https://github.com/sponsors/lavrton" } ], - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/laravelphp": { "version": "2.0.4", @@ -9517,6 +9542,7 @@ "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.53.0.tgz", "integrity": "sha512-0WNThgC6CMWNXXBxTbaYYcunj08iB5rnx4/G56UOPeL9UVIUGGHA1GR0EWIh9Ebabj7NpCRawQ5b0hfN1jQmYQ==", "license": "MIT", + "peer": true, "dependencies": { "@types/trusted-types": "^1.0.6" } @@ -9900,6 +9926,7 @@ "resolved": "https://registry.npmjs.org/onnxruntime-web/-/onnxruntime-web-1.21.0.tgz", "integrity": "sha512-adzOe+7uI7lKz6pQNbAsLMQd2Fq5Jhmoxd8LZjJr8m3KvbFyiYyRxRiC57/XXD+jb18voppjeGAjoZmskXG+7A==", "license": "MIT", + "peer": true, "dependencies": { "flatbuffers": "^25.1.24", "guid-typescript": "^1.0.9", @@ -10431,6 +10458,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -10589,6 +10617,7 @@ "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==", "dev": true, "license": "MIT", + "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -11037,6 +11066,7 @@ "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -11049,6 +11079,7 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" @@ -11180,6 +11211,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "@types/react-reconciler": "^0.28.2", "its-fine": "^1.1.1", @@ -12573,6 +12605,7 @@ "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.19.tgz", "integrity": "sha512-1v/e3Dl1BknC37cXMhwGomhO8AkYmN41CqyX9xhUDxry1ns3BFQy2lLDRQXJRdVVWB9OHemv/53xaStimvWyuA==", "license": "MIT", + "peer": true, "dependencies": { "@emotion/is-prop-valid": "1.2.2", "@emotion/unitless": "0.8.1", @@ -12799,6 +12832,7 @@ "integrity": "sha512-6A2rnmW5xZMdw11LYjhcI5846rt9pbLSabY5XPxo+XWdxwZaFEn47Go4NzFiHu9sNNmr/kXivP1vStfvMaK1GQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", @@ -13218,6 +13252,7 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "devOptional": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -13365,6 +13400,7 @@ "integrity": "sha512-j3lYzGC3P+B5Yfy/pfKNgVEg4+UtcIJcVRt2cDjIOmhLourAqPqf8P7acgxeiSgUB7E3p2P8/3gNIgDLpwzs4g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", @@ -13483,6 +13519,7 @@ "integrity": "sha512-Ljb1cnSJSivGN0LqXd/zmDbWEM0RNNg2t1QW/XUhYl/qPqyu7CsqeWtqQXHVaJsecLPuDoak2oJcZN2QoRIOag==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@vitest/expect": "1.6.1", "@vitest/runner": "1.6.1", diff --git a/src/pages/tools/image/generic/qr-code/index.tsx b/src/pages/tools/image/generic/qr-code/index.tsx index 26f83058..3f1765ae 100644 --- a/src/pages/tools/image/generic/qr-code/index.tsx +++ b/src/pages/tools/image/generic/qr-code/index.tsx @@ -18,6 +18,7 @@ const initialValues: InitialValuesType = { size: '200', bgColor: '#FFFFFF', fgColor: '#000000', + correctionLevel: 'M', // URL url: 'https://example.com', @@ -117,6 +118,9 @@ const validationSchema = Yup.object().shape({ .required('Size is required'), bgColor: Yup.string().required('Background color is required'), fgColor: Yup.string().required('Foreground color is required'), + correctionLevel: Yup.mixed<'L' | 'M' | 'Q' | 'H'>() + .oneOf(['L', 'M', 'Q', 'H']) + .required('Correction level is required'), // URL url: Yup.string().when('qrCodeType', { @@ -211,6 +215,25 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { max: 1000 }} /> + + updateField( + 'correctionLevel', + e.target.value as 'L' | 'M' | 'Q' | 'H' + ) + } + helperText="Higher levels survive more damage but encode less data" + > + L (~7%) + M (~15%) + Q (~25%) + H (~30%) + { const res = await fetch(url); diff --git a/src/pages/tools/image/generic/qr-code/types.ts b/src/pages/tools/image/generic/qr-code/types.ts index b9959247..4aa78280 100644 --- a/src/pages/tools/image/generic/qr-code/types.ts +++ b/src/pages/tools/image/generic/qr-code/types.ts @@ -7,6 +7,8 @@ export type QRCodeType = | 'WiFi' | 'vCard'; +export type QRErrorCorrectionLevel = 'L' | 'M' | 'Q' | 'H'; + export type WifiEncryptionType = 'WPA' | 'WEP' | 'None'; export interface InitialValuesType { @@ -16,6 +18,7 @@ export interface InitialValuesType { size: string; bgColor: string; fgColor: string; + correctionLevel: QRErrorCorrectionLevel; // URL url: string; From 84bab29a4d26563a8df030816c297da70360b5aa Mon Sep 17 00:00:00 2001 From: Chesterkxng Date: Fri, 31 Jul 2026 14:45:55 +0200 Subject: [PATCH 2/5] chore: full i8n support --- public/locales/en/image.json | 126 +++++- .../tools/image/generic/qr-code/index.tsx | 360 ++++++++---------- 2 files changed, 282 insertions(+), 204 deletions(-) diff --git a/public/locales/en/image.json b/public/locales/en/image.json index 9a03c734..c374afc2 100644 --- a/public/locales/en/image.json +++ b/public/locales/en/image.json @@ -63,7 +63,131 @@ "qrCode": { "description": "Generate QR codes for different data types: URL, Text, Email, Phone, SMS, WiFi, vCard, and more.", "shortDescription": "Create customized QR codes for various data formats.", - "title": "QR Code Generator" + "longDescription": "Generate QR codes for different data types: URL, Text, Email, Phone, SMS, WiFi, vCard, and more. Customize the size and colors to create the perfect QR code for your needs.", + "title": "QR Code Generator", + "result": { + "title": "Generated QR code" + }, + "groups": { + "type": { + "title": "QR Code Type", + "label": "Select QR Code Type", + "options": { + "url": "URL", + "text": "Text", + "email": "Email", + "phone": "Phone", + "sms": "SMS", + "wifi": "WiFi", + "vcard": "vCard (Contact)" + } + }, + "settings": { + "title": "QR Code Settings", + "size": { + "description": "Size in pixels (100-1000)" + }, + "correctionLevel": { + "label": "Error Correction Level", + "helperText": "Higher levels survive more damage but encode less data", + "options": { + "l": "L (~7%)", + "m": "M (~15%)", + "q": "Q (~25%)", + "h": "H (~30%)" + } + }, + "bgColor": "Background Color", + "fgColor": "Foreground Color" + }, + "details": { + "title": "{{type}} Details", + "url": { + "description": "Enter the URL", + "placeholder": "https://example.com" + }, + "text": { + "description": "Enter the text", + "placeholder": "Enter your text here" + }, + "email": { + "address": { + "description": "Email Address", + "placeholder": "example@example.com" + }, + "subject": { + "description": "Email Subject (optional)", + "placeholder": "Subject line" + }, + "body": { + "description": "Email Body (optional)", + "placeholder": "Body text" + } + }, + "phone": { + "description": "Phone Number", + "placeholder": "+1234567890" + }, + "sms": { + "number": { + "description": "Phone Number", + "placeholder": "+1234567890" + }, + "message": { + "description": "Message (optional)", + "placeholder": "Your message here" + } + }, + "wifi": { + "ssid": { + "description": "Network Name (SSID)", + "placeholder": "Network name" + }, + "password": { + "description": "Password", + "placeholder": "Password" + }, + "encryption": { + "label": "Encryption Type", + "options": { + "wpa": "WPA", + "wep": "WEP", + "none": "None" + } + } + }, + "vcard": { + "name": { + "description": "Full Name", + "placeholder": "John Doe" + }, + "email": { + "description": "Email", + "placeholder": "john@example.com" + }, + "phone": { + "description": "Phone", + "placeholder": "+1234567890" + }, + "address": { + "description": "Address", + "placeholder": "123 Main St, City, Country" + }, + "company": { + "description": "Company (optional)", + "placeholder": "Company name" + }, + "title": { + "description": "Job Title (optional)", + "placeholder": "Software Developer" + }, + "website": { + "description": "Website (optional)", + "placeholder": "https://example.com" + } + } + } + } }, "removeBackground": { "description": "World", diff --git a/src/pages/tools/image/generic/qr-code/index.tsx b/src/pages/tools/image/generic/qr-code/index.tsx index 3f1765ae..4cc5804f 100644 --- a/src/pages/tools/image/generic/qr-code/index.tsx +++ b/src/pages/tools/image/generic/qr-code/index.tsx @@ -1,6 +1,6 @@ import React, { useCallback, useState } from 'react'; import { Box, MenuItem, TextField } from '@mui/material'; -import * as Yup from 'yup'; +import { useTranslation } from 'react-i18next'; import ToolContent from '@components/ToolContent'; import { ToolComponentProps } from '@tools/defineTool'; import { GetGroupsType } from '@components/options/ToolOptions'; @@ -8,8 +8,8 @@ import TextFieldWithDesc from '@components/options/TextFieldWithDesc'; import { InitialValuesType, QRCodeType, WifiEncryptionType } from './types'; import ColorSelector from '@components/options/ColorSelector'; import ToolFileResult from '@components/result/ToolFileResult'; -import * as QRCode from 'qrcode'; import { debounce } from 'lodash'; +import { generateQrCodeFile } from './service'; const initialValues: InitialValuesType = { qrCodeType: 'URL', @@ -52,132 +52,17 @@ const initialValues: InitialValuesType = { vCardTitle: '', vCardWebsite: '' }; - -// Function to format the QR code data based on the type -const formatQRCodeData = (values: InitialValuesType): string => { - switch (values.qrCodeType) { - case 'URL': - return values.url; - - case 'Text': - return values.text; - - case 'Email': { - let emailData = `mailto:${values.emailAddress}`; - if (values.emailSubject || values.emailBody) { - emailData += '?'; - if (values.emailSubject) { - emailData += `subject=${encodeURIComponent(values.emailSubject)}`; - } - if (values.emailBody) { - emailData += `${ - values.emailSubject ? '&' : '' - }body=${encodeURIComponent(values.emailBody)}`; - } - } - return emailData; - } - case 'Phone': - return `tel:${values.phoneNumber}`; - - case 'SMS': - return `sms:${values.smsNumber}${ - values.smsMessage - ? `?body=${encodeURIComponent(values.smsMessage)}` - : '' - }`; - - case 'WiFi': { - const encryption = - values.wifiEncryption === 'None' ? 'nopass' : values.wifiEncryption; - return `WIFI:T:${encryption};S:${values.wifiSsid};P:${values.wifiPassword};;`; - } - case 'vCard': - return `BEGIN:VCARD -VERSION:3.0 -N:${values.vCardName} -FN:${values.vCardName} -ORG:${values.vCardCompany} -TITLE:${values.vCardTitle} -TEL:${values.vCardPhone} -EMAIL:${values.vCardEmail} -ADR:${values.vCardAddress} -URL:${values.vCardWebsite} -END:VCARD`; - - default: - return ''; - } -}; - -const validationSchema = Yup.object().shape({ - qrCodeType: Yup.string().required('QR code type is required'), - size: Yup.number() - .min(100, 'Size must be at least 100px') - .max(1000, 'Size must be at most 1000px') - .required('Size is required'), - bgColor: Yup.string().required('Background color is required'), - fgColor: Yup.string().required('Foreground color is required'), - correctionLevel: Yup.mixed<'L' | 'M' | 'Q' | 'H'>() - .oneOf(['L', 'M', 'Q', 'H']) - .required('Correction level is required'), - - // URL - url: Yup.string().when('qrCodeType', { - is: 'URL', - then: (schema) => - schema.url('Please enter a valid URL').required('URL is required') - }), - - // Text - text: Yup.string().when('qrCodeType', { - is: 'Text', - then: (schema) => schema.required('Text is required') - }), - - // Email - emailAddress: Yup.string().when('qrCodeType', { - is: 'Email', - then: (schema) => - schema - .email('Please enter a valid email address') - .required('Email address is required') - }), - - // Phone - phoneNumber: Yup.string().when('qrCodeType', { - is: 'Phone', - then: (schema) => schema.required('Phone number is required') - }), - - // SMS - smsNumber: Yup.string().when('qrCodeType', { - is: 'SMS', - then: (schema) => schema.required('Phone number is required') - }), - - // WiFi - wifiSsid: Yup.string().when('qrCodeType', { - is: 'WiFi', - then: (schema) => schema.required('SSID is required') - }), - - // vCard - vCardName: Yup.string().when('qrCodeType', { - is: 'vCard', - then: (schema) => schema.required('Name is required') - }) -}); - export default function QRCodeGenerator({ title }: ToolComponentProps) { + const { t } = useTranslation('image'); const [result, setResult] = useState(null); + const getGroups: GetGroupsType = ({ values, updateField }) => { return [ { - title: 'QR Code Type', + title: t('qrCode.groups.type.title'), component: ( updateField('qrCodeType', e.target.value as QRCodeType) } - label="Select QR Code Type" + label={t('qrCode.groups.type.label')} margin="normal" > - URL - Text - Email - Phone - SMS - WiFi - vCard (Contact) + + {t('qrCode.groups.type.options.url')} + + + {t('qrCode.groups.type.options.text')} + + + {t('qrCode.groups.type.options.email')} + + + {t('qrCode.groups.type.options.phone')} + + + {t('qrCode.groups.type.options.sms')} + + + {t('qrCode.groups.type.options.wifi')} + + + {t('qrCode.groups.type.options.vcard')} + ) }, { - title: 'QR Code Settings', + title: t('qrCode.groups.settings.title'), component: ( updateField('size', val)} - description="Size in pixels (100-1000)" + description={t('qrCode.groups.settings.size.description')} inputProps={{ type: 'number', min: 100, @@ -218,7 +117,7 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { @@ -227,20 +126,30 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { e.target.value as 'L' | 'M' | 'Q' | 'H' ) } - helperText="Higher levels survive more damage but encode less data" + helperText={t( + 'qrCode.groups.settings.correctionLevel.helperText' + )} > - L (~7%) - M (~15%) - Q (~25%) - H (~30%) + + {t('qrCode.groups.settings.correctionLevel.options.l')} + + + {t('qrCode.groups.settings.correctionLevel.options.m')} + + + {t('qrCode.groups.settings.correctionLevel.options.q')} + + + {t('qrCode.groups.settings.correctionLevel.options.h')} + updateField('bgColor', val)} /> updateField('fgColor', val)} /> @@ -249,16 +158,16 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { }, // Dynamic form fields based on QR code type { - title: `${values.qrCodeType} Details`, + title: t('qrCode.groups.details.title', { type: values.qrCodeType }), component: ( {values.qrCodeType === 'URL' && ( updateField('url', val)} - description="Enter the URL" + description={t('qrCode.groups.details.url.description')} inputProps={{ - placeholder: 'https://example.com' + placeholder: t('qrCode.groups.details.url.placeholder') }} /> )} @@ -267,11 +176,11 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('text', val)} - description="Enter the text" + description={t('qrCode.groups.details.text.description')} multiline rows={4} inputProps={{ - placeholder: 'Enter your text here' + placeholder: t('qrCode.groups.details.text.placeholder') }} /> )} @@ -281,28 +190,40 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('emailAddress', val)} - description="Email Address" + description={t( + 'qrCode.groups.details.email.address.description' + )} inputProps={{ - placeholder: 'example@example.com', + placeholder: t( + 'qrCode.groups.details.email.address.placeholder' + ), type: 'email' }} /> updateField('emailSubject', val)} - description="Email Subject (optional)" + description={t( + 'qrCode.groups.details.email.subject.description' + )} inputProps={{ - placeholder: 'Subject line' + placeholder: t( + 'qrCode.groups.details.email.subject.placeholder' + ) }} /> updateField('emailBody', val)} - description="Email Body (optional)" + description={t( + 'qrCode.groups.details.email.body.description' + )} multiline rows={4} inputProps={{ - placeholder: 'Body text' + placeholder: t( + 'qrCode.groups.details.email.body.placeholder' + ) }} /> @@ -312,9 +233,9 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('phoneNumber', val)} - description="Phone Number" + description={t('qrCode.groups.details.phone.description')} inputProps={{ - placeholder: '+1234567890', + placeholder: t('qrCode.groups.details.phone.placeholder'), type: 'tel' }} /> @@ -325,20 +246,28 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('smsNumber', val)} - description="Phone Number" + description={t( + 'qrCode.groups.details.sms.number.description' + )} inputProps={{ - placeholder: '+1234567890', + placeholder: t( + 'qrCode.groups.details.sms.number.placeholder' + ), type: 'tel' }} /> updateField('smsMessage', val)} - description="Message (optional)" + description={t( + 'qrCode.groups.details.sms.message.description' + )} multiline rows={4} inputProps={{ - placeholder: 'Your message here' + placeholder: t( + 'qrCode.groups.details.sms.message.placeholder' + ) }} /> @@ -349,17 +278,23 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('wifiSsid', val)} - description="Network Name (SSID)" + description={t('qrCode.groups.details.wifi.ssid.description')} inputProps={{ - placeholder: 'Network name' + placeholder: t( + 'qrCode.groups.details.wifi.ssid.placeholder' + ) }} /> updateField('wifiPassword', val)} - description="Password" + description={t( + 'qrCode.groups.details.wifi.password.description' + )} inputProps={{ - placeholder: 'Password', + placeholder: t( + 'qrCode.groups.details.wifi.password.placeholder' + ), type: 'password' }} /> @@ -373,12 +308,18 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { e.target.value as WifiEncryptionType ) } - label="Encryption Type" + label={t('qrCode.groups.details.wifi.encryption.label')} margin="normal" > - WPA - WEP - None + + {t('qrCode.groups.details.wifi.encryption.options.wpa')} + + + {t('qrCode.groups.details.wifi.encryption.options.wep')} + + + {t('qrCode.groups.details.wifi.encryption.options.none')} + )} @@ -388,59 +329,87 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('vCardName', val)} - description="Full Name" + description={t( + 'qrCode.groups.details.vcard.name.description' + )} inputProps={{ - placeholder: 'John Doe' + placeholder: t( + 'qrCode.groups.details.vcard.name.placeholder' + ) }} /> updateField('vCardEmail', val)} - description="Email" + description={t( + 'qrCode.groups.details.vcard.email.description' + )} inputProps={{ - placeholder: 'john@example.com', + placeholder: t( + 'qrCode.groups.details.vcard.email.placeholder' + ), type: 'email' }} /> updateField('vCardPhone', val)} - description="Phone" + description={t( + 'qrCode.groups.details.vcard.phone.description' + )} inputProps={{ - placeholder: '+1234567890', + placeholder: t( + 'qrCode.groups.details.vcard.phone.placeholder' + ), type: 'tel' }} /> updateField('vCardAddress', val)} - description="Address" + description={t( + 'qrCode.groups.details.vcard.address.description' + )} inputProps={{ - placeholder: '123 Main St, City, Country' + placeholder: t( + 'qrCode.groups.details.vcard.address.placeholder' + ) }} /> updateField('vCardCompany', val)} - description="Company (optional)" + description={t( + 'qrCode.groups.details.vcard.company.description' + )} inputProps={{ - placeholder: 'Company name' + placeholder: t( + 'qrCode.groups.details.vcard.company.placeholder' + ) }} /> updateField('vCardTitle', val)} - description="Job Title (optional)" + description={t( + 'qrCode.groups.details.vcard.title.description' + )} inputProps={{ - placeholder: 'Software Developer' + placeholder: t( + 'qrCode.groups.details.vcard.title.placeholder' + ) }} /> updateField('vCardWebsite', val)} - description="Website (optional)" + description={t( + 'qrCode.groups.details.vcard.website.description' + )} inputProps={{ - placeholder: 'https://example.com' + placeholder: t( + 'qrCode.groups.details.vcard.website.placeholder' + ) }} /> @@ -452,28 +421,15 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { }; const compute = async (options: InitialValuesType) => { - const qrValue = formatQRCodeData(options); - if (!qrValue) return; - const canvas = document.createElement('canvas'); - QRCode.toDataURL( - canvas, - qrValue, - { - color: { - dark: options.fgColor, - light: options.bgColor - }, - width: Number(options.size) || 200, - errorCorrectionLevel: options.correctionLevel - }, - async (error, url) => { - const res = await fetch(url); - const blob = await res.blob(); - const file = new File([blob], 'Qr code.png', { type: 'image/png' }); - setResult(file); - } - ); + try { + const file = await generateQrCodeFile(options); + setResult(file); + } catch (err) { + console.error('Failed to generate QR code', err); + setResult(null); + } }; + const debouncedCompute = useCallback(debounce(compute, 1000), []); return ( @@ -481,15 +437,13 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { title={title} initialValues={initialValues} getGroups={getGroups} - validationSchema={validationSchema} compute={debouncedCompute} resultComponent={ - + } toolInfo={{ - title: 'QR Code Generator', - description: - 'Generate QR codes for different data types: URL, Text, Email, Phone, SMS, WiFi, vCard, and more. Customize the size and colors to create the perfect QR code for your needs.' + title: t('qrCode.title'), + description: t('qrCode.longDescription') }} /> ); From f3155df5a19aeb8aa0dd3b8bcd85ecba3671dd53 Mon Sep 17 00:00:00 2001 From: Chesterkxng Date: Fri, 31 Jul 2026 14:46:55 +0200 Subject: [PATCH 3/5] chore: dedicated service file --- .../tools/image/generic/qr-code/service.ts | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 src/pages/tools/image/generic/qr-code/service.ts diff --git a/src/pages/tools/image/generic/qr-code/service.ts b/src/pages/tools/image/generic/qr-code/service.ts new file mode 100644 index 00000000..69a33b93 --- /dev/null +++ b/src/pages/tools/image/generic/qr-code/service.ts @@ -0,0 +1,106 @@ +import * as QRCode from 'qrcode'; +import { InitialValuesType } from './types'; + +/** Formats the raw form values into the string that gets encoded in the QR code, based on the selected type. */ +export function formatQRCodeData(values: InitialValuesType): string { + switch (values.qrCodeType) { + case 'URL': + return values.url; + + case 'Text': + return values.text; + + case 'Email': { + let emailData = `mailto:${values.emailAddress}`; + if (values.emailSubject || values.emailBody) { + emailData += '?'; + if (values.emailSubject) { + emailData += `subject=${encodeURIComponent(values.emailSubject)}`; + } + if (values.emailBody) { + emailData += `${ + values.emailSubject ? '&' : '' + }body=${encodeURIComponent(values.emailBody)}`; + } + } + return emailData; + } + case 'Phone': + return `tel:${values.phoneNumber}`; + + case 'SMS': + return `sms:${values.smsNumber}${ + values.smsMessage + ? `?body=${encodeURIComponent(values.smsMessage)}` + : '' + }`; + + case 'WiFi': { + const encryption = + values.wifiEncryption === 'None' ? 'nopass' : values.wifiEncryption; + return `WIFI:T:${encryption};S:${values.wifiSsid};P:${values.wifiPassword};;`; + } + case 'vCard': + return `BEGIN:VCARD +VERSION:3.0 +N:${values.vCardName} +FN:${values.vCardName} +ORG:${values.vCardCompany} +TITLE:${values.vCardTitle} +TEL:${values.vCardPhone} +EMAIL:${values.vCardEmail} +ADR:${values.vCardAddress} +URL:${values.vCardWebsite} +END:VCARD`; + + default: + return ''; + } +} + +/** + * Renders the QR code for the given form values and returns it as a + * downloadable PNG File. Returns null if there's nothing to encode yet + * (e.g. required field for the current type is still empty). + */ +export function generateQrCodeFile( + options: InitialValuesType +): Promise { + const qrValue = formatQRCodeData(options); + if (!qrValue) return Promise.resolve(null); + + const canvas = document.createElement('canvas'); + + return new Promise((resolve, reject) => { + QRCode.toDataURL( + canvas, + qrValue, + { + color: { + dark: options.fgColor, + light: options.bgColor + }, + width: Number(options.size) || 200, + errorCorrectionLevel: options.correctionLevel + }, + async (error, url) => { + // The original callback never checked `error`, so a QR generation + // failure (e.g. text too long for the chosen correction level) + // would silently try to fetch `undefined` and throw a confusing + // error instead. Surface it properly here. + if (error) { + reject(error); + return; + } + try { + const res = await fetch(url); + const blob = await res.blob(); + const file = new File([blob], 'qr-code.png', { type: 'image/png' }); + resolve(file); + } catch (fetchErr) { + reject(fetchErr); + } + } + ); + }); +} From 4241ca674640b479dc7d54e3dc099f46188721d2 Mon Sep 17 00:00:00 2001 From: Chesterkxng Date: Fri, 31 Jul 2026 15:07:26 +0200 Subject: [PATCH 4/5] chore: confilct resolved --- .../tools/image/generic/qr-code/index.tsx | 97 +++++++++++++------ 1 file changed, 67 insertions(+), 30 deletions(-) diff --git a/src/pages/tools/image/generic/qr-code/index.tsx b/src/pages/tools/image/generic/qr-code/index.tsx index c88b78c0..4cc5804f 100644 --- a/src/pages/tools/image/generic/qr-code/index.tsx +++ b/src/pages/tools/image/generic/qr-code/index.tsx @@ -107,7 +107,7 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('size', val)} - description="Size in pixels (100-1000)" + description={t('qrCode.groups.settings.size.description')} inputProps={{ type: 'number', min: 100, @@ -165,7 +165,7 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('url', val)} - description="Enter the URL" + description={t('qrCode.groups.details.url.description')} inputProps={{ placeholder: t('qrCode.groups.details.url.placeholder') }} @@ -176,11 +176,11 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('text', val)} - description="Enter the text" + description={t('qrCode.groups.details.text.description')} multiline rows={4} inputProps={{ - placeholder: 'Enter your text here' + placeholder: t('qrCode.groups.details.text.placeholder') }} /> )} @@ -190,7 +190,9 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('emailAddress', val)} - description="Email Address" + description={t( + 'qrCode.groups.details.email.address.description' + )} inputProps={{ placeholder: t( 'qrCode.groups.details.email.address.placeholder' @@ -201,7 +203,9 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('emailSubject', val)} - description="Email Subject (optional)" + description={t( + 'qrCode.groups.details.email.subject.description' + )} inputProps={{ placeholder: t( 'qrCode.groups.details.email.subject.placeholder' @@ -211,7 +215,9 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('emailBody', val)} - description="Email Body (optional)" + description={t( + 'qrCode.groups.details.email.body.description' + )} multiline rows={4} inputProps={{ @@ -227,7 +233,7 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('phoneNumber', val)} - description="Phone Number" + description={t('qrCode.groups.details.phone.description')} inputProps={{ placeholder: t('qrCode.groups.details.phone.placeholder'), type: 'tel' @@ -240,7 +246,9 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('smsNumber', val)} - description="Phone Number" + description={t( + 'qrCode.groups.details.sms.number.description' + )} inputProps={{ placeholder: t( 'qrCode.groups.details.sms.number.placeholder' @@ -251,11 +259,15 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('smsMessage', val)} - description="Message (optional)" + description={t( + 'qrCode.groups.details.sms.message.description' + )} multiline rows={4} inputProps={{ - placeholder: 'Your message here' + placeholder: t( + 'qrCode.groups.details.sms.message.placeholder' + ) }} /> @@ -266,17 +278,23 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('wifiSsid', val)} - description="Network Name (SSID)" + description={t('qrCode.groups.details.wifi.ssid.description')} inputProps={{ - placeholder: 'Network name' + placeholder: t( + 'qrCode.groups.details.wifi.ssid.placeholder' + ) }} /> updateField('wifiPassword', val)} - description="Password" + description={t( + 'qrCode.groups.details.wifi.password.description' + )} inputProps={{ - placeholder: 'Password', + placeholder: t( + 'qrCode.groups.details.wifi.password.placeholder' + ), type: 'password' }} /> @@ -290,12 +308,18 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { e.target.value as WifiEncryptionType ) } - label="Encryption Type" + label={t('qrCode.groups.details.wifi.encryption.label')} margin="normal" > - WPA - WEP - None + + {t('qrCode.groups.details.wifi.encryption.options.wpa')} + + + {t('qrCode.groups.details.wifi.encryption.options.wep')} + + + {t('qrCode.groups.details.wifi.encryption.options.none')} + )} @@ -305,7 +329,9 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('vCardName', val)} - description="Full Name" + description={t( + 'qrCode.groups.details.vcard.name.description' + )} inputProps={{ placeholder: t( 'qrCode.groups.details.vcard.name.placeholder' @@ -315,7 +341,9 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('vCardEmail', val)} - description="Email" + description={t( + 'qrCode.groups.details.vcard.email.description' + )} inputProps={{ placeholder: t( 'qrCode.groups.details.vcard.email.placeholder' @@ -326,7 +354,9 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('vCardPhone', val)} - description="Phone" + description={t( + 'qrCode.groups.details.vcard.phone.description' + )} inputProps={{ placeholder: t( 'qrCode.groups.details.vcard.phone.placeholder' @@ -337,7 +367,9 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('vCardAddress', val)} - description="Address" + description={t( + 'qrCode.groups.details.vcard.address.description' + )} inputProps={{ placeholder: t( 'qrCode.groups.details.vcard.address.placeholder' @@ -347,7 +379,9 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('vCardCompany', val)} - description="Company (optional)" + description={t( + 'qrCode.groups.details.vcard.company.description' + )} inputProps={{ placeholder: t( 'qrCode.groups.details.vcard.company.placeholder' @@ -357,7 +391,9 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('vCardTitle', val)} - description="Job Title (optional)" + description={t( + 'qrCode.groups.details.vcard.title.description' + )} inputProps={{ placeholder: t( 'qrCode.groups.details.vcard.title.placeholder' @@ -367,7 +403,9 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { updateField('vCardWebsite', val)} - description="Website (optional)" + description={t( + 'qrCode.groups.details.vcard.website.description' + )} inputProps={{ placeholder: t( 'qrCode.groups.details.vcard.website.placeholder' @@ -401,12 +439,11 @@ export default function QRCodeGenerator({ title }: ToolComponentProps) { getGroups={getGroups} compute={debouncedCompute} resultComponent={ - + } toolInfo={{ - title: 'QR Code Generator', - description: - 'Generate QR codes for different data types: URL, Text, Email, Phone, SMS, WiFi, vCard, and more. Customize the size and colors to create the perfect QR code for your needs.' + title: t('qrCode.title'), + description: t('qrCode.longDescription') }} /> ); From 46d3df1a07b7293631ed1ec3e311a8c70803dbe9 Mon Sep 17 00:00:00 2001 From: Chesterkxng Date: Fri, 31 Jul 2026 15:43:12 +0200 Subject: [PATCH 5/5] chore: restored package lock from main --- package-lock.json | 41 ++--------------------------------------- 1 file changed, 2 insertions(+), 39 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3bbdb937..919848c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -589,7 +589,6 @@ "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.14.0.tgz", "integrity": "sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==", "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.13.5", @@ -633,7 +632,6 @@ "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.14.1.tgz", "integrity": "sha512-qEEJt42DuToa3gurlH4Qqc1kVpNq8wO8cJtDzU46TjlzWjDlsVyevtYCRijVq3SrHsROS+gVQ8Fnea108GnKzw==", "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.13.5", @@ -1583,7 +1581,6 @@ "resolved": "https://registry.npmjs.org/@jimp/custom/-/custom-0.22.12.tgz", "integrity": "sha512-xcmww1O/JFP2MrlGUMd3Q78S3Qu6W3mYTXYuIqFq33EorgYHV/HqymHfXy9GjiCJ7OI+7lWx6nYFOzU7M4rd1Q==", "license": "MIT", - "peer": true, "dependencies": { "@jimp/core": "^0.22.12" } @@ -1620,7 +1617,6 @@ "resolved": "https://registry.npmjs.org/@jimp/plugin-blit/-/plugin-blit-0.22.12.tgz", "integrity": "sha512-xslz2ZoFZOPLY8EZ4dC29m168BtDx95D6K80TzgUi8gqT7LY6CsajWO0FAxDwHz6h0eomHMfyGX0stspBrTKnQ==", "license": "MIT", - "peer": true, "dependencies": { "@jimp/utils": "^0.22.12" }, @@ -1633,7 +1629,6 @@ "resolved": "https://registry.npmjs.org/@jimp/plugin-blur/-/plugin-blur-0.22.12.tgz", "integrity": "sha512-S0vJADTuh1Q9F+cXAwFPlrKWzDj2F9t/9JAbUvaaDuivpyWuImEKXVz5PUZw2NbpuSHjwssbTpOZ8F13iJX4uw==", "license": "MIT", - "peer": true, "dependencies": { "@jimp/utils": "^0.22.12" }, @@ -1658,7 +1653,6 @@ "resolved": "https://registry.npmjs.org/@jimp/plugin-color/-/plugin-color-0.22.12.tgz", "integrity": "sha512-xImhTE5BpS8xa+mAN6j4sMRWaUgUDLoaGHhJhpC+r7SKKErYDR0WQV4yCE4gP+N0gozD0F3Ka1LUSaMXrn7ZIA==", "license": "MIT", - "peer": true, "dependencies": { "@jimp/utils": "^0.22.12", "tinycolor2": "^1.6.0" @@ -1702,7 +1696,6 @@ "resolved": "https://registry.npmjs.org/@jimp/plugin-crop/-/plugin-crop-0.22.12.tgz", "integrity": "sha512-FNuUN0OVzRCozx8XSgP9MyLGMxNHHJMFt+LJuFjn1mu3k0VQxrzqbN06yIl46TVejhyAhcq5gLzqmSCHvlcBVw==", "license": "MIT", - "peer": true, "dependencies": { "@jimp/utils": "^0.22.12" }, @@ -1826,7 +1819,6 @@ "resolved": "https://registry.npmjs.org/@jimp/plugin-resize/-/plugin-resize-0.22.12.tgz", "integrity": "sha512-3NyTPlPbTnGKDIbaBgQ3HbE6wXbAlFfxHVERmrbqAi8R3r6fQPxpCauA8UVDnieg5eo04D0T8nnnNIX//i/sXg==", "license": "MIT", - "peer": true, "dependencies": { "@jimp/utils": "^0.22.12" }, @@ -1839,7 +1831,6 @@ "resolved": "https://registry.npmjs.org/@jimp/plugin-rotate/-/plugin-rotate-0.22.12.tgz", "integrity": "sha512-9YNEt7BPAFfTls2FGfKBVgwwLUuKqy+E8bDGGEsOqHtbuhbshVGxN2WMZaD4gh5IDWvR+emmmPPWGgaYNYt1gA==", "license": "MIT", - "peer": true, "dependencies": { "@jimp/utils": "^0.22.12" }, @@ -1855,7 +1846,6 @@ "resolved": "https://registry.npmjs.org/@jimp/plugin-scale/-/plugin-scale-0.22.12.tgz", "integrity": "sha512-dghs92qM6MhHj0HrV2qAwKPMklQtjNpoYgAB94ysYpsXslhRTiPisueSIELRwZGEr0J0VUxpUY7HgJwlSIgGZw==", "license": "MIT", - "peer": true, "dependencies": { "@jimp/utils": "^0.22.12" }, @@ -2086,7 +2076,6 @@ "resolved": "https://registry.npmjs.org/@mui/material/-/material-5.18.0.tgz", "integrity": "sha512-bbH/HaJZpFtXGvWg3TsBWG4eyt3gah3E7nCNU8GLyRjVoWcA91Vm/T+sjHfUcwgJSw9iLtucfHBoq+qW/T30aA==", "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.23.9", "@mui/core-downloads-tracker": "^5.18.0", @@ -3494,7 +3483,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.19.tgz", "integrity": "sha512-pb1Uqj5WJP7wrcbLU7Ru4QtA0+3kAXrkutGiD26wUKzSMgNNaPARTUDQmElUXp64kh3cWdou3Q0C7qwwxqSFmg==", "license": "MIT", - "peer": true, "dependencies": { "undici-types": "~6.21.0" } @@ -3543,7 +3531,6 @@ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.25.tgz", "integrity": "sha512-oSVZmGtDPmRZtVDqvdKUi/qgCsWp5IDY29wp8na8Bj4B3cc99hfNzvNhlMkVVxctkAOGUA3Km7MMpBHAnWfcIA==", "license": "MIT", - "peer": true, "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" @@ -3554,7 +3541,6 @@ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", "license": "MIT", - "peer": true, "peerDependencies": { "@types/react": "^18.0.0" } @@ -3658,7 +3644,6 @@ "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", "dev": true, "license": "BSD-2-Clause", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "6.21.0", "@typescript-eslint/types": "6.21.0", @@ -3938,7 +3923,6 @@ "integrity": "sha512-xa57bCPGuzEFqGjPs3vVLyqareG8DX0uMkr5U/v5vLv5/ZUrBrPL7gzxzTJedEyZxFMfsozwTIbbYfEQVo3kgg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@vitest/utils": "1.6.1", "fast-glob": "^3.3.2", @@ -4011,7 +3995,6 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -4603,7 +4586,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.8.9", "caniuse-lite": "^1.0.30001746", @@ -5254,7 +5236,6 @@ "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", @@ -5415,8 +5396,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/csvjson": { "version": "5.1.0", @@ -6204,7 +6184,6 @@ "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -6261,7 +6240,6 @@ "integrity": "sha512-iI1f+D2ViGn+uvv5HuHVUamg8ll4tN+JRHGc6IJi4TP9Kl976C57fzPXgseXNs8v0iA8aSJpHsTWjDb9QJamGQ==", "dev": true, "license": "MIT", - "peer": true, "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -7534,7 +7512,6 @@ "integrity": "sha512-JzUXOh0wdNGY54oKng5hliuBkq/+aT1V3YpTM+lrN/GoLQTANZsMaIvmHiHe612rauHvPJnDZkZ+5GZR++1Abg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "css.escape": "^1.5.1", "entities": "^4.5.0", @@ -7764,7 +7741,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.27.6" }, @@ -8812,8 +8788,7 @@ "url": "https://github.com/sponsors/lavrton" } ], - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/laravelphp": { "version": "2.0.4", @@ -9574,7 +9549,6 @@ "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.53.0.tgz", "integrity": "sha512-0WNThgC6CMWNXXBxTbaYYcunj08iB5rnx4/G56UOPeL9UVIUGGHA1GR0EWIh9Ebabj7NpCRawQ5b0hfN1jQmYQ==", "license": "MIT", - "peer": true, "dependencies": { "@types/trusted-types": "^1.0.6" } @@ -9958,7 +9932,6 @@ "resolved": "https://registry.npmjs.org/onnxruntime-web/-/onnxruntime-web-1.21.0.tgz", "integrity": "sha512-adzOe+7uI7lKz6pQNbAsLMQd2Fq5Jhmoxd8LZjJr8m3KvbFyiYyRxRiC57/XXD+jb18voppjeGAjoZmskXG+7A==", "license": "MIT", - "peer": true, "dependencies": { "flatbuffers": "^25.1.24", "guid-typescript": "^1.0.9", @@ -10490,7 +10463,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -10649,7 +10621,6 @@ "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==", "dev": true, "license": "MIT", - "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -11098,7 +11069,6 @@ "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "license": "MIT", - "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -11111,7 +11081,6 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "license": "MIT", - "peer": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" @@ -11243,7 +11212,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "@types/react-reconciler": "^0.28.2", "its-fine": "^1.1.1", @@ -12637,7 +12605,6 @@ "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.19.tgz", "integrity": "sha512-1v/e3Dl1BknC37cXMhwGomhO8AkYmN41CqyX9xhUDxry1ns3BFQy2lLDRQXJRdVVWB9OHemv/53xaStimvWyuA==", "license": "MIT", - "peer": true, "dependencies": { "@emotion/is-prop-valid": "1.2.2", "@emotion/unitless": "0.8.1", @@ -12864,7 +12831,6 @@ "integrity": "sha512-6A2rnmW5xZMdw11LYjhcI5846rt9pbLSabY5XPxo+XWdxwZaFEn47Go4NzFiHu9sNNmr/kXivP1vStfvMaK1GQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", @@ -13300,7 +13266,6 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "devOptional": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -13448,7 +13413,6 @@ "integrity": "sha512-j3lYzGC3P+B5Yfy/pfKNgVEg4+UtcIJcVRt2cDjIOmhLourAqPqf8P7acgxeiSgUB7E3p2P8/3gNIgDLpwzs4g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", @@ -13567,7 +13531,6 @@ "integrity": "sha512-Ljb1cnSJSivGN0LqXd/zmDbWEM0RNNg2t1QW/XUhYl/qPqyu7CsqeWtqQXHVaJsecLPuDoak2oJcZN2QoRIOag==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@vitest/expect": "1.6.1", "@vitest/runner": "1.6.1",