From 97f5880f4c2222c112ed668f34871896c9d9a4ae Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Mon, 3 Feb 2025 15:16:18 +0000 Subject: [PATCH 1/3] 3.0.39 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 10a54a2d..d47b2c8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "utopia-ui", - "version": "3.0.38", + "version": "3.0.39", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "utopia-ui", - "version": "3.0.38", + "version": "3.0.39", "license": "GPL-3.0-only", "dependencies": { "@heroicons/react": "^2.0.17", diff --git a/package.json b/package.json index 67b77dd0..8454d06f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "utopia-ui", - "version": "3.0.38", + "version": "3.0.39", "description": "Reuseable React Components to build mapping apps for real life communities and networks", "repository": "https://github.com/utopia-os/utopia-ui", "homepage:": "https://utopia-os.org/", From a8ad09fab7ca5078833d2fb4b3b63c281467ff95 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Tue, 4 Feb 2025 12:44:59 +0000 Subject: [PATCH 2/3] removed tributejs --- package-lock.json | 6 ------ package.json | 1 - src/Components/Input/TextAreaInput.tsx | 30 +------------------------- 3 files changed, 1 insertion(+), 36 deletions(-) diff --git a/package-lock.json b/package-lock.json index 36eb18f1..2fb5309b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,6 @@ "react-string-replace": "^1.1.1", "react-toastify": "^9.1.3", "remark-breaks": "^4.0.0", - "tributejs": "github:coreydales/tribute#Fix-compile-error-T-does-not-satisfy-the-constraint", "tw-elements": "^1.0.0", "yet-another-react-lightbox": "^3.21.7" }, @@ -7728,11 +7727,6 @@ "node": ">=8.0" } }, - "node_modules/tributejs": { - "version": "5.1.3", - "resolved": "git+ssh://git@github.com/coreydales/tribute.git#126b8fcc9addc673946dc78d8f6bda08ac73c9a3", - "license": "MIT" - }, "node_modules/trim-lines": { "version": "3.0.1", "license": "MIT", diff --git a/package.json b/package.json index 1e7e7d9f..a47e458f 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,6 @@ "react-string-replace": "^1.1.1", "react-toastify": "^9.1.3", "remark-breaks": "^4.0.0", - "tributejs": "github:coreydales/tribute#Fix-compile-error-T-does-not-satisfy-the-constraint", "tw-elements": "^1.0.0", "yet-another-react-lightbox": "^3.21.7" }, diff --git a/src/Components/Input/TextAreaInput.tsx b/src/Components/Input/TextAreaInput.tsx index 3369e792..d817e87b 100644 --- a/src/Components/Input/TextAreaInput.tsx +++ b/src/Components/Input/TextAreaInput.tsx @@ -2,8 +2,7 @@ /* eslint-disable @typescript-eslint/consistent-indexed-object-style */ /* eslint-disable @typescript-eslint/restrict-template-expressions */ /* eslint-disable @typescript-eslint/prefer-nullish-coalescing */ -import { useEffect, useRef, useState } from 'react' -import Tribute from 'tributejs' +import { useEffect, useRef, useState } from 'react' import { useTags } from '#components/Map/hooks/useTags' @@ -37,9 +36,6 @@ export function TextAreaInput({ const ref = useRef(null) const [inputValue, setInputValue] = useState(defaultValue) - // prevent react18 from calling useEffect twice - const init = useRef(false) - const tags = useTags() const values: KeyValue[] = [] @@ -48,30 +44,6 @@ export function TextAreaInput({ values.push({ key: tag.name, value: tag.name, color: tag.color }) }) - const tribute = new Tribute({ - containerClass: 'tw-z-3000 tw-bg-base-100 tw-p-2 tw-rounded-lg tw-shadow', - selectClass: 'tw-font-bold', - trigger: '#', - values, - menuShowMinLength: 3, - noMatchTemplate: () => { - return '' - }, - menuItemTemplate: function (item) { - return `#${item.string}` - }, - }) - - useEffect(() => { - if (!init.current) { - if (ref.current) { - tribute.attach(ref.current) - } - init.current = true - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [ref]) - useEffect(() => { setInputValue(defaultValue) }, [defaultValue]) From ec9f08600048218400624ff06c7c1ab9e9ef48f6 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Tue, 4 Feb 2025 12:47:53 +0000 Subject: [PATCH 3/3] fix linting --- src/Components/Input/TextAreaInput.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Input/TextAreaInput.tsx b/src/Components/Input/TextAreaInput.tsx index d817e87b..8b0b940b 100644 --- a/src/Components/Input/TextAreaInput.tsx +++ b/src/Components/Input/TextAreaInput.tsx @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/consistent-indexed-object-style */ /* eslint-disable @typescript-eslint/restrict-template-expressions */ /* eslint-disable @typescript-eslint/prefer-nullish-coalescing */ -import { useEffect, useRef, useState } from 'react' +import { useEffect, useRef, useState } from 'react' import { useTags } from '#components/Map/hooks/useTags'