windowpp 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/create.js +3 -0
- package/package.json +4 -2
- package/scripts/publish.js +4 -0
- package/scripts/sync-templates.js +238 -0
- package/templates/example/CMakeLists.txt +59 -0
- package/templates/example/frontend/index.html +20 -0
- package/templates/example/frontend/src/API.ts +56 -0
- package/templates/example/frontend/src/App.tsx +781 -0
- package/templates/example/frontend/src/Layout.tsx +5 -0
- package/templates/example/frontend/src/components/ClipboardToast.tsx +23 -0
- package/templates/example/frontend/src/components/FileSearch.tsx +936 -0
- package/templates/example/frontend/src/components/InfiniteScrollList.tsx +267 -0
- package/templates/example/frontend/src/components/index.ts +13 -0
- package/templates/example/frontend/src/filedrop.css +421 -0
- package/templates/example/frontend/src/index.css +1 -0
- package/templates/example/frontend/src/index.tsx +24 -0
- package/templates/example/frontend/src/pages/About.tsx +47 -0
- package/templates/example/frontend/src/pages/Settings.tsx +37 -0
- package/templates/example/frontend/tsconfig.json +20 -0
- package/templates/example/frontend/vite.config.ts +27 -0
- package/templates/example/main.cpp +224 -0
- package/templates/example/package.json +12 -0
- package/templates/solid/CMakeLists.txt +4 -1
- package/templates/solid/frontend/vite.config.ts +3 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface ClipboardToastProps {
|
|
2
|
+
visible: boolean;
|
|
3
|
+
title: string;
|
|
4
|
+
message: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function ClipboardToast(props: ClipboardToastProps) {
|
|
8
|
+
return (
|
|
9
|
+
<div
|
|
10
|
+
class={`pointer-events-none fixed left-1/2 top-6 z-50 w-[min(92vw,28rem)] -translate-x-1/2 transition-all duration-300 ${props.visible ? 'translate-y-0 opacity-100' : '-translate-y-3 opacity-0'}`}
|
|
11
|
+
aria-live="polite"
|
|
12
|
+
aria-atomic="true"
|
|
13
|
+
>
|
|
14
|
+
<div class="rounded-3xl border border-emerald-300/80 bg-emerald-500 px-5 py-4 text-white shadow-2xl shadow-emerald-900/25 backdrop-blur-sm">
|
|
15
|
+
<div class="text-xs font-semibold uppercase tracking-[0.25em] text-emerald-50/90">Clipboard</div>
|
|
16
|
+
<div class="mt-1 text-base font-semibold">{props.title}</div>
|
|
17
|
+
<div class="mt-2 line-clamp-3 text-sm text-emerald-50/95">{props.message}</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default ClipboardToast;
|