Skip to content

Commit bb99743

Browse files
committed
💥 Remove stwui (#2199)
1 parent e99a975 commit bb99743

File tree

4 files changed

+17
-102
lines changed

4 files changed

+17
-102
lines changed

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: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,22 @@
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+
} catch (error) {
10+
// Fallback for older browsers that do not support the Clipboard API
11+
const textArea = document.createElement('textarea');
12+
textArea.value = text;
13+
document.body.appendChild(textArea);
14+
textArea.focus();
15+
textArea.select();
16+
document.execCommand('copy');
17+
document.body.removeChild(textArea);
18+
console.log('Failed to copy text using Clipboard API, fallback used:', error);
19+
}
20+
};
721
822
import ContainerWrapper from '$lib/components/ContainerWrapper.svelte';
923
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)