diff --git a/package-lock.json b/package-lock.json index 28afc52f..ad4ca56d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,8 +12,7 @@ "@mdi/font": "^5.9.55", "@supabase/supabase-js": "^2.38.0", "@twa-dev/sdk": "^6.9.0", - "@types/luxon": "^3.3.2", - "@types/sanitize-html": "^2.9.5", + "autosize": "^6.0.1", "colord": "^2.9.3", "framer-motion": "^10.16.4", "grammy": "^1.19.1", @@ -37,9 +36,12 @@ "devDependencies": { "@cloudflare/workers-types": "^4.20231002.0", "@peculiar/webcrypto": "^1.4.3", + "@types/autosize": "^4.0.3", + "@types/luxon": "^3.4.0", "@types/node": "^20.8.0", "@types/react": "^18.2.15", "@types/react-dom": "^18.2.7", + "@types/sanitize-html": "^2.9.5", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", "@vitejs/plugin-react": "^4.0.3", @@ -1393,6 +1395,12 @@ "resolved": "https://registry.npmjs.org/@twa-dev/types/-/types-6.9.0.tgz", "integrity": "sha512-hBkIuJgVtkLAPPhKsNfgyBpgS+15spzUScy5jgpfPJPqXPaaUVDTaWHbeEUU+lUgHmryeQjWyz+UjS7987Pyaw==" }, + "node_modules/@types/autosize": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/autosize/-/autosize-4.0.3.tgz", + "integrity": "sha512-o0ZyU3ePp3+KRbhHsY4ogjc+ZQWgVN5h6j8BHW5RII4cFKi6PEKK9QPAcphJVkD0dGpyFnD3VRR0WMvHVjCv9w==", + "dev": true + }, "node_modules/@types/babel__core": { "version": "7.20.2", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.2.tgz", @@ -1462,9 +1470,10 @@ "dev": true }, "node_modules/@types/luxon": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.3.2.tgz", - "integrity": "sha512-l5cpE57br4BIjK+9BSkFBOsWtwv6J9bJpC7gdXIzZyI0vuKvNTk0wZZrkQxMGsUAuGW9+WMNWF2IJMD7br2yeQ==" + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.4.0.tgz", + "integrity": "sha512-PEVoA4MOfSsFNaPrZjIUGUZujBDxnO/tj2A2N9KfzlR+pNgpBdDuk0TmRvSMAVUP5q4q8IkMEZ8UOp3MIr+QgA==", + "dev": true }, "node_modules/@types/node": { "version": "20.8.0", @@ -1511,6 +1520,7 @@ "version": "2.9.5", "resolved": "https://registry.npmjs.org/@types/sanitize-html/-/sanitize-html-2.9.5.tgz", "integrity": "sha512-2Sr1vd8Dw+ypsg/oDDfZ57OMSG2Befs+l2CMyCC5bVSK3CpE7lTB2aNlbbWzazgVA+Qqfuholwom6x/mWd1qmw==", + "dev": true, "dependencies": { "htmlparser2": "^8.0.0" } @@ -2035,6 +2045,11 @@ "node": "*" } }, + "node_modules/autosize": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/autosize/-/autosize-6.0.1.tgz", + "integrity": "sha512-f86EjiUKE6Xvczc4ioP1JBlWG7FKrE13qe/DxBCpe8GCipCq2nFw73aO8QEBKHfSbYGDN5eB9jXWKen7tspDqQ==" + }, "node_modules/babel-plugin-macros": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", diff --git a/package.json b/package.json index 99c501db..b572c996 100644 --- a/package.json +++ b/package.json @@ -29,8 +29,7 @@ "@mdi/font": "^5.9.55", "@supabase/supabase-js": "^2.38.0", "@twa-dev/sdk": "^6.9.0", - "@types/luxon": "^3.3.2", - "@types/sanitize-html": "^2.9.5", + "autosize": "^6.0.1", "colord": "^2.9.3", "framer-motion": "^10.16.4", "grammy": "^1.19.1", @@ -54,9 +53,12 @@ "devDependencies": { "@cloudflare/workers-types": "^4.20231002.0", "@peculiar/webcrypto": "^1.4.3", + "@types/autosize": "^4.0.3", + "@types/luxon": "^3.4.0", "@types/node": "^20.8.0", "@types/react": "^18.2.15", "@types/react-dom": "^18.2.7", + "@types/sanitize-html": "^2.9.5", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", "@vitejs/plugin-react": "^4.0.3", diff --git a/src/screens/deck-catalog/deck-catalog.tsx b/src/screens/deck-catalog/deck-catalog.tsx index c6f2e18b..99fab0d5 100644 --- a/src/screens/deck-catalog/deck-catalog.tsx +++ b/src/screens/deck-catalog/deck-catalog.tsx @@ -13,7 +13,7 @@ import { } from "./store/deck-catalog-store.ts"; import { DeckListItemWithDescription } from "../../ui/deck-list-item-with-description.tsx"; import { range } from "../../lib/array/range.ts"; -import { DeckLoading } from "../deck-list/deck-loading.tsx"; +import { DeckLoading } from "../shared/deck-loading.tsx"; import { NoDecksMatchingFilters } from "./no-decks-matching-filters.tsx"; import { deckListStore } from "../../store/deck-list-store.ts"; import { DeckAddedLabel } from "./deck-added-label.tsx"; diff --git a/src/screens/deck-form/card-list.tsx b/src/screens/deck-form/card-list.tsx index 361a8825..01a3209c 100644 --- a/src/screens/deck-form/card-list.tsx +++ b/src/screens/deck-form/card-list.tsx @@ -11,6 +11,8 @@ import React from "react"; import { reset } from "../../ui/reset.ts"; import { t } from "../../translations/t.ts"; import { Screen } from "../shared/screen.tsx"; +import { motion } from "framer-motion"; +import { whileTap } from "../../ui/animations.ts"; export const CardList = observer(() => { const deckFormStore = useDeckFormStore(); @@ -82,7 +84,8 @@ export const CardList = observer(() => { )} {deckFormStore.filteredCards.map((cardForm, i) => ( -
{ deckFormStore.editCardFormById(cardForm.id); }} @@ -98,7 +101,7 @@ export const CardList = observer(() => {
{cardForm.back.value}
-
+ ))}