diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7fba05b8d..22a9d53a3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,8 +32,6 @@ - [Svelte 5 UI lib](https://svelte-5-ui-lib.codewithshin.com/) - Svelte v5.xにおける[Flowbite Svelte](https://flowbite-svelte.com/)の代替ライブラリ。一部の属性名・値などが変更されていることに注意が必要 - コンポーネントが未実装である場合は、主に[Flowbite](https://flowbite.com/)を暫定的に利用する - [Embla Carousel](https://github.com/davidjerleke/embla-carousel) - Svelte 5 UI lib ではカルーセルコンポーネントが未実装(2025年2月時点)なため、暫定的に導入している - - Tailwind v4 に未対応(2025年2月時点)のため、[Skeleton](https://github.com/skeletonlabs/skeleton)などへ移行する可能性もある - - [STWUI](https://stwui.vercel.app/): 開発が事実上終了した可能性が高いため、使用しているコンポーネントを調べて別のライブラリに移行する - [Lucide](https://github.com/lucide-icons/lucide) - アイコンライブラリ - テスティングフレームワーク - [Vitest](https://vitest.dev/): 単体テスト (ユーティリティ、コンポーネント) diff --git a/package.json b/package.json index 0deaac74c..3e931b12d 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,6 @@ "prettier-plugin-svelte": "3.4.0", "prettier-plugin-tailwindcss": "0.6.12", "prisma": "5.22.0", - "stwui": "0.21.2-next", "super-sitemap": "1.0.3", "svelte": "5.34.6", "svelte-5-ui-lib": "0.12.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7521aa0d2..72149825b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -156,9 +156,6 @@ importers: prisma: specifier: 5.22.0 version: 5.22.0 - stwui: - specifier: 0.21.2-next - version: 0.21.2-next(@sveltejs/kit@2.21.5(@sveltejs/vite-plugin-svelte@5.1.0(svelte@5.34.6)(vite@6.3.5(@types/node@24.0.3)(jiti@1.21.6)(yaml@2.8.0)))(svelte@5.34.6)(vite@6.3.5(@types/node@24.0.3)(jiti@1.21.6)(yaml@2.8.0)))(svelte@5.34.6) super-sitemap: specifier: 1.0.3 version: 1.0.3(svelte@5.34.6) @@ -823,9 +820,6 @@ packages: resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} engines: {node: '>=14'} - '@floating-ui/core@1.6.2': - resolution: {integrity: sha512-+2XpQV9LLZeanU4ZevzRnGFg2neDeKHgFLjP6YLW+tly0IvrhqT4u8enLGjLH3qeh85g19xY5rsAusfwTdn5lg==} - '@floating-ui/core@1.6.9': resolution: {integrity: sha512-uMXCuQ3BItDUbAMhIXw7UPXRfAlOAvZzdK9BWpE60MCn+Svt3aLn9jsPTi/WNGlRUu2uI0v5S7JiIUsbsvh3fw==} @@ -835,9 +829,6 @@ packages: '@floating-ui/dom@1.6.13': resolution: {integrity: sha512-umqzocjDgNRGTuO7Q8CU32dkHkECqI8ZdMZ5Swb6QAM0t5rnlrN3lGo1hdpscRd3WS8T6DKYK4ephgIH9iRh3w==} - '@floating-ui/dom@1.6.5': - resolution: {integrity: sha512-Nsdud2X65Dz+1RHjAIP0t8z5e2ff/IRbei6BqFrl1urT8sDVzM1HMQ+R0XcU5ceRfyO3I6ayeqIfh+6Wb8LGTw==} - '@floating-ui/dom@1.7.1': resolution: {integrity: sha512-cwsmW/zyw5ltYTUeeYJ60CnQuPqmGwuGVhG9w0PRaRKkAyi38BT5CKrpIbb+jtahSwUl04cWzSx9ZOIxeS6RsQ==} @@ -2078,17 +2069,10 @@ packages: resolution: {integrity: sha512-SbtvAMWvASO5TE2QP07jHBMXKafgdZz8Vrsrn96fiL+O92/FN/PLARzUW5sKt013fjAprK2d2iCn2hk2Xb5oow==} engines: {node: '>=12.20'} - color-string@1.9.1: - resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} - color-string@2.0.1: resolution: {integrity: sha512-5z9FbYTZPAo8iKsNEqRNv+OlpBbDcoE+SY9GjLfDUHEfcNNV7tS9eSAlFHEaub/r5tBL9LtskAeq1l9SaoZ5tQ==} engines: {node: '>=18'} - color@4.2.3: - resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} - engines: {node: '>=12.5.0'} - colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} @@ -2343,9 +2327,6 @@ packages: resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} engines: {node: '>=18'} - dayjs@1.11.11: - resolution: {integrity: sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==} - dayjs@1.11.13: resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==} @@ -2711,9 +2692,6 @@ packages: jiti: optional: true - esm-env@1.0.0: - resolution: {integrity: sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==} - esm-env@1.2.2: resolution: {integrity: sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==} @@ -3057,9 +3035,6 @@ packages: is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - is-arrayish@0.3.2: - resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} - is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} @@ -3469,11 +3444,6 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - nanoid@5.0.7: - resolution: {integrity: sha512-oLxFY2gd2IqnjcYyOXD8XGCftpGtZP2AbHbOkthDkvRywH5ayNtPVy9YlOPcHckXzbLTCHpkb7FB+yuxKV13pQ==} - engines: {node: ^18 || >=20} - hasBin: true - natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} @@ -3955,9 +3925,6 @@ packages: ramda@0.28.0: resolution: {integrity: sha512-9QnLuG/kPVgWvMQ4aODhsBUFKOUmnbUnsSXACv+NCQZcHbeb+v8Lodp8OVxtRULN1/xOyYLLaL6npE6dMq5QTA==} - randomcolor@0.6.2: - resolution: {integrity: sha512-Mn6TbyYpFgwFuQ8KJKqf3bqqY9O1y37/0jgSK/61PUxV4QfIMv0+K2ioq8DfOjkBslcjwSzRfIDEXfzA9aCx7A==} - raw-body@2.4.1: resolution: {integrity: sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA==} engines: {node: '>= 0.8'} @@ -4130,9 +4097,6 @@ packages: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} - simple-swizzle@0.2.2: - resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} - sirv@3.0.1: resolution: {integrity: sha512-FoqMu0NCGBLCcAkS1qA+XJIQTR6/JHfQXl+uGteNCQ76T91DMUjPa9xfmeqMY3z80nLSg9yQmNjK0Px6RWsH/A==} engines: {node: '>=18'} @@ -4237,12 +4201,6 @@ packages: strnum@1.0.5: resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==} - stwui@0.21.2-next: - resolution: {integrity: sha512-bV4IkEsYNeEYUbFjTmKu/34xckhrYiHRpk8N9d8EqGQ+o+yBNmCgKqz1g53QWJg3q1vWfCYqpD4WxsilZlPEVw==} - peerDependencies: - '@sveltejs/kit': ^2.3.2 - svelte: ^4.2.8 - stylis@4.3.6: resolution: {integrity: sha512-yQ3rwFWRfwNUY7H5vpU0wfdkNSnvnJinhF9830Swlaxl03zsOjCfmX0ugac+3LtK0lYSgwL/KXc8oYL3mG4YFQ==} @@ -4448,9 +4406,6 @@ packages: resolution: {integrity: sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==} engines: {node: '>=14.0.0'} - tippy.js@6.3.7: - resolution: {integrity: sha512-E1d3oP2emgJ9dRQZdf3Kkn0qJgI6ZLpyS5z6ZkY1DF3kaQaBsGZsndEpHwx+eC+tYM41HaSNvNtLx8tU57FzTQ==} - tldts-core@6.1.86: resolution: {integrity: sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==} @@ -5302,10 +5257,6 @@ snapshots: '@fastify/busboy@2.1.1': {} - '@floating-ui/core@1.6.2': - dependencies: - '@floating-ui/utils': 0.2.9 - '@floating-ui/core@1.6.9': dependencies: '@floating-ui/utils': 0.2.9 @@ -5319,11 +5270,6 @@ snapshots: '@floating-ui/core': 1.6.9 '@floating-ui/utils': 0.2.9 - '@floating-ui/dom@1.6.5': - dependencies: - '@floating-ui/core': 1.6.2 - '@floating-ui/utils': 0.2.9 - '@floating-ui/dom@1.7.1': dependencies: '@floating-ui/core': 1.7.1 @@ -6839,20 +6785,10 @@ snapshots: color-name@2.0.0: {} - color-string@1.9.1: - dependencies: - color-name: 1.1.4 - simple-swizzle: 0.2.2 - color-string@2.0.1: dependencies: color-name: 2.0.0 - color@4.2.3: - dependencies: - color-convert: 2.0.1 - color-string: 1.9.1 - colorette@2.0.20: {} command-line-args@5.2.1: @@ -7124,8 +7060,6 @@ snapshots: whatwg-mimetype: 4.0.0 whatwg-url: 14.2.0 - dayjs@1.11.11: {} - dayjs@1.11.13: {} debug@4.3.4: @@ -7514,8 +7448,6 @@ snapshots: transitivePeerDependencies: - supports-color - esm-env@1.0.0: {} - esm-env@1.2.2: {} espree@10.3.0: @@ -7840,8 +7772,6 @@ snapshots: is-arrayish@0.2.1: {} - is-arrayish@0.3.2: {} - is-binary-path@2.1.0: dependencies: binary-extensions: 2.3.0 @@ -8275,8 +8205,6 @@ snapshots: nanoid@3.3.11: {} - nanoid@5.0.7: {} - natural-compare@1.4.0: {} nock@14.0.5: @@ -8677,8 +8605,6 @@ snapshots: ramda@0.28.0: {} - randomcolor@0.6.2: {} - raw-body@2.4.1: dependencies: bytes: 3.1.0 @@ -8845,10 +8771,6 @@ snapshots: signal-exit@4.1.0: {} - simple-swizzle@0.2.2: - dependencies: - is-arrayish: 0.3.2 - sirv@3.0.1: dependencies: '@polka/url': 1.0.0-next.29 @@ -8954,19 +8876,6 @@ snapshots: strnum@1.0.5: {} - stwui@0.21.2-next(@sveltejs/kit@2.21.5(@sveltejs/vite-plugin-svelte@5.1.0(svelte@5.34.6)(vite@6.3.5(@types/node@24.0.3)(jiti@1.21.6)(yaml@2.8.0)))(svelte@5.34.6)(vite@6.3.5(@types/node@24.0.3)(jiti@1.21.6)(yaml@2.8.0)))(svelte@5.34.6): - dependencies: - '@floating-ui/dom': 1.6.5 - '@sveltejs/kit': 2.21.5(@sveltejs/vite-plugin-svelte@5.1.0(svelte@5.34.6)(vite@6.3.5(@types/node@24.0.3)(jiti@1.21.6)(yaml@2.8.0)))(svelte@5.34.6)(vite@6.3.5(@types/node@24.0.3)(jiti@1.21.6)(yaml@2.8.0)) - color: 4.2.3 - dayjs: 1.11.11 - esm-env: 1.0.0 - nanoid: 5.0.7 - randomcolor: 0.6.2 - svelte: 5.34.6 - tailwind-merge: 2.6.0 - tippy.js: 6.3.7 - stylis@4.3.6: {} sucrase@3.35.0: @@ -9249,10 +9158,6 @@ snapshots: tinyspy@4.0.3: {} - tippy.js@6.3.7: - dependencies: - '@popperjs/core': 2.11.8 - tldts-core@6.1.86: {} tldts@6.1.86: diff --git a/src/lib/components/AtCoderUserValidationForm.svelte b/src/lib/components/AtCoderUserValidationForm.svelte index e8899df1f..a4138ded0 100644 --- a/src/lib/components/AtCoderUserValidationForm.svelte +++ b/src/lib/components/AtCoderUserValidationForm.svelte @@ -2,8 +2,31 @@ import { Label, Input, P } from 'svelte-5-ui-lib'; import ClipboardCopy from 'lucide-svelte/icons/clipboard-copy'; - // FIXME: stwui is effectively end-of-life, replace with another library - import { copyToClipboard } from 'stwui/utils/copyToClipboard'; + // TODO: Use Flowbite's ClipboardCopy component when available + const copyToClipboard = async (text: string): Promise => { + try { + await navigator.clipboard.writeText(text); + console.log('Text copied to clipboard successfully'); + } catch (error) { + // Fallback for older browsers that do not support the Clipboard API + const textArea = document.createElement('textarea'); + textArea.value = text; + textArea.style.position = 'fixed'; + textArea.style.opacity = '0'; + document.body.appendChild(textArea); + textArea.focus(); + textArea.select(); + + try { + document.execCommand('copy'); + console.log('Text copied fallback method'); + } catch (fallbackError) { + console.error('Both Clipboard API and fallback failed:', error, fallbackError); + } + + document.body.removeChild(textArea); + } + }; import ContainerWrapper from '$lib/components/ContainerWrapper.svelte'; import FormWrapper from '$lib/components/FormWrapper.svelte'; diff --git a/tailwind.config.ts b/tailwind.config.ts index e2a6e3bf5..ab4bda1a2 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -1,7 +1,5 @@ import forms from '@tailwindcss/forms'; import flowbitePlugin from 'flowbite/plugin'; -// TODO: stwui は事実上開発が終了したと思われるため、別のライブラリに移行 -import stwuiPlugin from 'stwui/plugin'; import type { Config } from 'tailwindcss'; @@ -9,10 +7,9 @@ const config = { content: [ './src/**/*.{html,js,svelte,ts}', './node_modules/svelte-5-ui-lib/**/*.{html,js,svelte,ts}', - './node_modules/stwui/**/*.{svelte,js,ts,html}', ], - plugins: [forms, flowbitePlugin, stwuiPlugin], + plugins: [forms, flowbitePlugin], darkMode: 'selector',