diff --git a/.changeset/afraid-walls-pay.md b/.changeset/afraid-walls-pay.md deleted file mode 100644 index 6972d93..0000000 --- a/.changeset/afraid-walls-pay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"typer-diff": patch ---- - -update readme diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d796121 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Shivram Sambhus + +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 26c8778..32cf208 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Typer Diff -![Typer Diff Demo](https://typer-diff.shivi.io/demo.png) +![Typer Diff Demo](https://typer-diff.vercel.app/demo.png) -`type-diff` is a library to diff two strings, useful for showing for typing games (like [monkeytype](https://monkeytype.com/)) or for showing differences between two strings. It is a simple library that is easy to use and has no dependencies. It is also very fast and lightweight. +`typer-diff` is a library to diff two strings, useful for showing for typing games (like [monkeytype](https://monkeytype.com/)) or for showing differences between two strings. It is a simple library that is easy to use and has no dependencies. It is also very fast and lightweight. -Check out a demo at [typer-diff.shivi.io](https://typer-diff.shivi.io/). +Check out a demo at [typer-diff.vercel.app](https://typer-diff.vercel.app/). ## Usage **Usage:** diff --git a/apps/docs/CHANGELOG.md b/apps/docs/CHANGELOG.md index 0dfaf94..4d831b4 100644 --- a/apps/docs/CHANGELOG.md +++ b/apps/docs/CHANGELOG.md @@ -1,5 +1,46 @@ # docs +## 0.1.9 + +### Patch Changes + +- Updated dependencies [e216117] + - typer-diff@1.1.1 + +## 0.1.8 + +### Patch Changes + +- Updated dependencies [1b8c7c7] + - typer-diff@1.1.0 + +## 0.1.7 + +### Patch Changes + +- 88bc86c: fix for mobile + +## 0.1.6 + +### Patch Changes + +- Updated dependencies [96c815e] + - typer-diff@1.0.3 + +## 0.1.5 + +### Patch Changes + +- Updated dependencies [c3fa793] + - typer-diff@1.0.2 + +## 0.1.4 + +### Patch Changes + +- Updated dependencies [515b678] + - typer-diff@1.0.1 + ## 0.1.3 ### Patch Changes diff --git a/apps/docs/README.md b/apps/docs/README.md index 09f0cee..26f9687 100644 --- a/apps/docs/README.md +++ b/apps/docs/README.md @@ -1,11 +1,11 @@ # Typer Diff Demo App -![Typer Diff Demo](https://typer-diff.shivi.io/demo.png) +![Typer Diff Demo](https://typer-diff.vercel.app/demo.png) -`type-diff` is a library to diff two strings, useful for showing for typing games or for showing differences between two strings. It is a simple library that is easy to use and has no dependencies. It is also very fast and lightweight. +`typer-diff` is a library to diff two strings, useful for showing for typing games or for showing differences between two strings. It is a simple library that is easy to use and has no dependencies. It is also very fast and lightweight. ## Demo App This is a simple Next.js app that uses the `typer-diff` library to show an input field where you can type and see the diff between the original text and the typed text. (Similar to typing games like [monkeytype](https://monkeytype.com/)). -Check out a demo at [typer-diff.shivi.io](https://typer-diff.shivi.io/). \ No newline at end of file +Check out a demo at [typer-diff.vercel.app](https://typer-diff.vercel.app/). \ No newline at end of file diff --git a/apps/docs/app/components/DiffText.tsx b/apps/docs/app/components/DiffText.tsx index 3509064..b72388a 100644 --- a/apps/docs/app/components/DiffText.tsx +++ b/apps/docs/app/components/DiffText.tsx @@ -10,6 +10,7 @@ export default function DiffText() { const [typing, setTyping] = useAtom(isTyping); const ref = useRef(null); useClickInside(ref, () => { + document.getElementById("hidden-input")?.focus(); setTyping(true); }); useClickOutside(ref, () => { @@ -17,7 +18,7 @@ export default function DiffText() { }); return (
{diff.diff.map((item, index) => ( { if (allow) { setText((text) => { diff --git a/apps/docs/app/layout.tsx b/apps/docs/app/layout.tsx index 7e450b0..0114c77 100644 --- a/apps/docs/app/layout.tsx +++ b/apps/docs/app/layout.tsx @@ -7,7 +7,7 @@ const inter = Inter({ subsets: ["latin"] }); export const metadata: Metadata = { title: "typer-diff", description: - "type-diff is a library to diff two strings, useful for showing for typing games or for showing differences between two strings. It is a simple library that is easy to use and has no dependencies. It is also very fast and lightweight.", + "typer-diff is a library to diff two strings, useful for showing for typing games or for showing differences between two strings. It is a simple library that is easy to use and has no dependencies. It is also very fast and lightweight.", }; export default function RootLayout({ @@ -18,8 +18,8 @@ export default function RootLayout({ return ( -