@windrun-huaiin/third-ui 30.0.0 → 30.1.0
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/dist/fuma/fuma-page-genarator.d.ts +2 -6
- package/dist/fuma/fuma-page-genarator.js +3 -2
- package/dist/fuma/fuma-page-genarator.mjs +3 -2
- package/dist/main/404-page.d.ts +12 -0
- package/dist/main/404-page.js +66 -0
- package/dist/main/404-page.mjs +64 -0
- package/dist/main/anime/anime-404-page.d.ts +14 -0
- package/dist/main/anime/anime-404-page.js +197 -0
- package/dist/main/anime/anime-404-page.mjs +195 -0
- package/dist/main/anime/anime-not-found-page.d.ts +7 -0
- package/dist/main/anime/anime-not-found-page.js +142 -0
- package/dist/main/anime/anime-not-found-page.mjs +140 -0
- package/dist/main/anime/index.d.ts +1 -0
- package/dist/main/anime/index.js +2 -0
- package/dist/main/anime/index.mjs +1 -0
- package/dist/main/index.d.ts +1 -0
- package/dist/main/index.js +2 -0
- package/dist/main/index.mjs +1 -0
- package/dist/main/motion/creative-left-panel.d.ts +7 -0
- package/dist/main/motion/creative-left-panel.js +11 -0
- package/dist/main/motion/creative-left-panel.mjs +9 -0
- package/dist/main/motion/creative-right-panel.d.ts +7 -0
- package/dist/main/motion/creative-right-panel.js +11 -0
- package/dist/main/motion/creative-right-panel.mjs +9 -0
- package/dist/main/snake-loading-frame.js +1 -0
- package/dist/main/snake-loading-frame.mjs +1 -0
- package/package.json +4 -4
- package/src/fuma/fuma-page-genarator.tsx +2 -22
- package/src/main/404-page.tsx +162 -0
- package/src/main/anime/anime-404-page.tsx +344 -0
- package/src/main/anime/index.ts +1 -0
- package/src/main/index.ts +1 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { THEME_BUTTON_GRADIENT_CLASS_MAP, themeButtonGradientClass, themeSvgIconColor, themeIconColor, themeBgColor } from '@windrun-huaiin/base-ui/lib';
|
|
4
|
+
import { cn } from '@windrun-huaiin/lib/utils';
|
|
5
|
+
import { createTimeline, stagger, animate } from 'animejs';
|
|
6
|
+
import { useReducedMotion } from 'motion/react';
|
|
7
|
+
import { useRef, useMemo, useEffect, useCallback } from 'react';
|
|
8
|
+
|
|
9
|
+
const THEME_BG_CLASS_MAP = {
|
|
10
|
+
'text-purple-500': 'bg-purple-500/20',
|
|
11
|
+
'text-orange-500': 'bg-orange-500/20',
|
|
12
|
+
'text-indigo-500': 'bg-indigo-500/20',
|
|
13
|
+
'text-emerald-500': 'bg-emerald-500/20',
|
|
14
|
+
'text-rose-500': 'bg-rose-500/20',
|
|
15
|
+
};
|
|
16
|
+
const dust = Array.from({ length: 10 }, (_, index) => ({
|
|
17
|
+
id: index,
|
|
18
|
+
left: `${12 + index * 8}%`,
|
|
19
|
+
top: `${18 + (index % 5) * 13}%`,
|
|
20
|
+
size: 3 + (index % 3),
|
|
21
|
+
}));
|
|
22
|
+
function AnimeNotFoundPage({ siteIcon, homeUrl = process.env.NEXT_PUBLIC_BASE_URL || '/', className, compact = false, themeClass, themeColor, ambientAnimated = true, doorOpen, onDoorOpenChange, }) {
|
|
23
|
+
const rootRef = useRef(null);
|
|
24
|
+
const timelineRef = useRef(null);
|
|
25
|
+
const shimmerRef = useRef(null);
|
|
26
|
+
const doorAnimationRef = useRef(null);
|
|
27
|
+
const lightAnimationRef = useRef(null);
|
|
28
|
+
const handleAnimationRef = useRef(null);
|
|
29
|
+
const messageAnimationRef = useRef(null);
|
|
30
|
+
const isDoorOpenRef = useRef(doorOpen !== null && doorOpen !== void 0 ? doorOpen : false);
|
|
31
|
+
const prefersReducedMotion = useReducedMotion();
|
|
32
|
+
const activeThemeClass = themeClass !== null && themeClass !== void 0 ? themeClass : themeIconColor;
|
|
33
|
+
const activeGradientClass = themeClass ? THEME_BUTTON_GRADIENT_CLASS_MAP[themeClass] : themeButtonGradientClass;
|
|
34
|
+
const activeBgClass = themeClass ? THEME_BG_CLASS_MAP[themeClass] : themeBgColor;
|
|
35
|
+
const doorStyle = useMemo(() => ({
|
|
36
|
+
'--not-found-theme': themeColor !== null && themeColor !== void 0 ? themeColor : themeSvgIconColor,
|
|
37
|
+
}), [themeColor]);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
var _a, _b;
|
|
40
|
+
const root = rootRef.current;
|
|
41
|
+
if (!root || prefersReducedMotion) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
const door = root.querySelector('[data-not-found-door]');
|
|
45
|
+
const light = root.querySelector('[data-not-found-light]');
|
|
46
|
+
const message = root.querySelector('[data-not-found-message]');
|
|
47
|
+
const plate = root.querySelector('[data-not-found-plate]');
|
|
48
|
+
const handle = root.querySelector('[data-not-found-handle]');
|
|
49
|
+
const dustNodes = Array.from(root.querySelectorAll('[data-not-found-dust]'));
|
|
50
|
+
if (!door || !light || !plate || !handle) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
door.style.transform = 'rotateY(-2deg) translateX(0)';
|
|
54
|
+
light.style.opacity = '0.2';
|
|
55
|
+
light.style.transform = 'scaleX(0.78)';
|
|
56
|
+
if (message) {
|
|
57
|
+
message.style.opacity = '0';
|
|
58
|
+
message.style.transform = 'translateY(8px)';
|
|
59
|
+
}
|
|
60
|
+
(_a = timelineRef.current) === null || _a === void 0 ? void 0 : _a.revert();
|
|
61
|
+
(_b = shimmerRef.current) === null || _b === void 0 ? void 0 : _b.revert();
|
|
62
|
+
timelineRef.current = null;
|
|
63
|
+
shimmerRef.current = null;
|
|
64
|
+
if (ambientAnimated) {
|
|
65
|
+
timelineRef.current = createTimeline({ loop: true })
|
|
66
|
+
.add(plate, {
|
|
67
|
+
translateY: [0, -3, 0],
|
|
68
|
+
scale: [1, 1.025, 1],
|
|
69
|
+
duration: 1400,
|
|
70
|
+
ease: 'inOutSine',
|
|
71
|
+
})
|
|
72
|
+
.add(plate, {
|
|
73
|
+
translateY: [0, -3, 0],
|
|
74
|
+
scale: [1, 1.025, 1],
|
|
75
|
+
duration: 1400,
|
|
76
|
+
ease: 'inOutSine',
|
|
77
|
+
}, '+=900')
|
|
78
|
+
.add(dustNodes, {
|
|
79
|
+
opacity: [0, 0.72, 0],
|
|
80
|
+
translateY: [14, -18],
|
|
81
|
+
translateX: (_target, index) => (index % 2 === 0 ? 10 : -10),
|
|
82
|
+
scale: [0.4, 1, 0.6],
|
|
83
|
+
duration: 1800,
|
|
84
|
+
delay: stagger(80),
|
|
85
|
+
ease: 'outSine',
|
|
86
|
+
}, '<+=200');
|
|
87
|
+
shimmerRef.current = animate(root.querySelectorAll('[data-not-found-shimmer]'), {
|
|
88
|
+
translateX: ['-120%', '120%'],
|
|
89
|
+
opacity: [0, 0.8, 0],
|
|
90
|
+
duration: 2400,
|
|
91
|
+
delay: stagger(160),
|
|
92
|
+
ease: 'inOutSine',
|
|
93
|
+
loop: true,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
return () => {
|
|
97
|
+
var _a, _b, _c, _d, _e, _f;
|
|
98
|
+
(_a = timelineRef.current) === null || _a === void 0 ? void 0 : _a.revert();
|
|
99
|
+
timelineRef.current = null;
|
|
100
|
+
(_b = shimmerRef.current) === null || _b === void 0 ? void 0 : _b.revert();
|
|
101
|
+
shimmerRef.current = null;
|
|
102
|
+
(_c = doorAnimationRef.current) === null || _c === void 0 ? void 0 : _c.revert();
|
|
103
|
+
doorAnimationRef.current = null;
|
|
104
|
+
(_d = lightAnimationRef.current) === null || _d === void 0 ? void 0 : _d.revert();
|
|
105
|
+
lightAnimationRef.current = null;
|
|
106
|
+
(_e = handleAnimationRef.current) === null || _e === void 0 ? void 0 : _e.revert();
|
|
107
|
+
handleAnimationRef.current = null;
|
|
108
|
+
(_f = messageAnimationRef.current) === null || _f === void 0 ? void 0 : _f.revert();
|
|
109
|
+
messageAnimationRef.current = null;
|
|
110
|
+
};
|
|
111
|
+
}, [ambientAnimated, prefersReducedMotion]);
|
|
112
|
+
const setDoorOpen = useCallback((nextOpen) => {
|
|
113
|
+
var _a, _b, _c, _d;
|
|
114
|
+
const root = rootRef.current;
|
|
115
|
+
if (!root) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const door = root.querySelector('[data-not-found-door]');
|
|
119
|
+
const light = root.querySelector('[data-not-found-light]');
|
|
120
|
+
const handle = root.querySelector('[data-not-found-handle]');
|
|
121
|
+
const message = root.querySelector('[data-not-found-message]');
|
|
122
|
+
if (!door || !light || !handle) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
isDoorOpenRef.current = nextOpen;
|
|
126
|
+
(_a = doorAnimationRef.current) === null || _a === void 0 ? void 0 : _a.pause();
|
|
127
|
+
(_b = lightAnimationRef.current) === null || _b === void 0 ? void 0 : _b.pause();
|
|
128
|
+
(_c = handleAnimationRef.current) === null || _c === void 0 ? void 0 : _c.pause();
|
|
129
|
+
(_d = messageAnimationRef.current) === null || _d === void 0 ? void 0 : _d.pause();
|
|
130
|
+
doorAnimationRef.current = null;
|
|
131
|
+
lightAnimationRef.current = null;
|
|
132
|
+
handleAnimationRef.current = null;
|
|
133
|
+
messageAnimationRef.current = null;
|
|
134
|
+
if (prefersReducedMotion) {
|
|
135
|
+
door.style.transform = nextOpen ? 'rotateY(-72deg) translateX(-12px)' : 'rotateY(-2deg) translateX(0)';
|
|
136
|
+
light.style.opacity = nextOpen ? '0.8' : '0.2';
|
|
137
|
+
light.style.transform = nextOpen ? 'scaleX(1.28)' : 'scaleX(0.78)';
|
|
138
|
+
if (message) {
|
|
139
|
+
message.style.opacity = nextOpen ? '1' : '0';
|
|
140
|
+
message.style.transform = nextOpen ? 'translateY(0)' : 'translateY(8px)';
|
|
141
|
+
}
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
doorAnimationRef.current = animate(door, {
|
|
145
|
+
rotateY: nextOpen ? -72 : -2,
|
|
146
|
+
translateX: nextOpen ? -12 : 0,
|
|
147
|
+
duration: 1050,
|
|
148
|
+
ease: 'inOutCubic',
|
|
149
|
+
});
|
|
150
|
+
lightAnimationRef.current = animate(light, {
|
|
151
|
+
opacity: nextOpen ? 0.8 : 0.2,
|
|
152
|
+
scaleX: nextOpen ? 1.28 : 0.78,
|
|
153
|
+
duration: 1050,
|
|
154
|
+
ease: 'inOutSine',
|
|
155
|
+
});
|
|
156
|
+
handleAnimationRef.current = animate(handle, {
|
|
157
|
+
scale: [1, 1.05, 1],
|
|
158
|
+
duration: 520,
|
|
159
|
+
ease: 'inOutSine',
|
|
160
|
+
});
|
|
161
|
+
if (message) {
|
|
162
|
+
messageAnimationRef.current = animate(message, {
|
|
163
|
+
opacity: nextOpen ? [0, 1] : [1, 0],
|
|
164
|
+
translateY: nextOpen ? [10, 0] : [0, 4, 10],
|
|
165
|
+
scale: nextOpen ? [0.96, 1] : [1, 0.98],
|
|
166
|
+
duration: nextOpen ? 620 : 520,
|
|
167
|
+
delay: nextOpen ? 320 : 280,
|
|
168
|
+
ease: nextOpen ? 'outCubic' : 'inOutSine',
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}, [prefersReducedMotion]);
|
|
172
|
+
useEffect(() => {
|
|
173
|
+
if (doorOpen === undefined || doorOpen === isDoorOpenRef.current) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
setDoorOpen(doorOpen);
|
|
177
|
+
}, [doorOpen, setDoorOpen]);
|
|
178
|
+
const toggleDoor = () => {
|
|
179
|
+
const nextOpen = !isDoorOpenRef.current;
|
|
180
|
+
if (doorOpen !== undefined) {
|
|
181
|
+
onDoorOpenChange === null || onDoorOpenChange === void 0 ? void 0 : onDoorOpenChange(nextOpen);
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
setDoorOpen(nextOpen);
|
|
185
|
+
onDoorOpenChange === null || onDoorOpenChange === void 0 ? void 0 : onDoorOpenChange(nextOpen);
|
|
186
|
+
};
|
|
187
|
+
return (jsxs("div", { ref: rootRef, className: cn('relative flex w-full items-center justify-center overflow-hidden px-4 py-8', compact ? 'h-full min-h-full' : 'min-h-dvh', className), style: doorStyle, children: [jsx("div", { className: "pointer-events-none absolute inset-0 -z-10 bg-[radial-gradient(circle_at_50%_20%,rgba(255,255,255,0.75),transparent_34%),linear-gradient(180deg,rgba(250,250,250,0.96),rgba(244,244,245,0.72))] dark:bg-[radial-gradient(circle_at_50%_20%,rgba(255,255,255,0.08),transparent_34%),linear-gradient(180deg,rgba(24,24,27,0.96),rgba(9,9,11,0.92))]" }), jsx("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 -z-10 h-1/2 bg-[linear-gradient(180deg,transparent,rgba(0,0,0,0.05))] dark:bg-[linear-gradient(180deg,transparent,rgba(0,0,0,0.34))]" }), jsxs("div", { className: "flex w-full max-w-3xl flex-col items-center gap-5", children: [jsx("section", { className: "text-center", children: jsx("h3", { className: cn('whitespace-nowrap text-[clamp(2.15rem,8vw,3.4rem)] font-black leading-none tracking-normal bg-linear-to-r bg-clip-text text-transparent', activeGradientClass), children: "Page Not Found" }) }), jsx("section", { className: "flex w-full justify-center", children: jsxs("div", { className: "relative aspect-[0.78] w-full max-w-[270px] sm:max-w-[315px] md:max-w-[330px] perspective-distant", children: [jsx("div", { "data-not-found-light": "", className: "absolute left-[14%] top-[7%] h-[86%] w-[72%] rounded-[28px] bg-[radial-gradient(circle_at_50%_45%,rgba(255,255,255,0.96),color-mix(in_srgb,var(--not-found-theme)_42%,transparent)_42%,transparent_72%)] opacity-25 blur-xl" }), jsx("div", { className: "absolute inset-[4%] rounded-[32px] border border-black/10 bg-neutral-950/5 shadow-2xl shadow-black/10 dark:border-white/10 dark:bg-white/5" }), jsx("div", { className: "absolute inset-[8%] rounded-[26px] bg-[linear-gradient(180deg,rgba(255,255,255,0.88),rgba(228,228,231,0.86))] shadow-[inset_0_1px_0_rgba(255,255,255,0.85)] dark:bg-[linear-gradient(180deg,rgba(39,39,42,0.92),rgba(24,24,27,0.96))]" }), jsxs("p", { "data-not-found-message": "", className: "pointer-events-none absolute right-[16%] top-[29%] z-2 max-w-[46%] text-right text-sm font-medium leading-6 text-muted-foreground opacity-100", children: [jsx("span", { className: "block", children: "The page" }), jsx("span", { className: "block", children: "you're looking for" }), jsx("span", { className: "block", children: "doesn't exist" })] }), jsx("button", { type: "button", className: "absolute inset-[8%] z-1 rounded-[26px] outline-none focus-visible:ring-2 focus-visible:ring-(--not-found-theme)", "aria-label": "Toggle the 404 door", onClick: toggleDoor }), jsxs("div", { "data-not-found-door": "", className: "absolute inset-[8%] z-10 origin-left rounded-[26px] border border-black/10 bg-[linear-gradient(145deg,rgba(255,255,255,0.92),rgba(212,212,216,0.9))] shadow-2xl shadow-black/20 will-change-transform dark:border-white/10 dark:bg-[linear-gradient(145deg,rgba(63,63,70,0.96),rgba(24,24,27,0.98))]", children: [jsxs("div", { className: "absolute inset-4 overflow-hidden rounded-[20px]", children: [jsx("div", { "data-not-found-shimmer": "", className: "absolute inset-y-0 w-1/3 -skew-x-12 bg-white/35 blur-md dark:bg-white/12" }), jsxs("a", { href: homeUrl, className: "absolute inset-x-5 bottom-5 flex h-[39%] flex-col items-center justify-center gap-2 rounded-2xl border border-black/10 bg-white/25 text-sm text-muted-foreground transition-opacity hover:opacity-80 dark:border-white/10 dark:bg-white/5", children: [jsxs("span", { className: "inline-flex items-center gap-2", children: [siteIcon, jsx("span", { children: "Woops!" })] }), jsx("span", { className: cn('text-xs font-semibold underline underline-offset-4', activeThemeClass, 'decoration-current'), children: "Back to Homepage" })] })] }), jsxs("div", { "data-not-found-plate": "", className: "absolute left-1/2 top-[18%] flex h-[88px] w-[156px] -translate-x-1/2 items-center justify-center overflow-hidden rounded-2xl border border-black/10 bg-white/86 shadow-lg shadow-black/10 dark:border-white/10 dark:bg-black/30", children: [jsx("div", { "data-not-found-shimmer": "", className: "absolute inset-y-0 w-1/2 -skew-x-12 bg-white/60 blur-md dark:bg-white/15" }), jsx("span", { className: cn('relative text-5xl font-black tabular-nums bg-linear-to-r bg-clip-text text-transparent', activeGradientClass), children: "404" })] }), jsx("button", { type: "button", "data-not-found-handle": "", className: "group absolute right-[1%] top-[39%] z-10 flex size-12 items-center justify-center rounded-full outline-none ring-offset-2 transition-transform hover:scale-105 focus-visible:ring-2 focus-visible:ring-(--not-found-theme)", "aria-label": "Toggle the 404 door", onClick: toggleDoor, children: jsxs("span", { className: "relative grid h-8 w-6 place-items-center rounded-full border border-black/10 bg-white/50 shadow-inner shadow-black/10 backdrop-blur-sm transform-[rotateY(18deg)] dark:border-white/15 dark:bg-black/25", children: [jsx("span", { className: "absolute size-10 rounded-full bg-(--not-found-theme) opacity-0 blur-md transition-opacity duration-300 group-hover:opacity-25" }), jsx("span", { className: "relative grid size-4 place-items-center rounded-full border border-black/10 bg-(--not-found-theme) shadow-lg shadow-black/25 dark:border-white/15", children: jsx("span", { className: "absolute right-1 top-1 size-1 rounded-full bg-white/75" }) })] }) })] }), dust.map(dot => (jsx("span", { "data-not-found-dust": "", className: cn('absolute rounded-full opacity-0', activeBgClass), style: {
|
|
188
|
+
left: dot.left,
|
|
189
|
+
top: dot.top,
|
|
190
|
+
width: dot.size,
|
|
191
|
+
height: dot.size,
|
|
192
|
+
} }, dot.id)))] }) })] })] }));
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export { AnimeNotFoundPage };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface AnimeNotFoundPageProps {
|
|
3
|
+
siteIcon: ReactNode;
|
|
4
|
+
homeUrl?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function AnimeNotFoundPage({ siteIcon, homeUrl, className, }: AnimeNotFoundPageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var lib = require('@windrun-huaiin/base-ui/lib');
|
|
6
|
+
var utils = require('@windrun-huaiin/lib/utils');
|
|
7
|
+
var animejs = require('animejs');
|
|
8
|
+
var react = require('motion/react');
|
|
9
|
+
var React = require('react');
|
|
10
|
+
|
|
11
|
+
const dust = Array.from({ length: 10 }, (_, index) => ({
|
|
12
|
+
id: index,
|
|
13
|
+
left: `${12 + index * 8}%`,
|
|
14
|
+
top: `${18 + (index % 5) * 13}%`,
|
|
15
|
+
size: 3 + (index % 3),
|
|
16
|
+
}));
|
|
17
|
+
function AnimeNotFoundPage({ siteIcon, homeUrl = process.env.NEXT_PUBLIC_BASE_URL || '/', className, }) {
|
|
18
|
+
const rootRef = React.useRef(null);
|
|
19
|
+
const timelineRef = React.useRef(null);
|
|
20
|
+
const shimmerRef = React.useRef(null);
|
|
21
|
+
const doorAnimationRef = React.useRef(null);
|
|
22
|
+
const lightAnimationRef = React.useRef(null);
|
|
23
|
+
const handleAnimationRef = React.useRef(null);
|
|
24
|
+
const isDoorOpenRef = React.useRef(true);
|
|
25
|
+
const prefersReducedMotion = react.useReducedMotion();
|
|
26
|
+
const doorStyle = React.useMemo(() => ({
|
|
27
|
+
'--not-found-theme': lib.themeSvgIconColor,
|
|
28
|
+
}), []);
|
|
29
|
+
React.useEffect(() => {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
const root = rootRef.current;
|
|
32
|
+
if (!root || prefersReducedMotion) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
const door = root.querySelector('[data-not-found-door]');
|
|
36
|
+
const light = root.querySelector('[data-not-found-light]');
|
|
37
|
+
const plate = root.querySelector('[data-not-found-plate]');
|
|
38
|
+
const handle = root.querySelector('[data-not-found-handle]');
|
|
39
|
+
const dustNodes = Array.from(root.querySelectorAll('[data-not-found-dust]'));
|
|
40
|
+
if (!door || !light || !plate || !handle) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
door.style.transform = 'rotateY(-46deg) translateX(-7px)';
|
|
44
|
+
light.style.opacity = '0.7';
|
|
45
|
+
light.style.transform = 'scaleX(1.12)';
|
|
46
|
+
(_a = timelineRef.current) === null || _a === void 0 ? void 0 : _a.revert();
|
|
47
|
+
timelineRef.current = animejs.createTimeline({ loop: true })
|
|
48
|
+
.add(plate, {
|
|
49
|
+
translateY: [0, -3, 0],
|
|
50
|
+
scale: [1, 1.025, 1],
|
|
51
|
+
duration: 1400,
|
|
52
|
+
ease: 'inOutSine',
|
|
53
|
+
})
|
|
54
|
+
.add(plate, {
|
|
55
|
+
translateY: [0, -3, 0],
|
|
56
|
+
scale: [1, 1.025, 1],
|
|
57
|
+
duration: 1400,
|
|
58
|
+
ease: 'inOutSine',
|
|
59
|
+
}, '+=900')
|
|
60
|
+
.add(dustNodes, {
|
|
61
|
+
opacity: [0, 0.72, 0],
|
|
62
|
+
translateY: [14, -18],
|
|
63
|
+
translateX: (_target, index) => (index % 2 === 0 ? 10 : -10),
|
|
64
|
+
scale: [0.4, 1, 0.6],
|
|
65
|
+
duration: 1800,
|
|
66
|
+
delay: animejs.stagger(80),
|
|
67
|
+
ease: 'outSine',
|
|
68
|
+
}, '<+=200');
|
|
69
|
+
(_b = shimmerRef.current) === null || _b === void 0 ? void 0 : _b.revert();
|
|
70
|
+
shimmerRef.current = animejs.animate(root.querySelectorAll('[data-not-found-shimmer]'), {
|
|
71
|
+
translateX: ['-120%', '120%'],
|
|
72
|
+
opacity: [0, 0.8, 0],
|
|
73
|
+
duration: 2400,
|
|
74
|
+
delay: animejs.stagger(160),
|
|
75
|
+
ease: 'inOutSine',
|
|
76
|
+
loop: true,
|
|
77
|
+
});
|
|
78
|
+
return () => {
|
|
79
|
+
var _a, _b, _c, _d, _e;
|
|
80
|
+
(_a = timelineRef.current) === null || _a === void 0 ? void 0 : _a.revert();
|
|
81
|
+
timelineRef.current = null;
|
|
82
|
+
(_b = shimmerRef.current) === null || _b === void 0 ? void 0 : _b.revert();
|
|
83
|
+
shimmerRef.current = null;
|
|
84
|
+
(_c = doorAnimationRef.current) === null || _c === void 0 ? void 0 : _c.revert();
|
|
85
|
+
doorAnimationRef.current = null;
|
|
86
|
+
(_d = lightAnimationRef.current) === null || _d === void 0 ? void 0 : _d.revert();
|
|
87
|
+
lightAnimationRef.current = null;
|
|
88
|
+
(_e = handleAnimationRef.current) === null || _e === void 0 ? void 0 : _e.revert();
|
|
89
|
+
handleAnimationRef.current = null;
|
|
90
|
+
};
|
|
91
|
+
}, [prefersReducedMotion]);
|
|
92
|
+
const toggleDoor = () => {
|
|
93
|
+
var _a, _b, _c;
|
|
94
|
+
const root = rootRef.current;
|
|
95
|
+
if (!root) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const door = root.querySelector('[data-not-found-door]');
|
|
99
|
+
const light = root.querySelector('[data-not-found-light]');
|
|
100
|
+
const handle = root.querySelector('[data-not-found-handle]');
|
|
101
|
+
if (!door || !light || !handle) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const nextOpen = !isDoorOpenRef.current;
|
|
105
|
+
isDoorOpenRef.current = nextOpen;
|
|
106
|
+
(_a = doorAnimationRef.current) === null || _a === void 0 ? void 0 : _a.revert();
|
|
107
|
+
(_b = lightAnimationRef.current) === null || _b === void 0 ? void 0 : _b.revert();
|
|
108
|
+
(_c = handleAnimationRef.current) === null || _c === void 0 ? void 0 : _c.revert();
|
|
109
|
+
if (prefersReducedMotion) {
|
|
110
|
+
door.style.transform = nextOpen ? 'rotateY(-56deg) translateX(-9px)' : 'rotateY(-2deg) translateX(0)';
|
|
111
|
+
light.style.opacity = nextOpen ? '0.76' : '0.2';
|
|
112
|
+
light.style.transform = nextOpen ? 'scaleX(1.18)' : 'scaleX(0.78)';
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
doorAnimationRef.current = animejs.animate(door, {
|
|
116
|
+
rotateY: nextOpen ? -56 : -2,
|
|
117
|
+
translateX: nextOpen ? -9 : 0,
|
|
118
|
+
duration: 760,
|
|
119
|
+
ease: 'outCubic',
|
|
120
|
+
});
|
|
121
|
+
lightAnimationRef.current = animejs.animate(light, {
|
|
122
|
+
opacity: nextOpen ? 0.76 : 0.2,
|
|
123
|
+
scaleX: nextOpen ? 1.18 : 0.78,
|
|
124
|
+
duration: 760,
|
|
125
|
+
ease: 'outCubic',
|
|
126
|
+
});
|
|
127
|
+
handleAnimationRef.current = animejs.animate(handle, {
|
|
128
|
+
scale: [1, 1.22, 1],
|
|
129
|
+
rotate: nextOpen ? [0, 18, 0] : [0, -18, 0],
|
|
130
|
+
duration: 520,
|
|
131
|
+
ease: 'inOutSine',
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
return (jsxRuntime.jsxs("div", { ref: rootRef, className: utils.cn('relative flex min-h-dvh w-full items-center justify-center overflow-hidden px-4 py-8', className), style: doorStyle, children: [jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0 -z-10 bg-[radial-gradient(circle_at_50%_20%,rgba(255,255,255,0.75),transparent_34%),linear-gradient(180deg,rgba(250,250,250,0.96),rgba(244,244,245,0.72))] dark:bg-[radial-gradient(circle_at_50%_20%,rgba(255,255,255,0.08),transparent_34%),linear-gradient(180deg,rgba(24,24,27,0.96),rgba(9,9,11,0.92))]" }), jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 -z-10 h-1/2 bg-[linear-gradient(180deg,transparent,rgba(0,0,0,0.05))] dark:bg-[linear-gradient(180deg,transparent,rgba(0,0,0,0.34))]" }), jsxRuntime.jsxs("div", { className: "grid w-full max-w-4xl items-center gap-4 md:grid-cols-[minmax(0,0.9fr)_minmax(280px,0.78fr)] md:gap-6", children: [jsxRuntime.jsxs("section", { className: "order-2 text-center md:order-1 md:text-left", children: [jsxRuntime.jsx("h3", { className: utils.cn('whitespace-nowrap text-[clamp(2.15rem,8vw,3.4rem)] font-black leading-none tracking-normal md:text-[clamp(2.6rem,4.5vw,4rem)] bg-linear-to-r bg-clip-text text-transparent', lib.themeButtonGradientClass), children: "Page Not Found" }), jsxRuntime.jsx("p", { className: "mx-auto mt-5 max-w-xl text-base leading-7 text-muted-foreground md:mx-0 md:text-lg", children: "The page you're looking for doesn't exist" }), jsxRuntime.jsx("a", { href: homeUrl, className: utils.cn('mt-4 inline-flex text-sm font-semibold underline underline-offset-4 transition-opacity hover:opacity-80', lib.themeIconColor, 'decoration-current'), children: "Back to Homepage" }), jsxRuntime.jsx("span", { className: utils.cn('mt-9 inline-flex size-2 rounded-full', lib.themeBgColor) })] }), jsxRuntime.jsx("section", { className: "order-1 flex justify-center md:order-2", children: jsxRuntime.jsxs("div", { className: "relative aspect-[0.78] w-full max-w-[270px] sm:max-w-[315px] md:max-w-[330px] [perspective:1200px]", children: [jsxRuntime.jsx("div", { "data-not-found-light": "", className: "absolute left-[14%] top-[7%] h-[86%] w-[72%] rounded-[28px] bg-[radial-gradient(circle_at_50%_45%,rgba(255,255,255,0.96),color-mix(in_srgb,var(--not-found-theme)_42%,transparent)_42%,transparent_72%)] opacity-25 blur-xl" }), jsxRuntime.jsx("div", { className: "absolute inset-[4%] rounded-[32px] border border-black/10 bg-neutral-950/5 shadow-2xl shadow-black/10 dark:border-white/10 dark:bg-white/5" }), jsxRuntime.jsx("div", { className: "absolute inset-[8%] rounded-[26px] bg-[linear-gradient(180deg,rgba(255,255,255,0.88),rgba(228,228,231,0.86))] shadow-[inset_0_1px_0_rgba(255,255,255,0.85)] dark:bg-[linear-gradient(180deg,rgba(39,39,42,0.92),rgba(24,24,27,0.96))]" }), jsxRuntime.jsxs("div", { "data-not-found-door": "", className: "absolute inset-[8%] origin-left rounded-[26px] border border-black/10 bg-[linear-gradient(145deg,rgba(255,255,255,0.92),rgba(212,212,216,0.9))] shadow-2xl shadow-black/20 will-change-transform dark:border-white/10 dark:bg-[linear-gradient(145deg,rgba(63,63,70,0.96),rgba(24,24,27,0.98))]", children: [jsxRuntime.jsxs("div", { className: "absolute inset-4 overflow-hidden rounded-[20px] border border-black/10 dark:border-white/10", children: [jsxRuntime.jsx("div", { "data-not-found-shimmer": "", className: "absolute inset-y-0 w-1/3 -skew-x-12 bg-white/35 blur-md dark:bg-white/12" }), jsxRuntime.jsx("div", { className: "absolute inset-x-5 top-5 h-[30%] rounded-2xl border border-black/10 bg-white/35 dark:border-white/10 dark:bg-white/5" }), jsxRuntime.jsxs("a", { href: homeUrl, className: "absolute inset-x-5 bottom-5 flex h-[39%] flex-col items-center justify-center gap-2 rounded-2xl border border-black/10 bg-white/25 text-sm text-muted-foreground transition-opacity hover:opacity-80 dark:border-white/10 dark:bg-white/5", children: [siteIcon, jsxRuntime.jsx("span", { children: "Woops!" })] })] }), jsxRuntime.jsxs("div", { "data-not-found-plate": "", className: "absolute left-1/2 top-[18%] flex h-[88px] w-[156px] -translate-x-1/2 items-center justify-center overflow-hidden rounded-2xl border border-black/10 bg-white/86 shadow-lg shadow-black/10 dark:border-white/10 dark:bg-black/30", children: [jsxRuntime.jsx("div", { "data-not-found-shimmer": "", className: "absolute inset-y-0 w-1/2 -skew-x-12 bg-white/60 blur-md dark:bg-white/15" }), jsxRuntime.jsx("span", { className: utils.cn('relative text-5xl font-black tabular-nums bg-linear-to-r bg-clip-text text-transparent', lib.themeButtonGradientClass), children: "404" })] }), jsxRuntime.jsx("button", { type: "button", "data-not-found-handle": "", className: "absolute right-[16%] top-1/2 z-10 size-6 rounded-full border border-black/10 bg-[var(--not-found-theme)] shadow-lg shadow-black/20 outline-none ring-offset-2 transition-transform hover:scale-110 focus-visible:ring-2 focus-visible:ring-[var(--not-found-theme)] dark:border-white/15", "aria-label": "Toggle the 404 door", onClick: toggleDoor })] }), dust.map(dot => (jsxRuntime.jsx("span", { "data-not-found-dust": "", className: "absolute rounded-full bg-[var(--not-found-theme)] opacity-0", style: {
|
|
135
|
+
left: dot.left,
|
|
136
|
+
top: dot.top,
|
|
137
|
+
width: dot.size,
|
|
138
|
+
height: dot.size,
|
|
139
|
+
} }, dot.id)))] }) })] })] }));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
exports.AnimeNotFoundPage = AnimeNotFoundPage;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { themeSvgIconColor, themeButtonGradientClass, themeIconColor, themeBgColor } from '@windrun-huaiin/base-ui/lib';
|
|
4
|
+
import { cn } from '@windrun-huaiin/lib/utils';
|
|
5
|
+
import { createTimeline, stagger, animate } from 'animejs';
|
|
6
|
+
import { useReducedMotion } from 'motion/react';
|
|
7
|
+
import { useRef, useMemo, useEffect } from 'react';
|
|
8
|
+
|
|
9
|
+
const dust = Array.from({ length: 10 }, (_, index) => ({
|
|
10
|
+
id: index,
|
|
11
|
+
left: `${12 + index * 8}%`,
|
|
12
|
+
top: `${18 + (index % 5) * 13}%`,
|
|
13
|
+
size: 3 + (index % 3),
|
|
14
|
+
}));
|
|
15
|
+
function AnimeNotFoundPage({ siteIcon, homeUrl = process.env.NEXT_PUBLIC_BASE_URL || '/', className, }) {
|
|
16
|
+
const rootRef = useRef(null);
|
|
17
|
+
const timelineRef = useRef(null);
|
|
18
|
+
const shimmerRef = useRef(null);
|
|
19
|
+
const doorAnimationRef = useRef(null);
|
|
20
|
+
const lightAnimationRef = useRef(null);
|
|
21
|
+
const handleAnimationRef = useRef(null);
|
|
22
|
+
const isDoorOpenRef = useRef(true);
|
|
23
|
+
const prefersReducedMotion = useReducedMotion();
|
|
24
|
+
const doorStyle = useMemo(() => ({
|
|
25
|
+
'--not-found-theme': themeSvgIconColor,
|
|
26
|
+
}), []);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
const root = rootRef.current;
|
|
30
|
+
if (!root || prefersReducedMotion) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
const door = root.querySelector('[data-not-found-door]');
|
|
34
|
+
const light = root.querySelector('[data-not-found-light]');
|
|
35
|
+
const plate = root.querySelector('[data-not-found-plate]');
|
|
36
|
+
const handle = root.querySelector('[data-not-found-handle]');
|
|
37
|
+
const dustNodes = Array.from(root.querySelectorAll('[data-not-found-dust]'));
|
|
38
|
+
if (!door || !light || !plate || !handle) {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
door.style.transform = 'rotateY(-46deg) translateX(-7px)';
|
|
42
|
+
light.style.opacity = '0.7';
|
|
43
|
+
light.style.transform = 'scaleX(1.12)';
|
|
44
|
+
(_a = timelineRef.current) === null || _a === void 0 ? void 0 : _a.revert();
|
|
45
|
+
timelineRef.current = createTimeline({ loop: true })
|
|
46
|
+
.add(plate, {
|
|
47
|
+
translateY: [0, -3, 0],
|
|
48
|
+
scale: [1, 1.025, 1],
|
|
49
|
+
duration: 1400,
|
|
50
|
+
ease: 'inOutSine',
|
|
51
|
+
})
|
|
52
|
+
.add(plate, {
|
|
53
|
+
translateY: [0, -3, 0],
|
|
54
|
+
scale: [1, 1.025, 1],
|
|
55
|
+
duration: 1400,
|
|
56
|
+
ease: 'inOutSine',
|
|
57
|
+
}, '+=900')
|
|
58
|
+
.add(dustNodes, {
|
|
59
|
+
opacity: [0, 0.72, 0],
|
|
60
|
+
translateY: [14, -18],
|
|
61
|
+
translateX: (_target, index) => (index % 2 === 0 ? 10 : -10),
|
|
62
|
+
scale: [0.4, 1, 0.6],
|
|
63
|
+
duration: 1800,
|
|
64
|
+
delay: stagger(80),
|
|
65
|
+
ease: 'outSine',
|
|
66
|
+
}, '<+=200');
|
|
67
|
+
(_b = shimmerRef.current) === null || _b === void 0 ? void 0 : _b.revert();
|
|
68
|
+
shimmerRef.current = animate(root.querySelectorAll('[data-not-found-shimmer]'), {
|
|
69
|
+
translateX: ['-120%', '120%'],
|
|
70
|
+
opacity: [0, 0.8, 0],
|
|
71
|
+
duration: 2400,
|
|
72
|
+
delay: stagger(160),
|
|
73
|
+
ease: 'inOutSine',
|
|
74
|
+
loop: true,
|
|
75
|
+
});
|
|
76
|
+
return () => {
|
|
77
|
+
var _a, _b, _c, _d, _e;
|
|
78
|
+
(_a = timelineRef.current) === null || _a === void 0 ? void 0 : _a.revert();
|
|
79
|
+
timelineRef.current = null;
|
|
80
|
+
(_b = shimmerRef.current) === null || _b === void 0 ? void 0 : _b.revert();
|
|
81
|
+
shimmerRef.current = null;
|
|
82
|
+
(_c = doorAnimationRef.current) === null || _c === void 0 ? void 0 : _c.revert();
|
|
83
|
+
doorAnimationRef.current = null;
|
|
84
|
+
(_d = lightAnimationRef.current) === null || _d === void 0 ? void 0 : _d.revert();
|
|
85
|
+
lightAnimationRef.current = null;
|
|
86
|
+
(_e = handleAnimationRef.current) === null || _e === void 0 ? void 0 : _e.revert();
|
|
87
|
+
handleAnimationRef.current = null;
|
|
88
|
+
};
|
|
89
|
+
}, [prefersReducedMotion]);
|
|
90
|
+
const toggleDoor = () => {
|
|
91
|
+
var _a, _b, _c;
|
|
92
|
+
const root = rootRef.current;
|
|
93
|
+
if (!root) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const door = root.querySelector('[data-not-found-door]');
|
|
97
|
+
const light = root.querySelector('[data-not-found-light]');
|
|
98
|
+
const handle = root.querySelector('[data-not-found-handle]');
|
|
99
|
+
if (!door || !light || !handle) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const nextOpen = !isDoorOpenRef.current;
|
|
103
|
+
isDoorOpenRef.current = nextOpen;
|
|
104
|
+
(_a = doorAnimationRef.current) === null || _a === void 0 ? void 0 : _a.revert();
|
|
105
|
+
(_b = lightAnimationRef.current) === null || _b === void 0 ? void 0 : _b.revert();
|
|
106
|
+
(_c = handleAnimationRef.current) === null || _c === void 0 ? void 0 : _c.revert();
|
|
107
|
+
if (prefersReducedMotion) {
|
|
108
|
+
door.style.transform = nextOpen ? 'rotateY(-56deg) translateX(-9px)' : 'rotateY(-2deg) translateX(0)';
|
|
109
|
+
light.style.opacity = nextOpen ? '0.76' : '0.2';
|
|
110
|
+
light.style.transform = nextOpen ? 'scaleX(1.18)' : 'scaleX(0.78)';
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
doorAnimationRef.current = animate(door, {
|
|
114
|
+
rotateY: nextOpen ? -56 : -2,
|
|
115
|
+
translateX: nextOpen ? -9 : 0,
|
|
116
|
+
duration: 760,
|
|
117
|
+
ease: 'outCubic',
|
|
118
|
+
});
|
|
119
|
+
lightAnimationRef.current = animate(light, {
|
|
120
|
+
opacity: nextOpen ? 0.76 : 0.2,
|
|
121
|
+
scaleX: nextOpen ? 1.18 : 0.78,
|
|
122
|
+
duration: 760,
|
|
123
|
+
ease: 'outCubic',
|
|
124
|
+
});
|
|
125
|
+
handleAnimationRef.current = animate(handle, {
|
|
126
|
+
scale: [1, 1.22, 1],
|
|
127
|
+
rotate: nextOpen ? [0, 18, 0] : [0, -18, 0],
|
|
128
|
+
duration: 520,
|
|
129
|
+
ease: 'inOutSine',
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
return (jsxs("div", { ref: rootRef, className: cn('relative flex min-h-dvh w-full items-center justify-center overflow-hidden px-4 py-8', className), style: doorStyle, children: [jsx("div", { className: "pointer-events-none absolute inset-0 -z-10 bg-[radial-gradient(circle_at_50%_20%,rgba(255,255,255,0.75),transparent_34%),linear-gradient(180deg,rgba(250,250,250,0.96),rgba(244,244,245,0.72))] dark:bg-[radial-gradient(circle_at_50%_20%,rgba(255,255,255,0.08),transparent_34%),linear-gradient(180deg,rgba(24,24,27,0.96),rgba(9,9,11,0.92))]" }), jsx("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 -z-10 h-1/2 bg-[linear-gradient(180deg,transparent,rgba(0,0,0,0.05))] dark:bg-[linear-gradient(180deg,transparent,rgba(0,0,0,0.34))]" }), jsxs("div", { className: "grid w-full max-w-4xl items-center gap-4 md:grid-cols-[minmax(0,0.9fr)_minmax(280px,0.78fr)] md:gap-6", children: [jsxs("section", { className: "order-2 text-center md:order-1 md:text-left", children: [jsx("h3", { className: cn('whitespace-nowrap text-[clamp(2.15rem,8vw,3.4rem)] font-black leading-none tracking-normal md:text-[clamp(2.6rem,4.5vw,4rem)] bg-linear-to-r bg-clip-text text-transparent', themeButtonGradientClass), children: "Page Not Found" }), jsx("p", { className: "mx-auto mt-5 max-w-xl text-base leading-7 text-muted-foreground md:mx-0 md:text-lg", children: "The page you're looking for doesn't exist" }), jsx("a", { href: homeUrl, className: cn('mt-4 inline-flex text-sm font-semibold underline underline-offset-4 transition-opacity hover:opacity-80', themeIconColor, 'decoration-current'), children: "Back to Homepage" }), jsx("span", { className: cn('mt-9 inline-flex size-2 rounded-full', themeBgColor) })] }), jsx("section", { className: "order-1 flex justify-center md:order-2", children: jsxs("div", { className: "relative aspect-[0.78] w-full max-w-[270px] sm:max-w-[315px] md:max-w-[330px] [perspective:1200px]", children: [jsx("div", { "data-not-found-light": "", className: "absolute left-[14%] top-[7%] h-[86%] w-[72%] rounded-[28px] bg-[radial-gradient(circle_at_50%_45%,rgba(255,255,255,0.96),color-mix(in_srgb,var(--not-found-theme)_42%,transparent)_42%,transparent_72%)] opacity-25 blur-xl" }), jsx("div", { className: "absolute inset-[4%] rounded-[32px] border border-black/10 bg-neutral-950/5 shadow-2xl shadow-black/10 dark:border-white/10 dark:bg-white/5" }), jsx("div", { className: "absolute inset-[8%] rounded-[26px] bg-[linear-gradient(180deg,rgba(255,255,255,0.88),rgba(228,228,231,0.86))] shadow-[inset_0_1px_0_rgba(255,255,255,0.85)] dark:bg-[linear-gradient(180deg,rgba(39,39,42,0.92),rgba(24,24,27,0.96))]" }), jsxs("div", { "data-not-found-door": "", className: "absolute inset-[8%] origin-left rounded-[26px] border border-black/10 bg-[linear-gradient(145deg,rgba(255,255,255,0.92),rgba(212,212,216,0.9))] shadow-2xl shadow-black/20 will-change-transform dark:border-white/10 dark:bg-[linear-gradient(145deg,rgba(63,63,70,0.96),rgba(24,24,27,0.98))]", children: [jsxs("div", { className: "absolute inset-4 overflow-hidden rounded-[20px] border border-black/10 dark:border-white/10", children: [jsx("div", { "data-not-found-shimmer": "", className: "absolute inset-y-0 w-1/3 -skew-x-12 bg-white/35 blur-md dark:bg-white/12" }), jsx("div", { className: "absolute inset-x-5 top-5 h-[30%] rounded-2xl border border-black/10 bg-white/35 dark:border-white/10 dark:bg-white/5" }), jsxs("a", { href: homeUrl, className: "absolute inset-x-5 bottom-5 flex h-[39%] flex-col items-center justify-center gap-2 rounded-2xl border border-black/10 bg-white/25 text-sm text-muted-foreground transition-opacity hover:opacity-80 dark:border-white/10 dark:bg-white/5", children: [siteIcon, jsx("span", { children: "Woops!" })] })] }), jsxs("div", { "data-not-found-plate": "", className: "absolute left-1/2 top-[18%] flex h-[88px] w-[156px] -translate-x-1/2 items-center justify-center overflow-hidden rounded-2xl border border-black/10 bg-white/86 shadow-lg shadow-black/10 dark:border-white/10 dark:bg-black/30", children: [jsx("div", { "data-not-found-shimmer": "", className: "absolute inset-y-0 w-1/2 -skew-x-12 bg-white/60 blur-md dark:bg-white/15" }), jsx("span", { className: cn('relative text-5xl font-black tabular-nums bg-linear-to-r bg-clip-text text-transparent', themeButtonGradientClass), children: "404" })] }), jsx("button", { type: "button", "data-not-found-handle": "", className: "absolute right-[16%] top-1/2 z-10 size-6 rounded-full border border-black/10 bg-[var(--not-found-theme)] shadow-lg shadow-black/20 outline-none ring-offset-2 transition-transform hover:scale-110 focus-visible:ring-2 focus-visible:ring-[var(--not-found-theme)] dark:border-white/15", "aria-label": "Toggle the 404 door", onClick: toggleDoor })] }), dust.map(dot => (jsx("span", { "data-not-found-dust": "", className: "absolute rounded-full bg-[var(--not-found-theme)] opacity-0", style: {
|
|
133
|
+
left: dot.left,
|
|
134
|
+
top: dot.top,
|
|
135
|
+
width: dot.size,
|
|
136
|
+
height: dot.size,
|
|
137
|
+
} }, dot.id)))] }) })] })] }));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export { AnimeNotFoundPage };
|
package/dist/main/anime/index.js
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
var animeBeamFrame = require('./anime-beam-frame.js');
|
|
5
5
|
var animeSpiralLoading = require('./anime-spiral-loading.js');
|
|
6
|
+
var anime404Page = require('./anime-404-page.js');
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
exports.AnimeBeamFrame = animeBeamFrame.AnimeBeamFrame;
|
|
10
11
|
exports.AnimeSpiralLoading = animeSpiralLoading.AnimeSpiralLoading;
|
|
12
|
+
exports.AnimeNotFoundPage = anime404Page.AnimeNotFoundPage;
|
package/dist/main/index.d.ts
CHANGED
package/dist/main/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var goToTop = require('./go-to-top.js');
|
|
5
|
+
var _404Page = require('./404-page.js');
|
|
5
6
|
var loading = require('./loading.js');
|
|
6
7
|
var nprogressBar = require('./nprogress-bar.js');
|
|
7
8
|
var richTextExpert = require('./rich-text-expert.js');
|
|
@@ -11,6 +12,7 @@ var infoTooltip = require('./info-tooltip.js');
|
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
exports.GoToTop = goToTop.GoToTop;
|
|
15
|
+
exports.NotFoundPage = _404Page.NotFoundPage;
|
|
14
16
|
exports.Loading = loading.Loading;
|
|
15
17
|
exports.getLoadingCycleDurationMs = loading.getLoadingCycleDurationMs;
|
|
16
18
|
exports.NProgressBar = nprogressBar.NProgressBar;
|
package/dist/main/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
export { GoToTop } from './go-to-top.mjs';
|
|
3
|
+
export { NotFoundPage } from './404-page.mjs';
|
|
3
4
|
export { Loading, getLoadingCycleDurationMs } from './loading.mjs';
|
|
4
5
|
export { NProgressBar } from './nprogress-bar.mjs';
|
|
5
6
|
export { createRichTextRenderer, richText } from './rich-text-expert.mjs';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface CreativeLeftPanelProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function CreativeLeftPanel({ children, className }: CreativeLeftPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var react = require('motion/react');
|
|
6
|
+
|
|
7
|
+
function CreativeLeftPanel({ children, className = '' }) {
|
|
8
|
+
return (jsxRuntime.jsx("div", { className: `relative h-full ${className}`, children: jsxRuntime.jsxs("div", { className: "relative h-full overflow-hidden rounded-[28px] border border-border/60 bg-background/95 backdrop-blur-2xl shadow-xl", children: [jsxRuntime.jsx("div", { className: "absolute -left-1 -top-1 z-30", children: jsxRuntime.jsxs("div", { className: "relative h-28 w-32 bg-linear-to-br from-orange-500 via-orange-600 to-orange-700 rounded-br-[2.75rem] shadow-lg", children: [jsxRuntime.jsx("div", { className: "absolute left-4 top-4 h-10 w-10 rounded-full bg-white/30 blur-sm" }), jsxRuntime.jsx("div", { className: "absolute left-6 top-6 h-5 w-14 rotate-12 rounded bg-white/20" })] }) }), jsxRuntime.jsxs("svg", { className: "absolute bottom-0 left-0 z-20 h-[380px] w-full pointer-events-none", viewBox: "0 0 680 420", preserveAspectRatio: "none", fill: "none", children: [jsxRuntime.jsx("defs", { children: jsxRuntime.jsxs("linearGradient", { id: "leftGlow", x1: "0%", y1: "100%", x2: "100%", y2: "30%", children: [jsxRuntime.jsx("stop", { offset: "0%", stopColor: "#f97316", stopOpacity: "0.25" }), jsxRuntime.jsx("stop", { offset: "100%", stopColor: "#fb923c", stopOpacity: "0.08" })] }) }), jsxRuntime.jsx(react.motion.path, { d: "M 0 380 \n Q 85 425 165 355 \n Q 255 265 355 285 \n Q 480 310 555 245 \n Q 615 195 680 235", stroke: "url(#leftGlow)", strokeWidth: "22", strokeLinecap: "round", strokeLinejoin: "round", initial: { pathLength: 0 }, animate: { pathLength: 1 }, transition: { duration: 2.4, ease: "easeOut" } }), jsxRuntime.jsx(react.motion.path, { d: "M 0 380 \n Q 85 425 165 355 \n Q 255 265 355 285 \n Q 480 310 555 245 \n Q 615 195 680 235", stroke: "#fbbf24", strokeWidth: "3", strokeOpacity: "0.45", initial: { pathLength: 0 }, animate: { pathLength: 1 }, transition: { duration: 2.6, ease: "easeOut" } })] }), jsxRuntime.jsx("div", { className: "relative z-10 h-full p-6 sm:p-8 pb-16", children: children })] }) }));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
exports.CreativeLeftPanel = CreativeLeftPanel;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { motion } from 'motion/react';
|
|
4
|
+
|
|
5
|
+
function CreativeLeftPanel({ children, className = '' }) {
|
|
6
|
+
return (jsx("div", { className: `relative h-full ${className}`, children: jsxs("div", { className: "relative h-full overflow-hidden rounded-[28px] border border-border/60 bg-background/95 backdrop-blur-2xl shadow-xl", children: [jsx("div", { className: "absolute -left-1 -top-1 z-30", children: jsxs("div", { className: "relative h-28 w-32 bg-linear-to-br from-orange-500 via-orange-600 to-orange-700 rounded-br-[2.75rem] shadow-lg", children: [jsx("div", { className: "absolute left-4 top-4 h-10 w-10 rounded-full bg-white/30 blur-sm" }), jsx("div", { className: "absolute left-6 top-6 h-5 w-14 rotate-12 rounded bg-white/20" })] }) }), jsxs("svg", { className: "absolute bottom-0 left-0 z-20 h-[380px] w-full pointer-events-none", viewBox: "0 0 680 420", preserveAspectRatio: "none", fill: "none", children: [jsx("defs", { children: jsxs("linearGradient", { id: "leftGlow", x1: "0%", y1: "100%", x2: "100%", y2: "30%", children: [jsx("stop", { offset: "0%", stopColor: "#f97316", stopOpacity: "0.25" }), jsx("stop", { offset: "100%", stopColor: "#fb923c", stopOpacity: "0.08" })] }) }), jsx(motion.path, { d: "M 0 380 \n Q 85 425 165 355 \n Q 255 265 355 285 \n Q 480 310 555 245 \n Q 615 195 680 235", stroke: "url(#leftGlow)", strokeWidth: "22", strokeLinecap: "round", strokeLinejoin: "round", initial: { pathLength: 0 }, animate: { pathLength: 1 }, transition: { duration: 2.4, ease: "easeOut" } }), jsx(motion.path, { d: "M 0 380 \n Q 85 425 165 355 \n Q 255 265 355 285 \n Q 480 310 555 245 \n Q 615 195 680 235", stroke: "#fbbf24", strokeWidth: "3", strokeOpacity: "0.45", initial: { pathLength: 0 }, animate: { pathLength: 1 }, transition: { duration: 2.6, ease: "easeOut" } })] }), jsx("div", { className: "relative z-10 h-full p-6 sm:p-8 pb-16", children: children })] }) }));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { CreativeLeftPanel };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface CreativeRightPanelProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function CreativeRightPanel({ children, className }: CreativeRightPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var react = require('motion/react');
|
|
6
|
+
|
|
7
|
+
function CreativeRightPanel({ children, className = '' }) {
|
|
8
|
+
return (jsxRuntime.jsx("div", { className: `relative h-full ${className}`, children: jsxRuntime.jsxs("div", { className: "relative h-full overflow-hidden rounded-[28px] border border-border/60 bg-background/95 backdrop-blur-2xl shadow-xl", children: [jsxRuntime.jsx("svg", { className: "absolute bottom-0 right-0 z-20 h-[380px] w-full pointer-events-none", viewBox: "0 0 680 420", preserveAspectRatio: "none", fill: "none", children: jsxRuntime.jsx(react.motion.path, { d: "M 0 235 \n Q 65 195 145 245 \n Q 220 310 345 285 \n Q 445 265 535 355 \n Q 615 425 680 380", stroke: "#f97316", strokeWidth: "18", strokeOpacity: "0.18", strokeLinecap: "round", strokeLinejoin: "round", initial: { pathLength: 0 }, animate: { pathLength: 1 }, transition: { duration: 2.2, ease: "easeOut" } }) }), jsxRuntime.jsx("div", { className: "relative z-10 h-full p-6 sm:p-8 pb-12", children: children })] }) }));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
exports.CreativeRightPanel = CreativeRightPanel;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { motion } from 'motion/react';
|
|
4
|
+
|
|
5
|
+
function CreativeRightPanel({ children, className = '' }) {
|
|
6
|
+
return (jsx("div", { className: `relative h-full ${className}`, children: jsxs("div", { className: "relative h-full overflow-hidden rounded-[28px] border border-border/60 bg-background/95 backdrop-blur-2xl shadow-xl", children: [jsx("svg", { className: "absolute bottom-0 right-0 z-20 h-[380px] w-full pointer-events-none", viewBox: "0 0 680 420", preserveAspectRatio: "none", fill: "none", children: jsx(motion.path, { d: "M 0 235 \n Q 65 195 145 245 \n Q 220 310 345 285 \n Q 445 265 535 355 \n Q 615 425 680 380", stroke: "#f97316", strokeWidth: "18", strokeOpacity: "0.18", strokeLinecap: "round", strokeLinejoin: "round", initial: { pathLength: 0 }, animate: { pathLength: 1 }, transition: { duration: 2.2, ease: "easeOut" } }) }), jsx("div", { className: "relative z-10 h-full p-6 sm:p-8 pb-12", children: children })] }) }));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { CreativeRightPanel };
|