nucleus-core-ts 0.8.7 → 0.8.9
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/client.js +1 -1
- package/dist/fe/components/AbstractAnimatedBackground/index.js +437 -0
- package/dist/fe/components/AuthorizationPage/components/AuthorizationPage.js +841 -0
- package/dist/fe/components/AuthorizationPage/components/ClaimList.js +100 -0
- package/dist/fe/components/AuthorizationPage/components/RoleClaimEditor.js +232 -0
- package/dist/fe/components/AuthorizationPage/components/RoleList.js +115 -0
- package/dist/fe/components/AuthorizationPage/index.js +6 -0
- package/dist/fe/components/AuthorizationPage/store/index.js +117 -0
- package/dist/fe/components/AuthorizationPage/theme/index.js +137 -0
- package/dist/fe/components/AuthorizationPage/types/index.js +1 -0
- package/dist/fe/components/Button/components/Button.js +158 -0
- package/dist/fe/components/Button/components/ButtonSpinner.js +52 -0
- package/dist/fe/components/Button/index.js +3 -0
- package/dist/fe/components/Button/theme/index.js +186 -0
- package/dist/fe/components/Button/types/index.js +1 -0
- package/dist/fe/components/Button/utils/cn.js +5 -0
- package/dist/fe/components/Captcha/components/Captcha.js +311 -0
- package/dist/fe/components/Captcha/index.js +2 -0
- package/dist/fe/components/Captcha/theme.js +52 -0
- package/dist/fe/components/Captcha/types.js +1 -0
- package/dist/fe/components/ChangePasswordPage/components/ChangePasswordForm.js +242 -0
- package/dist/fe/components/ChangePasswordPage/components/ChangePasswordHeader.js +39 -0
- package/dist/fe/components/ChangePasswordPage/components/ChangePasswordPage.js +60 -0
- package/dist/fe/components/ChangePasswordPage/index.js +5 -0
- package/dist/fe/components/ChangePasswordPage/store/index.js +44 -0
- package/dist/fe/components/ChangePasswordPage/theme/index.js +87 -0
- package/dist/fe/components/ChangePasswordPage/types/index.js +1 -0
- package/dist/fe/components/Checkbox/components/Checkbox.js +115 -0
- package/dist/fe/components/Checkbox/components/CheckboxIcon.js +119 -0
- package/dist/fe/components/Checkbox/components/SwitchTrack.js +178 -0
- package/dist/fe/components/Checkbox/index.js +4 -0
- package/dist/fe/components/Checkbox/theme/index.js +221 -0
- package/dist/fe/components/Checkbox/types/index.js +1 -0
- package/dist/fe/components/Checkbox/utils/cn.js +5 -0
- package/dist/fe/components/DataTable/DataTable.js +225 -0
- package/dist/fe/components/DataTable/components/ActionCell.js +26 -0
- package/dist/fe/components/DataTable/components/DataCell.js +76 -0
- package/dist/fe/components/DataTable/components/EditableCell.js +221 -0
- package/dist/fe/components/DataTable/components/EmptyState.js +29 -0
- package/dist/fe/components/DataTable/components/HeaderCell.js +64 -0
- package/dist/fe/components/DataTable/components/InfiniteScrollTrigger.js +66 -0
- package/dist/fe/components/DataTable/components/LoadingSpinner.js +19 -0
- package/dist/fe/components/DataTable/components/ResizeHandle.js +41 -0
- package/dist/fe/components/DataTable/components/SelectionCell.js +105 -0
- package/dist/fe/components/DataTable/components/SkeletonRow.js +56 -0
- package/dist/fe/components/DataTable/components/SkeletonTable.js +83 -0
- package/dist/fe/components/DataTable/components/SortIcon.js +39 -0
- package/dist/fe/components/DataTable/components/TableHeader.js +49 -0
- package/dist/fe/components/DataTable/components/TableRow.js +118 -0
- package/dist/fe/components/DataTable/components/index.js +14 -0
- package/dist/fe/components/DataTable/hooks/index.js +2 -0
- package/dist/fe/components/DataTable/hooks/useAutoFitColumn.js +23 -0
- package/dist/fe/components/DataTable/hooks/useResizeColumn.js +122 -0
- package/dist/fe/components/DataTable/index.js +3 -0
- package/dist/fe/components/DataTable/store/index.js +97 -0
- package/dist/fe/components/DataTable/theme/index.js +144 -0
- package/dist/fe/components/DataTable/types/index.js +1 -0
- package/dist/fe/components/DataTable/utils/cn.js +5 -0
- package/dist/fe/components/DatePicker/components/CalendarGrid.js +95 -0
- package/dist/fe/components/DatePicker/components/CalendarHeader.js +152 -0
- package/dist/fe/components/DatePicker/components/DatePicker.js +381 -0
- package/dist/fe/components/DatePicker/components/MonthYearSelector.js +93 -0
- package/dist/fe/components/DatePicker/index.js +7 -0
- package/dist/fe/components/DatePicker/locales/index.js +1113 -0
- package/dist/fe/components/DatePicker/theme/index.js +315 -0
- package/dist/fe/components/DatePicker/types/index.js +1 -0
- package/dist/fe/components/DatePicker/utils/cn.js +5 -0
- package/dist/fe/components/DatePicker/utils/date.js +132 -0
- package/dist/fe/components/DevicesPage/components/DeviceCard.js +251 -0
- package/dist/fe/components/DevicesPage/components/DevicesHeader.js +42 -0
- package/dist/fe/components/DevicesPage/components/DevicesPage.js +450 -0
- package/dist/fe/components/DevicesPage/index.js +5 -0
- package/dist/fe/components/DevicesPage/store/index.js +55 -0
- package/dist/fe/components/DevicesPage/theme/index.js +131 -0
- package/dist/fe/components/DevicesPage/types/index.js +1 -0
- package/dist/fe/components/ForgotPasswordPage/components/ForgotPasswordForm.js +214 -0
- package/dist/fe/components/ForgotPasswordPage/components/ForgotPasswordHeader.js +42 -0
- package/dist/fe/components/ForgotPasswordPage/components/ForgotPasswordPage.js +59 -0
- package/dist/fe/components/ForgotPasswordPage/index.js +5 -0
- package/dist/fe/components/ForgotPasswordPage/store/index.js +28 -0
- package/dist/fe/components/ForgotPasswordPage/theme/index.js +87 -0
- package/dist/fe/components/ForgotPasswordPage/types/index.js +1 -0
- package/dist/fe/components/FormBuilder/components/FormBuilder.js +156 -0
- package/dist/fe/components/FormBuilder/components/FormField.js +218 -0
- package/dist/fe/components/FormBuilder/hooks/useFormBuilder.js +152 -0
- package/dist/fe/components/FormBuilder/index.js +4 -0
- package/dist/fe/components/FormBuilder/theme/index.js +134 -0
- package/dist/fe/components/FormBuilder/types/index.js +1 -0
- package/dist/fe/components/FormBuilder/utils/cn.js +5 -0
- package/dist/fe/components/FormBuilder/utils/fieldMapping.js +216 -0
- package/dist/fe/components/FormBuilder/utils/validation.js +78 -0
- package/dist/fe/components/LoginPage/components/LoginForm.js +214 -0
- package/dist/fe/components/LoginPage/components/LoginHeader.js +24 -0
- package/dist/fe/components/LoginPage/components/LoginPage.js +138 -0
- package/dist/fe/components/LoginPage/index.js +5 -0
- package/dist/fe/components/LoginPage/store/index.js +59 -0
- package/dist/fe/components/LoginPage/theme/index.js +98 -0
- package/dist/fe/components/LoginPage/types/index.js +1 -0
- package/dist/fe/components/MagicLinkVerifyPage/components/MagicLinkVerifyPage.js +200 -0
- package/dist/fe/components/MagicLinkVerifyPage/index.js +3 -0
- package/dist/fe/components/MagicLinkVerifyPage/store.js +20 -0
- package/dist/fe/components/MagicLinkVerifyPage/theme.js +36 -0
- package/dist/fe/components/MagicLinkVerifyPage/types.js +1 -0
- package/dist/fe/components/NucleusEntityShowcase.js +1409 -0
- package/dist/fe/components/NucleusTextInput/components/FloatingLabel.js +56 -0
- package/dist/fe/components/NucleusTextInput/components/InputIcons.js +258 -0
- package/dist/fe/components/NucleusTextInput/components/NucleusTextInput.js +321 -0
- package/dist/fe/components/NucleusTextInput/components/PasswordStrengthIndicator.js +104 -0
- package/dist/fe/components/NucleusTextInput/components/TypewriterText.js +56 -0
- package/dist/fe/components/NucleusTextInput/index.js +7 -0
- package/dist/fe/components/NucleusTextInput/theme/index.js +121 -0
- package/dist/fe/components/NucleusTextInput/types/index.js +1 -0
- package/dist/fe/components/NucleusTextInput/utils/cn.js +5 -0
- package/dist/fe/components/NucleusTextInput/utils/format.js +62 -0
- package/dist/fe/components/NucleusTextInput/utils/validation.js +191 -0
- package/dist/fe/components/ProfilePage/components/AddressCard.js +196 -0
- package/dist/fe/components/ProfilePage/components/PhoneCard.js +206 -0
- package/dist/fe/components/ProfilePage/components/ProfileHeader.js +150 -0
- package/dist/fe/components/ProfilePage/components/ProfilePage.js +1336 -0
- package/dist/fe/components/ProfilePage/index.js +6 -0
- package/dist/fe/components/ProfilePage/store/index.js +115 -0
- package/dist/fe/components/ProfilePage/theme/index.js +168 -0
- package/dist/fe/components/ProfilePage/types/index.js +1 -0
- package/dist/fe/components/RangePicker/components/RangePicker.js +338 -0
- package/dist/fe/components/RangePicker/components/RangeThumb.js +68 -0
- package/dist/fe/components/RangePicker/components/RangeTooltip.js +45 -0
- package/dist/fe/components/RangePicker/components/RangeTrack.js +32 -0
- package/dist/fe/components/RangePicker/index.js +5 -0
- package/dist/fe/components/RangePicker/theme/index.js +88 -0
- package/dist/fe/components/RangePicker/types/index.js +1 -0
- package/dist/fe/components/RangePicker/utils/cn.js +3 -0
- package/dist/fe/components/RegisterPage/components/PasswordStrengthIndicator.js +107 -0
- package/dist/fe/components/RegisterPage/components/RegisterForm.js +322 -0
- package/dist/fe/components/RegisterPage/components/RegisterHeader.js +23 -0
- package/dist/fe/components/RegisterPage/components/RegisterPage.js +85 -0
- package/dist/fe/components/RegisterPage/index.js +6 -0
- package/dist/fe/components/RegisterPage/store/index.js +106 -0
- package/dist/fe/components/RegisterPage/theme/index.js +128 -0
- package/dist/fe/components/RegisterPage/types/index.js +1 -0
- package/dist/fe/components/ResetPasswordPage/components/ResetPasswordForm.js +347 -0
- package/dist/fe/components/ResetPasswordPage/components/ResetPasswordHeader.js +42 -0
- package/dist/fe/components/ResetPasswordPage/components/ResetPasswordPage.js +61 -0
- package/dist/fe/components/ResetPasswordPage/index.js +5 -0
- package/dist/fe/components/ResetPasswordPage/store/index.js +36 -0
- package/dist/fe/components/ResetPasswordPage/theme/index.js +99 -0
- package/dist/fe/components/ResetPasswordPage/types/index.js +1 -0
- package/dist/fe/components/SearchBox/components/SearchBox.js +271 -0
- package/dist/fe/components/SearchBox/components/SearchBoxDropdown.js +87 -0
- package/dist/fe/components/SearchBox/index.js +5 -0
- package/dist/fe/components/SearchBox/theme/index.js +184 -0
- package/dist/fe/components/SearchBox/types/index.js +1 -0
- package/dist/fe/components/SearchBox/utils/cn.js +5 -0
- package/dist/fe/components/SearchBox/utils/debounce.js +22 -0
- package/dist/fe/components/SearchBox/utils/sanitize.js +48 -0
- package/dist/fe/components/SelectBox/components/SelectBox.js +364 -0
- package/dist/fe/components/SelectBox/components/SelectDropdown.js +92 -0
- package/dist/fe/components/SelectBox/components/SelectOptionItem.js +43 -0
- package/dist/fe/components/SelectBox/components/SelectTrigger.js +22 -0
- package/dist/fe/components/SelectBox/index.js +5 -0
- package/dist/fe/components/SelectBox/theme/index.js +98 -0
- package/dist/fe/components/SelectBox/types/index.js +1 -0
- package/dist/fe/components/SelectBox/utils/cn.js +3 -0
- package/dist/fe/components/SetPasswordPage/components/PasswordStrengthIndicator.js +107 -0
- package/dist/fe/components/SetPasswordPage/components/SetPasswordForm.js +142 -0
- package/dist/fe/components/SetPasswordPage/components/SetPasswordHeader.js +23 -0
- package/dist/fe/components/SetPasswordPage/components/SetPasswordPage.js +263 -0
- package/dist/fe/components/SetPasswordPage/index.js +7 -0
- package/dist/fe/components/SetPasswordPage/store/index.js +79 -0
- package/dist/fe/components/SetPasswordPage/theme/index.js +98 -0
- package/dist/fe/components/SetPasswordPage/types/index.js +12 -0
- package/dist/fe/components/UsersPage/components/InviteUserModal.js +262 -0
- package/dist/fe/components/UsersPage/components/Pagination.js +147 -0
- package/dist/fe/components/UsersPage/components/RoleAssignmentModal.js +186 -0
- package/dist/fe/components/UsersPage/components/StatsCards.js +124 -0
- package/dist/fe/components/UsersPage/components/UserDetailDrawer.js +444 -0
- package/dist/fe/components/UsersPage/components/UserFilters.js +142 -0
- package/dist/fe/components/UsersPage/components/UserListItem.js +125 -0
- package/dist/fe/components/UsersPage/components/UserListSkeleton.js +40 -0
- package/dist/fe/components/UsersPage/components/UsersPage.js +556 -0
- package/dist/fe/components/UsersPage/index.js +10 -0
- package/dist/fe/components/UsersPage/store/index.js +151 -0
- package/dist/fe/components/UsersPage/theme/index.js +231 -0
- package/dist/fe/components/UsersPage/types/index.js +1 -0
- package/dist/fe/components/VerifyEmailPage/components/VerifyEmailPage.js +290 -0
- package/dist/fe/components/VerifyEmailPage/index.js +3 -0
- package/dist/fe/components/VerifyEmailPage/store/index.js +45 -0
- package/dist/fe/components/VerifyEmailPage/theme/index.js +52 -0
- package/dist/fe/components/VerifyEmailPage/types/index.js +1 -0
- package/dist/fe/hooks/useNucleusEntity.js +247 -0
- package/dist/fe/index.js +28 -157
- package/dist/fe/types/index.js +1 -0
- package/dist/fe/utils/cn.js +5 -0
- package/dist/fe/utils/columnUtils.js +189 -0
- package/dist/fe/utils/endpointKeys.js +44 -0
- package/dist/index.js +1 -1
- package/dist/nucleus.config.d.ts +2 -0
- package/dist/src/Client/ApiCaller/client.js +1 -0
- package/dist/src/Client/ApiCaller/examples/usage.example.js +1 -0
- package/dist/src/Client/ApiCaller/generator.js +1 -0
- package/dist/src/Client/ApiCaller/index.js +1 -0
- package/dist/src/Client/ApiCaller/server.js +1 -0
- package/dist/src/Client/ApiCaller/system-tables.js +1 -0
- package/dist/src/Client/ApiCaller/types.js +1 -0
- package/dist/src/Client/Proxy/httpProxy.js +1 -0
- package/dist/src/Client/Proxy/index.js +1 -1
- package/dist/src/Client/Proxy/server.js +1 -0
- package/dist/src/Client/Proxy/types.js +1 -0
- package/dist/src/Client/Proxy/utils.js +1 -0
- package/dist/src/Client/Proxy/wsProxy.js +1 -0
- package/dist/src/Client/ServerFetch/index.js +1 -0
- package/dist/src/Client/ServerFetch/types.js +1 -0
- package/dist/src/Client/index.js +1 -0
- package/package.json +1 -1
- package/scripts/build.ts +41 -16
package/dist/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x4065(){var _0xf09eb7=['nZbztMvtt0i','mti2mxjRsKTkuW','mZu3mZu4mgHqwMzsEa','nZDtrxfcugO','mtiXmenpB1jMvq','ne9SALfXDq','ndy5otaYD3Dju0nI','mJe0mtvcyKzUwvK','mJKYmZyWDerLzLbY','otLuzKfcAfe','mJe3ntK2CePSEu9m','mZGWota2n0HTuLzJzG','odC4mZbQzLDRtuu'];_0x4065=function(){return _0xf09eb7;};return _0x4065();}function _0x5d51(_0x2d8a2c,_0x576668){_0x2d8a2c=_0x2d8a2c-0x167;var _0x406561=_0x4065();var _0x5d51bd=_0x406561[_0x2d8a2c];if(_0x5d51['oAHYve']===undefined){var _0x946457=function(_0x299400){var _0x2c7b86='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x3be6a7='',_0x4a8c25='';for(var _0x2308c7=0x0,_0x494cd2,_0x4e8f3f,_0x3e1804=0x0;_0x4e8f3f=_0x299400['charAt'](_0x3e1804++);~_0x4e8f3f&&(_0x494cd2=_0x2308c7%0x4?_0x494cd2*0x40+_0x4e8f3f:_0x4e8f3f,_0x2308c7++%0x4)?_0x3be6a7+=String['fromCharCode'](0xff&_0x494cd2>>(-0x2*_0x2308c7&0x6)):0x0){_0x4e8f3f=_0x2c7b86['indexOf'](_0x4e8f3f);}for(var _0x524f34=0x0,_0x57e32a=_0x3be6a7['length'];_0x524f34<_0x57e32a;_0x524f34++){_0x4a8c25+='%'+('00'+_0x3be6a7['charCodeAt'](_0x524f34)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4a8c25);};_0x5d51['wRfKdN']=_0x946457,_0x5d51['lfMNAu']={},_0x5d51['oAHYve']=!![];}var _0x3ab107=_0x406561[0x0],_0x35778d=_0x2d8a2c+_0x3ab107,_0x43a487=_0x5d51['lfMNAu'][_0x35778d];return!_0x43a487?(_0x5d51bd=_0x5d51['wRfKdN'](_0x5d51bd),_0x5d51['lfMNAu'][_0x35778d]=_0x5d51bd):_0x5d51bd=_0x43a487,_0x5d51bd;}(function(_0x3baedd,_0x34faeb){var _0x430a1f=_0x5d51,_0x32616a=_0x3baedd();while(!![]){try{var _0x1529e6=parseInt(_0x430a1f(0x167))/0x1*(parseInt(_0x430a1f(0x16d))/0x2)+-parseInt(_0x430a1f(0x16b))/0x3*(parseInt(_0x430a1f(0x172))/0x4)+parseInt(_0x430a1f(0x16f))/0x5+-parseInt(_0x430a1f(0x173))/0x6*(-parseInt(_0x430a1f(0x170))/0x7)+-parseInt(_0x430a1f(0x168))/0x8*(-parseInt(_0x430a1f(0x169))/0x9)+-parseInt(_0x430a1f(0x16c))/0xa*(-parseInt(_0x430a1f(0x171))/0xb)+parseInt(_0x430a1f(0x16a))/0xc*(-parseInt(_0x430a1f(0x16e))/0xd);if(_0x1529e6===_0x34faeb)break;else _0x32616a['push'](_0x32616a['shift']());}catch(_0x338570){_0x32616a['push'](_0x32616a['shift']());}}}(_0x4065,0xa26af));export*from'./src/Client/ApiCaller';
|
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Canvas, useFrame } from "@react-three/fiber";
|
|
4
|
+
import { Suspense, useRef } from "react";
|
|
5
|
+
import { DoubleSide, ShaderMaterial, Vector2 } from "three";
|
|
6
|
+
const BUBBLE_SPECS = [
|
|
7
|
+
{
|
|
8
|
+
size: 32,
|
|
9
|
+
left: "12%",
|
|
10
|
+
top: "18%",
|
|
11
|
+
delay: "0s",
|
|
12
|
+
duration: "8s",
|
|
13
|
+
opacity: 0.55
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
size: 20,
|
|
17
|
+
left: "28%",
|
|
18
|
+
top: "72%",
|
|
19
|
+
delay: "2s",
|
|
20
|
+
duration: "7s",
|
|
21
|
+
opacity: 0.4
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
size: 26,
|
|
25
|
+
left: "46%",
|
|
26
|
+
top: "36%",
|
|
27
|
+
delay: "1s",
|
|
28
|
+
duration: "6.5s",
|
|
29
|
+
opacity: 0.48
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
size: 18,
|
|
33
|
+
left: "64%",
|
|
34
|
+
top: "58%",
|
|
35
|
+
delay: "3s",
|
|
36
|
+
duration: "7.4s",
|
|
37
|
+
opacity: 0.35
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
size: 24,
|
|
41
|
+
left: "78%",
|
|
42
|
+
top: "28%",
|
|
43
|
+
delay: "1.8s",
|
|
44
|
+
duration: "8.5s",
|
|
45
|
+
opacity: 0.5
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
size: 16,
|
|
49
|
+
left: "86%",
|
|
50
|
+
top: "62%",
|
|
51
|
+
delay: "4.1s",
|
|
52
|
+
duration: "6.8s",
|
|
53
|
+
opacity: 0.38
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
size: 28,
|
|
57
|
+
left: "32%",
|
|
58
|
+
top: "52%",
|
|
59
|
+
delay: "2.6s",
|
|
60
|
+
duration: "7.2s",
|
|
61
|
+
opacity: 0.44
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
size: 14,
|
|
65
|
+
left: "58%",
|
|
66
|
+
top: "22%",
|
|
67
|
+
delay: "0.8s",
|
|
68
|
+
duration: "6.2s",
|
|
69
|
+
opacity: 0.32
|
|
70
|
+
}
|
|
71
|
+
];
|
|
72
|
+
const MARBLE_VERTEX_SHADER = /* glsl */ `
|
|
73
|
+
varying vec2 vUv;
|
|
74
|
+
void main() {
|
|
75
|
+
vUv = uv;
|
|
76
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
77
|
+
}
|
|
78
|
+
`;
|
|
79
|
+
const MARBLE_FRAGMENT_SHADER = /* glsl */ `
|
|
80
|
+
precision highp float;
|
|
81
|
+
|
|
82
|
+
varying vec2 vUv;
|
|
83
|
+
|
|
84
|
+
uniform float uTime;
|
|
85
|
+
uniform vec2 uPointer;
|
|
86
|
+
uniform float uBaseShift;
|
|
87
|
+
uniform float uAccentShift;
|
|
88
|
+
uniform float uFlashIntensity;
|
|
89
|
+
|
|
90
|
+
float hash(vec2 p) {
|
|
91
|
+
return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
float noise(vec2 p) {
|
|
95
|
+
vec2 i = floor(p);
|
|
96
|
+
vec2 f = fract(p);
|
|
97
|
+
float a = hash(i);
|
|
98
|
+
float b = hash(i + vec2(1.0, 0.0));
|
|
99
|
+
float c = hash(i + vec2(0.0, 1.0));
|
|
100
|
+
float d = hash(i + vec2(1.0, 1.0));
|
|
101
|
+
vec2 u = f * f * (3.0 - 2.0 * f);
|
|
102
|
+
return mix(a, b, u.x) + (c - a) * u.y * (1.0 - u.x) + (d - b) * u.x * u.y;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
float fbm(vec2 p) {
|
|
106
|
+
float total = 0.0;
|
|
107
|
+
float amplitude = 0.5;
|
|
108
|
+
for (int i = 0; i < 5; i++) {
|
|
109
|
+
total += noise(p) * amplitude;
|
|
110
|
+
p *= 2.0;
|
|
111
|
+
amplitude *= 0.5;
|
|
112
|
+
}
|
|
113
|
+
return total;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
vec3 palette(float t, float timeShift) {
|
|
117
|
+
float cycle = sin(timeShift * 0.08) * 0.5 + 0.5;
|
|
118
|
+
|
|
119
|
+
vec3 blue = vec3(0.345, 0.486, 0.968);
|
|
120
|
+
vec3 purple = vec3(0.639, 0.451, 0.937);
|
|
121
|
+
vec3 pink = vec3(0.925, 0.337, 0.745);
|
|
122
|
+
vec3 teal = vec3(0.2, 0.8, 0.7);
|
|
123
|
+
vec3 orange = vec3(0.95, 0.6, 0.25);
|
|
124
|
+
vec3 whiteHighlight = vec3(0.98, 0.96, 0.99);
|
|
125
|
+
|
|
126
|
+
vec3 primaryA = mix(blue, teal, cycle);
|
|
127
|
+
vec3 primaryB = mix(purple, orange, cycle);
|
|
128
|
+
vec3 accentA = mix(pink, vec3(0.4, 0.9, 0.6), cycle);
|
|
129
|
+
vec3 accentB = mix(whiteHighlight, vec3(1.0, 0.9, 0.7), cycle);
|
|
130
|
+
|
|
131
|
+
vec3 base = mix(primaryA, primaryB, smoothstep(0.2, 0.8, t));
|
|
132
|
+
vec3 accent = mix(accentA, accentB, smoothstep(0.5, 1.0, t));
|
|
133
|
+
return mix(base, accent, 0.45 + 0.35 * sin(t * 3.14159));
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
void main() {
|
|
137
|
+
vec2 uv = vUv * 2.6 - 1.3;
|
|
138
|
+
vec2 flowUv = uv;
|
|
139
|
+
flowUv.x += uPointer.x * 0.18;
|
|
140
|
+
flowUv.y += uPointer.y * 0.12;
|
|
141
|
+
|
|
142
|
+
float t = uTime * 0.12;
|
|
143
|
+
float basePattern = fbm(flowUv * 2.6 + t);
|
|
144
|
+
float swirl = fbm(vec2(flowUv.y + basePattern * 0.6 + t * 0.5, flowUv.x + t));
|
|
145
|
+
float marble = sin((flowUv.x + swirl * 1.6) * 6.0 + basePattern * 2.4 + t * 2.4);
|
|
146
|
+
float accent = fbm(flowUv * 4.2 + uBaseShift + t * 1.2);
|
|
147
|
+
float highlight = smoothstep(0.55, 0.9, fbm(flowUv * 6.0 + uAccentShift + t * 0.8));
|
|
148
|
+
|
|
149
|
+
float finalPattern = (marble * 0.35 + basePattern * 0.4 + accent * 0.25);
|
|
150
|
+
finalPattern = 0.5 + 0.5 * finalPattern;
|
|
151
|
+
vec3 color = palette(finalPattern, uTime);
|
|
152
|
+
|
|
153
|
+
float depth = smoothstep(0.0, 0.6, basePattern) * 0.4;
|
|
154
|
+
float sheen = highlight * 0.6;
|
|
155
|
+
|
|
156
|
+
color += vec3(0.08, 0.06, 0.12) * depth;
|
|
157
|
+
color += vec3(0.25, 0.28, 0.35) * sheen;
|
|
158
|
+
|
|
159
|
+
color += vec3(0.82, 0.86, 1.0) * uFlashIntensity * 0.15;
|
|
160
|
+
|
|
161
|
+
gl_FragColor = vec4(color, 0.95 + uFlashIntensity * 0.012);
|
|
162
|
+
}
|
|
163
|
+
`;
|
|
164
|
+
function combineClassNames(baseClassName, extraClassName) {
|
|
165
|
+
if (!extraClassName) {
|
|
166
|
+
return baseClassName;
|
|
167
|
+
}
|
|
168
|
+
return `${baseClassName} ${extraClassName}`;
|
|
169
|
+
}
|
|
170
|
+
function useMarbleMaterial() {
|
|
171
|
+
const materialRef = useRef(null);
|
|
172
|
+
const uniforms = {
|
|
173
|
+
uTime: {
|
|
174
|
+
value: 0
|
|
175
|
+
},
|
|
176
|
+
uPointer: {
|
|
177
|
+
value: new Vector2(0, 0)
|
|
178
|
+
},
|
|
179
|
+
uBaseShift: {
|
|
180
|
+
value: Math.random() * 10
|
|
181
|
+
},
|
|
182
|
+
uAccentShift: {
|
|
183
|
+
value: Math.random() * 20
|
|
184
|
+
},
|
|
185
|
+
uFlashIntensity: {
|
|
186
|
+
value: 0
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
function handleFrame(state, delta) {
|
|
190
|
+
if (!materialRef.current) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
uniforms.uTime.value += delta;
|
|
194
|
+
uniforms.uPointer.value.set(state.pointer.x, state.pointer.y);
|
|
195
|
+
const { uniforms: activeUniforms } = materialRef.current;
|
|
196
|
+
if (activeUniforms.uTime) {
|
|
197
|
+
activeUniforms.uTime.value = uniforms.uTime.value;
|
|
198
|
+
}
|
|
199
|
+
if (activeUniforms.uPointer) {
|
|
200
|
+
activeUniforms.uPointer.value.copy(uniforms.uPointer.value);
|
|
201
|
+
}
|
|
202
|
+
if (activeUniforms.uFlashIntensity) {
|
|
203
|
+
activeUniforms.uFlashIntensity.value = uniforms.uFlashIntensity.value;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
useFrame(handleFrame);
|
|
207
|
+
if (materialRef.current === null) {
|
|
208
|
+
materialRef.current = new ShaderMaterial({
|
|
209
|
+
vertexShader: MARBLE_VERTEX_SHADER,
|
|
210
|
+
fragmentShader: MARBLE_FRAGMENT_SHADER,
|
|
211
|
+
transparent: true,
|
|
212
|
+
depthWrite: false,
|
|
213
|
+
side: DoubleSide,
|
|
214
|
+
uniforms: {
|
|
215
|
+
uTime: uniforms.uTime,
|
|
216
|
+
uPointer: uniforms.uPointer,
|
|
217
|
+
uBaseShift: uniforms.uBaseShift,
|
|
218
|
+
uAccentShift: uniforms.uAccentShift,
|
|
219
|
+
uFlashIntensity: uniforms.uFlashIntensity
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
materialRef.current.needsUpdate = true;
|
|
223
|
+
}
|
|
224
|
+
return materialRef;
|
|
225
|
+
}
|
|
226
|
+
function MarblePlane({ lightningValue }) {
|
|
227
|
+
const materialRef = useMarbleMaterial();
|
|
228
|
+
const meshRef = useRef(null);
|
|
229
|
+
function handleFrame(state, delta) {
|
|
230
|
+
if (!meshRef.current) {
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
if (materialRef.current?.uniforms.uFlashIntensity) {
|
|
234
|
+
materialRef.current.uniforms.uFlashIntensity.value = lightningValue.current;
|
|
235
|
+
}
|
|
236
|
+
meshRef.current.rotation.z += delta * 0.02;
|
|
237
|
+
meshRef.current.position.x = state.pointer.x * 0.08;
|
|
238
|
+
meshRef.current.position.y = state.pointer.y * 0.04;
|
|
239
|
+
const scalePulse = 1.04 + Math.sin(state.clock.elapsedTime * 0.45) * 0.02;
|
|
240
|
+
meshRef.current.scale.set(scalePulse, scalePulse, scalePulse);
|
|
241
|
+
}
|
|
242
|
+
useFrame(handleFrame);
|
|
243
|
+
return /*#__PURE__*/ _jsxs("mesh", {
|
|
244
|
+
ref: meshRef,
|
|
245
|
+
position: [
|
|
246
|
+
0,
|
|
247
|
+
0,
|
|
248
|
+
0
|
|
249
|
+
],
|
|
250
|
+
children: [
|
|
251
|
+
/*#__PURE__*/ _jsx("planeGeometry", {
|
|
252
|
+
args: [
|
|
253
|
+
4.4,
|
|
254
|
+
3.2,
|
|
255
|
+
64,
|
|
256
|
+
64
|
|
257
|
+
]
|
|
258
|
+
}),
|
|
259
|
+
/*#__PURE__*/ _jsx("primitive", {
|
|
260
|
+
object: materialRef.current,
|
|
261
|
+
attach: "material"
|
|
262
|
+
})
|
|
263
|
+
]
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
function FlowHalo({ lightningValue }) {
|
|
267
|
+
const materialRef = useRef(null);
|
|
268
|
+
const meshRef = useRef(null);
|
|
269
|
+
if (materialRef.current === null) {
|
|
270
|
+
const radialShader = new ShaderMaterial({
|
|
271
|
+
vertexShader: MARBLE_VERTEX_SHADER,
|
|
272
|
+
fragmentShader: /* glsl */ `
|
|
273
|
+
precision mediump float;
|
|
274
|
+
varying vec2 vUv;
|
|
275
|
+
uniform float uTime;
|
|
276
|
+
uniform float uFlash;
|
|
277
|
+
void main() {
|
|
278
|
+
vec2 uv = vUv - 0.5;
|
|
279
|
+
float radius = length(uv);
|
|
280
|
+
float angle = atan(uv.y, uv.x);
|
|
281
|
+
float glow = smoothstep(0.45, 0.05, radius);
|
|
282
|
+
float ripple = sin(angle * 6.0 + uTime * 1.5) * 0.12;
|
|
283
|
+
float highlight = smoothstep(0.25 + ripple, 0.12, radius);
|
|
284
|
+
vec3 inner = vec3(0.32, 0.45, 0.98);
|
|
285
|
+
vec3 outer = vec3(0.93, 0.48, 0.78);
|
|
286
|
+
vec3 color = mix(outer, inner, glow);
|
|
287
|
+
color += highlight * 0.28 + vec3(0.82, 0.88, 1.0) * uFlash * 0.22;
|
|
288
|
+
gl_FragColor = vec4(color, glow * (0.48 + uFlash * 0.12));
|
|
289
|
+
}
|
|
290
|
+
`,
|
|
291
|
+
uniforms: {
|
|
292
|
+
uTime: {
|
|
293
|
+
value: 0
|
|
294
|
+
},
|
|
295
|
+
uFlash: {
|
|
296
|
+
value: 0
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
transparent: true,
|
|
300
|
+
depthWrite: false
|
|
301
|
+
});
|
|
302
|
+
materialRef.current = radialShader;
|
|
303
|
+
}
|
|
304
|
+
function handleFrame(state, delta) {
|
|
305
|
+
if (!materialRef.current || !meshRef.current) {
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
if (materialRef.current.uniforms.uTime) {
|
|
309
|
+
materialRef.current.uniforms.uTime.value += delta;
|
|
310
|
+
}
|
|
311
|
+
if (materialRef.current.uniforms.uFlash) {
|
|
312
|
+
materialRef.current.uniforms.uFlash.value = lightningValue.current;
|
|
313
|
+
}
|
|
314
|
+
meshRef.current.rotation.z += delta * 0.08;
|
|
315
|
+
meshRef.current.position.x = state.pointer.x * 0.05;
|
|
316
|
+
meshRef.current.position.y = state.pointer.y * 0.03;
|
|
317
|
+
}
|
|
318
|
+
useFrame(handleFrame);
|
|
319
|
+
return /*#__PURE__*/ _jsxs("mesh", {
|
|
320
|
+
ref: meshRef,
|
|
321
|
+
position: [
|
|
322
|
+
0,
|
|
323
|
+
0,
|
|
324
|
+
-0.4
|
|
325
|
+
],
|
|
326
|
+
children: [
|
|
327
|
+
/*#__PURE__*/ _jsx("planeGeometry", {
|
|
328
|
+
args: [
|
|
329
|
+
5.4,
|
|
330
|
+
3.8,
|
|
331
|
+
2,
|
|
332
|
+
2
|
|
333
|
+
]
|
|
334
|
+
}),
|
|
335
|
+
/*#__PURE__*/ _jsx("primitive", {
|
|
336
|
+
object: materialRef.current,
|
|
337
|
+
attach: "material"
|
|
338
|
+
})
|
|
339
|
+
]
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
function MarbleScene({ lightningValue }) {
|
|
343
|
+
return /*#__PURE__*/ _jsxs("group", {
|
|
344
|
+
children: [
|
|
345
|
+
/*#__PURE__*/ _jsx(MarblePlane, {
|
|
346
|
+
lightningValue: lightningValue
|
|
347
|
+
}),
|
|
348
|
+
/*#__PURE__*/ _jsx(FlowHalo, {
|
|
349
|
+
lightningValue: lightningValue
|
|
350
|
+
})
|
|
351
|
+
]
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
function BubbleOverlay() {
|
|
355
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
356
|
+
className: "absolute inset-0 pointer-events-none",
|
|
357
|
+
children: BUBBLE_SPECS.map(function renderBubble(spec, index) {
|
|
358
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
359
|
+
className: "marble-bubble",
|
|
360
|
+
style: {
|
|
361
|
+
width: `${spec.size}px`,
|
|
362
|
+
height: `${spec.size}px`,
|
|
363
|
+
left: spec.left,
|
|
364
|
+
top: spec.top,
|
|
365
|
+
animationDelay: spec.delay,
|
|
366
|
+
animationDuration: spec.duration,
|
|
367
|
+
opacity: spec.opacity
|
|
368
|
+
}
|
|
369
|
+
}, `bubble-${index}`);
|
|
370
|
+
})
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
export function AbstractAnimatedBackground({ className }) {
|
|
374
|
+
const baseClassName = "absolute inset-0 overflow-hidden";
|
|
375
|
+
const rootClassName = combineClassNames(baseClassName, className);
|
|
376
|
+
const lightningValue = useRef(0);
|
|
377
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
378
|
+
className: rootClassName,
|
|
379
|
+
style: {
|
|
380
|
+
backgroundColor: "transparent"
|
|
381
|
+
},
|
|
382
|
+
children: [
|
|
383
|
+
/*#__PURE__*/ _jsx("div", {
|
|
384
|
+
className: "marble-base-gradient"
|
|
385
|
+
}),
|
|
386
|
+
/*#__PURE__*/ _jsx("div", {
|
|
387
|
+
className: "marble-secondary-gradient"
|
|
388
|
+
}),
|
|
389
|
+
/*#__PURE__*/ _jsx("div", {
|
|
390
|
+
className: "marble-overlay-gradient"
|
|
391
|
+
}),
|
|
392
|
+
/*#__PURE__*/ _jsx(Suspense, {
|
|
393
|
+
fallback: null,
|
|
394
|
+
children: /*#__PURE__*/ _jsx(Canvas, {
|
|
395
|
+
className: "marble-canvas",
|
|
396
|
+
dpr: [
|
|
397
|
+
1,
|
|
398
|
+
1.5
|
|
399
|
+
],
|
|
400
|
+
gl: {
|
|
401
|
+
antialias: true,
|
|
402
|
+
alpha: true
|
|
403
|
+
},
|
|
404
|
+
camera: {
|
|
405
|
+
position: [
|
|
406
|
+
0,
|
|
407
|
+
0,
|
|
408
|
+
2.5
|
|
409
|
+
],
|
|
410
|
+
fov: 45
|
|
411
|
+
},
|
|
412
|
+
style: {
|
|
413
|
+
position: "absolute",
|
|
414
|
+
top: "50%",
|
|
415
|
+
left: "50%",
|
|
416
|
+
width: "150%",
|
|
417
|
+
height: "150%",
|
|
418
|
+
transform: "translate(-50%, -50%)"
|
|
419
|
+
},
|
|
420
|
+
children: /*#__PURE__*/ _jsx(MarbleScene, {
|
|
421
|
+
lightningValue: lightningValue
|
|
422
|
+
})
|
|
423
|
+
})
|
|
424
|
+
}),
|
|
425
|
+
/*#__PURE__*/ _jsx("div", {
|
|
426
|
+
className: "marble-swirl"
|
|
427
|
+
}),
|
|
428
|
+
/*#__PURE__*/ _jsx(BubbleOverlay, {}),
|
|
429
|
+
/*#__PURE__*/ _jsx("div", {
|
|
430
|
+
className: "marble-highlight"
|
|
431
|
+
}),
|
|
432
|
+
/*#__PURE__*/ _jsx("div", {
|
|
433
|
+
className: "marble-glass"
|
|
434
|
+
})
|
|
435
|
+
]
|
|
436
|
+
});
|
|
437
|
+
}
|