Skip to content

Commit ae2d7a2

Browse files
authored
Merge pull request #2206 from AtCoder-NoviSteps/#2205
💥 Remove stwui (#2205)
2 parents a2adf32 + ff06ba0 commit ae2d7a2

File tree

5 files changed

+26
-104
lines changed

5 files changed

+26
-104
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
- [Svelte 5 UI lib](https://svelte-5-ui-lib.codewithshin.com/) - Svelte v5.xにおける[Flowbite Svelte](https://flowbite-svelte.com/)の代替ライブラリ。一部の属性名・値などが変更されていることに注意が必要
3333
- コンポーネントが未実装である場合は、主に[Flowbite](https://flowbite.com/)を暫定的に利用する
3434
- [Embla Carousel](https://github.com/davidjerleke/embla-carousel) - Svelte 5 UI lib ではカルーセルコンポーネントが未実装(2025年2月時点)なため、暫定的に導入している
35-
- Tailwind v4 に未対応(2025年2月時点)のため、[Skeleton](https://github.com/skeletonlabs/skeleton)などへ移行する可能性もある
36-
- [STWUI](https://stwui.vercel.app/): 開発が事実上終了した可能性が高いため、使用しているコンポーネントを調べて別のライブラリに移行する
3735
- [Lucide](https://github.com/lucide-icons/lucide) - アイコンライブラリ
3836
- テスティングフレームワーク
3937
- [Vitest](https://vitest.dev/): 単体テスト (ユーティリティ、コンポーネント)

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
"prettier-plugin-svelte": "3.4.0",
5757
"prettier-plugin-tailwindcss": "0.6.12",
5858
"prisma": "5.22.0",
59-
"stwui": "0.21.2-next",
6059
"super-sitemap": "1.0.3",
6160
"svelte": "5.34.6",
6261
"svelte-5-ui-lib": "0.12.2",

pnpm-lock.yaml

Lines changed: 0 additions & 95 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/components/AtCoderUserValidationForm.svelte

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,31 @@
22
import { Label, Input, P } from 'svelte-5-ui-lib';
33
import ClipboardCopy from 'lucide-svelte/icons/clipboard-copy';
44
5-
// FIXME: stwui is effectively end-of-life, replace with another library
6-
import { copyToClipboard } from 'stwui/utils/copyToClipboard';
5+
// TODO: Use Flowbite's ClipboardCopy component when available
6+
const copyToClipboard = async (text: string): Promise<void> => {
7+
try {
8+
await navigator.clipboard.writeText(text);
9+
console.log('Text copied to clipboard successfully');
10+
} catch (error) {
11+
// Fallback for older browsers that do not support the Clipboard API
12+
const textArea = document.createElement('textarea');
13+
textArea.value = text;
14+
textArea.style.position = 'fixed';
15+
textArea.style.opacity = '0';
16+
document.body.appendChild(textArea);
17+
textArea.focus();
18+
textArea.select();
19+
20+
try {
21+
document.execCommand('copy');
22+
console.log('Text copied fallback method');
23+
} catch (fallbackError) {
24+
console.error('Both Clipboard API and fallback failed:', error, fallbackError);
25+
}
26+
27+
document.body.removeChild(textArea);
28+
}
29+
};
730
831
import ContainerWrapper from '$lib/components/ContainerWrapper.svelte';
932
import FormWrapper from '$lib/components/FormWrapper.svelte';

tailwind.config.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
import forms from '@tailwindcss/forms';
22
import flowbitePlugin from 'flowbite/plugin';
3-
// TODO: stwui は事実上開発が終了したと思われるため、別のライブラリに移行
4-
import stwuiPlugin from 'stwui/plugin';
53

64
import type { Config } from 'tailwindcss';
75

86
const config = {
97
content: [
108
'./src/**/*.{html,js,svelte,ts}',
119
'./node_modules/svelte-5-ui-lib/**/*.{html,js,svelte,ts}',
12-
'./node_modules/stwui/**/*.{svelte,js,ts,html}',
1310
],
1411

15-
plugins: [forms, flowbitePlugin, stwuiPlugin],
12+
plugins: [forms, flowbitePlugin],
1613

1714
darkMode: 'selector',
1815

0 commit comments

Comments
 (0)