From 1badcee01c0b27b47a41f5687bba956cd9dd8715 Mon Sep 17 00:00:00 2001 From: Vineet Agarwal <91052168+VineeTagarwaL-code@users.noreply.github.com> Date: Mon, 26 May 2025 00:07:48 +0530 Subject: [PATCH 1/3] feat: - Refactored whole projects - Integrated Tailwind - Custom translation widget with new ui --- .gitignore | 3 +- LICENSE | 21 + README.md | 82 - bun.lock | 1157 ++++ components.json | 17 + examples/nextjs/README.md | 84 - index.html | 176 +- language.json | 938 ---- package-lock.json | 7031 +++++++++++++++++++++++++ postcss.config.js | 7 + src/App.css | 42 + src/App.tsx | 15 + src/components/translation/widget.tsx | 300 ++ src/components/ui/badge.tsx | 36 + src/components/ui/button.tsx | 56 + src/components/ui/dropdown-menu.tsx | 198 + src/components/ui/input.tsx | 26 + src/components/ui/scroll-area.tsx | 46 + src/constants/languages.ts | 721 +++ src/embed.tsx | 21 + src/index.css | 84 + src/lib/utils.ts | 17 + src/main.tsx | 10 + src/vite-env.d.ts | 1 + tailwind.config.js | 77 + translate-widget.js | 590 --- tsconfig.json | 28 + tsconfig.node.json | 10 + vite.config.ts | 33 + 29 files changed, 9968 insertions(+), 1859 deletions(-) create mode 100644 LICENSE create mode 100644 bun.lock create mode 100644 components.json delete mode 100644 examples/nextjs/README.md delete mode 100644 language.json create mode 100644 package-lock.json create mode 100644 postcss.config.js create mode 100644 src/App.css create mode 100644 src/App.tsx create mode 100644 src/components/translation/widget.tsx create mode 100644 src/components/ui/badge.tsx create mode 100644 src/components/ui/button.tsx create mode 100644 src/components/ui/dropdown-menu.tsx create mode 100644 src/components/ui/input.tsx create mode 100644 src/components/ui/scroll-area.tsx create mode 100644 src/constants/languages.ts create mode 100644 src/embed.tsx create mode 100644 src/index.css create mode 100644 src/lib/utils.ts create mode 100644 src/main.tsx create mode 100644 src/vite-env.d.ts create mode 100644 tailwind.config.js delete mode 100644 translate-widget.js create mode 100644 tsconfig.json create mode 100644 tsconfig.node.json create mode 100644 vite.config.ts diff --git a/.gitignore b/.gitignore index 3d4e5a1..348d1fc 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ server.js yarn.lock app/ scripts.js -new-language.json \ No newline at end of file +new-language.json +dist/ \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7aae09a --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Alejandro Vera + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 0c3807b..e69de29 100644 --- a/README.md +++ b/README.md @@ -1,82 +0,0 @@ -# JigsawStack Translation Widget - -This guide will help you integrate the Translation Widget into your website. - - -## Prerequisites -- A valid public key (obtain from your [JigsawStack dashboard](https://jigsawstack.com)) - -## Installation Steps - -### 1. Add the Widget Script -Add the following code to your HTML file, just before the closing `
- - - - - -` tag: - -```html - - -``` - -### 2. Initialize the Widget -Add the initialization code after the widget script: - -```html - -``` - -Replace `YOUR_PUBLIC_KEY_HERE` with your actual public key. - -### Complete Example -Here's a minimal working example: - -```html - - -
-
- -
-