Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/): 単体テスト (ユーティリティ、コンポーネント)
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
95 changes: 0 additions & 95 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 25 additions & 2 deletions src/lib/components/AtCoderUserValidationForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> => {
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';
Expand Down
5 changes: 1 addition & 4 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import forms from '@tailwindcss/forms';
import flowbitePlugin from 'flowbite/plugin';
// TODO: stwui は事実上開発が終了したと思われるため、別のライブラリに移行
import stwuiPlugin from 'stwui/plugin';

import type { Config } from 'tailwindcss';

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',

Expand Down
Loading