From 23f50ffead50be3567b73855f123acf2ed09eaa5 Mon Sep 17 00:00:00 2001 From: "Ibrahima G. Coulibaly" Date: Sat, 22 Jun 2024 22:06:16 +0100 Subject: [PATCH] feat: tools normalized --- .eslintrc | 7 +- .github/workflows/ci.yml | 5 +- .idea/workspace.xml | 113 +- .vitest/setup.ts | 2 +- index.html | 22 +- pnpm-lock.yaml | 3083 ++++++++++++----- postcss.config.mjs | 2 +- src/components/App.tsx | 7 +- src/components/Loading.tsx | 23 +- src/components/Navbar/index.tsx | 37 +- src/components/ToolHeader.tsx | 26 +- src/components/input/ToolTextInput.tsx | 24 +- src/config/routesConfig.tsx | 29 +- src/hooks/useDebounce.ts | 8 +- src/hooks/usePrevious.ts | 2 +- src/hooks/useTimeout.ts | 4 +- src/hooks/useUpdateEffect.ts | 2 +- src/index.tsx | 12 +- src/pages/home/index.tsx | 131 +- src/pages/images/ImagesConfig.tsx | 10 - src/pages/images/imageTools.ts | 3 + src/pages/images/index.tsx | 4 +- src/pages/images/png/PngConfig.tsx | 10 - .../images/png/change-colors-in-png/index.tsx | 2 +- .../images/png/change-colors-in-png/meta.ts | 11 + src/pages/images/png/index.tsx | 4 +- src/pages/images/png/pngTools.ts | 3 + src/pages/string/StringConfig.tsx | 10 - src/pages/string/index.tsx | 4 +- src/pages/string/split/index.tsx | 9 +- src/pages/string/split/meta.ts | 11 + src/pages/string/stringTools.ts | 3 + src/tools/defineTool.tsx | 39 + src/tools/index.ts | 4 + src/utils/index.ts | 2 +- tailwind.config.mjs | 2 +- 36 files changed, 2625 insertions(+), 1045 deletions(-) delete mode 100644 src/pages/images/ImagesConfig.tsx create mode 100644 src/pages/images/imageTools.ts delete mode 100644 src/pages/images/png/PngConfig.tsx create mode 100644 src/pages/images/png/change-colors-in-png/meta.ts create mode 100644 src/pages/images/png/pngTools.ts delete mode 100644 src/pages/string/StringConfig.tsx create mode 100644 src/pages/string/split/meta.ts create mode 100644 src/pages/string/stringTools.ts create mode 100644 src/tools/defineTool.tsx create mode 100644 src/tools/index.ts diff --git a/.eslintrc b/.eslintrc index b03a663..6a44f8c 100644 --- a/.eslintrc +++ b/.eslintrc @@ -26,12 +26,7 @@ "ecmaVersion": 11, "sourceType": "module" }, - "plugins": [ - "react", - "react-hooks", - "@typescript-eslint", - "tailwindcss" - ], + "plugins": ["react", "react-hooks", "@typescript-eslint", "tailwindcss"], "rules": { "react-hooks/rules-of-hooks": "error", "react-hooks/exhaustive-deps": "warn", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e91d86d..2c01767 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: CI on: push: branches: - - main # or the branch you want to trigger the workflow on + - main # or the branch you want to trigger the workflow on pull_request: branches: - main @@ -19,7 +19,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: '18' # Specify the Node.js version you want to use + node-version: '18' # Specify the Node.js version you want to use - name: Install dependencies run: npm install @@ -42,4 +42,3 @@ jobs: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} timeout-minutes: 1 - diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 9667f3b..5d23cdc 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,15 +4,43 @@