@walrosproject/ui 0.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/LICENSE +14 -0
- package/README.md +105 -0
- package/dist/assets/walros-logo-chrome.png +0 -0
- package/dist/assets/walros-portal-silhouette.svg +9 -0
- package/dist/assets/walros-wordmark-dark.png +0 -0
- package/dist/assets/walros-wordmark-light.png +0 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +420 -0
- package/dist/index.js.map +1 -0
- package/package.json +66 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Copyright (c) 2026 Alexander Calle.
|
|
2
|
+
|
|
3
|
+
Permission is granted to use, copy, modify, and distribute the source code in
|
|
4
|
+
this package as part of websites and software belonging to the WalrOS
|
|
5
|
+
ecosystem, subject to preserving this copyright notice.
|
|
6
|
+
|
|
7
|
+
The WalrOS name, logos, wordmarks, artwork, and other brand assets are
|
|
8
|
+
proprietary brand materials. No permission is granted to use them to
|
|
9
|
+
impersonate WalrOS, create confusingly similar products, or suggest an
|
|
10
|
+
official affiliation without the copyright holder's authorization.
|
|
11
|
+
|
|
12
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
13
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
14
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
package/README.md
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# @walrosproject/ui
|
|
2
|
+
|
|
3
|
+
Componentes y recursos visuales oficiales del ecosistema **WalrOS**.
|
|
4
|
+
|
|
5
|
+
## Contenido inicial
|
|
6
|
+
|
|
7
|
+
- `WalrosPortalTransition`
|
|
8
|
+
- `WalrosLogo`
|
|
9
|
+
- `WalrosWordmark`
|
|
10
|
+
- URLs exportadas de los assets oficiales
|
|
11
|
+
|
|
12
|
+
## Instalación
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @walrosproject/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Transición de entrada
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { WalrosPortalTransition } from "@walrosproject/ui";
|
|
22
|
+
|
|
23
|
+
export default function App() {
|
|
24
|
+
return (
|
|
25
|
+
<>
|
|
26
|
+
<WalrosPortalTransition storageMode="always" />
|
|
27
|
+
<main>Contenido de la aplicación</main>
|
|
28
|
+
</>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Modos disponibles:
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
<WalrosPortalTransition storageMode="always" />
|
|
37
|
+
<WalrosPortalTransition storageMode="session" />
|
|
38
|
+
<WalrosPortalTransition storageMode="once" />
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
- `always`: se reproduce en cada carga completa.
|
|
42
|
+
- `session`: una vez por pestaña o sesión.
|
|
43
|
+
- `once`: una sola vez mediante `localStorage`.
|
|
44
|
+
|
|
45
|
+
## Logo
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
import { WalrosLogo } from "@walrosproject/ui";
|
|
49
|
+
|
|
50
|
+
<WalrosLogo
|
|
51
|
+
style={{ width: 120, height: "auto" }}
|
|
52
|
+
/>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Wordmark
|
|
56
|
+
|
|
57
|
+
```tsx
|
|
58
|
+
import { WalrosWordmark } from "@walrosproject/ui";
|
|
59
|
+
|
|
60
|
+
<WalrosWordmark
|
|
61
|
+
variant="light"
|
|
62
|
+
style={{ width: 320, height: "auto" }}
|
|
63
|
+
/>
|
|
64
|
+
|
|
65
|
+
<WalrosWordmark
|
|
66
|
+
variant="dark"
|
|
67
|
+
style={{ width: 320, height: "auto" }}
|
|
68
|
+
/>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Desarrollo
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npm install
|
|
75
|
+
npm run check
|
|
76
|
+
npm run build
|
|
77
|
+
npm run pack:check
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Primera publicación
|
|
81
|
+
|
|
82
|
+
Activa 2FA en npm y ejecuta:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npm login
|
|
86
|
+
npm publish --access public
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
El script `prepublishOnly` valida TypeScript y genera `dist` automáticamente.
|
|
90
|
+
|
|
91
|
+
## Publicaciones posteriores
|
|
92
|
+
|
|
93
|
+
Actualiza la versión antes de publicar:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npm version patch
|
|
97
|
+
npm publish
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Usa `minor` para nuevas funciones compatibles y `major` para cambios incompatibles.
|
|
101
|
+
|
|
102
|
+
## Marca y licencia
|
|
103
|
+
|
|
104
|
+
El código y los recursos se distribuyen bajo los términos indicados en `LICENSE`.
|
|
105
|
+
WalrOS, su nombre y sus recursos gráficos siguen siendo propiedad de Alexander Calle.
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg"
|
|
3
|
+
viewBox="0 0 1254 1254"
|
|
4
|
+
width="1254" height="1254"
|
|
5
|
+
role="img" aria-label="Silueta WalrOS">
|
|
6
|
+
<g fill="#000000">
|
|
7
|
+
<path d="M 244.00 354.00 C 240.50 377.67, 240.17 413.67, 242.00 434.00 C 243.83 454.33, 249.50 464.50, 255.00 476.00 C 260.50 487.50, 268.50 496.00, 275.00 503.00 C 281.50 510.00, 287.17 513.67, 294.00 518.00 C 300.83 522.33, 306.00 525.67, 316.00 529.00 C 326.00 532.33, 336.33 536.67, 354.00 538.00 C 371.67 539.33, 397.83 540.83, 422.00 537.00 C 446.17 533.17, 474.17 525.33, 499.00 515.00 C 523.83 504.67, 550.00 489.33, 571.00 475.00 C 592.00 460.67, 615.00 436.50, 625.00 429.00 C 635.00 421.50, 623.67 424.00, 631.00 430.00 C 638.33 436.00, 656.67 454.83, 669.00 465.00 C 681.33 475.17, 690.00 482.17, 705.00 491.00 C 720.00 499.83, 743.67 511.50, 759.00 518.00 C 774.33 524.50, 784.00 526.83, 797.00 530.00 C 810.00 533.17, 820.00 535.83, 837.00 537.00 C 854.00 538.17, 881.17 539.00, 899.00 537.00 C 916.83 535.00, 932.00 530.00, 944.00 525.00 C 956.00 520.00, 962.00 516.17, 971.00 507.00 C 980.00 497.83, 991.67 482.83, 998.00 470.00 C 1004.33 457.17, 1007.17 446.33, 1009.00 430.00 C 1010.83 413.67, 1010.83 390.50, 1009.00 372.00 C 1007.17 353.50, 1003.83 337.17, 998.00 319.00 C 992.17 300.83, 983.67 280.17, 974.00 263.00 C 964.33 245.83, 952.00 229.67, 940.00 216.00 C 928.00 202.33, 917.17 192.00, 902.00 181.00 C 886.83 170.00, 866.50 158.17, 849.00 150.00 C 831.50 141.83, 816.67 137.00, 797.00 132.00 C 777.33 127.00, 756.67 122.83, 731.00 120.00 C 705.33 117.17, 673.67 115.33, 643.00 115.00 C 612.33 114.67, 575.67 115.67, 547.00 118.00 C 518.33 120.33, 496.17 123.00, 471.00 129.00 C 445.83 135.00, 418.33 143.50, 396.00 154.00 C 373.67 164.50, 353.50 178.50, 337.00 192.00 C 320.50 205.50, 309.33 218.33, 297.00 235.00 C 284.67 251.67, 271.83 272.17, 263.00 292.00 C 254.17 311.83, 247.50 330.33, 244.00 354.00 Z"/><path d="M 289.00 536.00 C 283.17 535.50, 284.83 533.00, 284.00 544.00 C 283.17 555.00, 282.67 578.67, 284.00 602.00 C 285.33 625.33, 287.00 651.83, 292.00 684.00 C 297.00 716.17, 306.33 763.50, 314.00 795.00 C 321.67 826.50, 328.67 847.17, 338.00 873.00 C 347.33 898.83, 357.00 923.67, 370.00 950.00 C 383.00 976.33, 399.67 1006.00, 416.00 1031.00 C 432.33 1056.00, 455.33 1084.50, 468.00 1100.00 C 480.67 1115.50, 486.17 1119.33, 492.00 1124.00 C 497.83 1128.67, 500.67 1127.67, 503.00 1128.00 C 505.33 1128.33, 505.50 1127.50, 506.00 1126.00 C 506.50 1124.50, 510.33 1132.00, 506.00 1119.00 C 501.67 1106.00, 488.17 1073.83, 480.00 1048.00 C 471.83 1022.17, 462.67 987.67, 457.00 964.00 C 451.33 940.33, 449.17 927.33, 446.00 906.00 C 442.83 884.67, 439.50 865.00, 438.00 836.00 C 436.50 807.00, 436.50 758.33, 437.00 732.00 C 437.50 705.67, 439.00 696.33, 441.00 678.00 C 443.00 659.67, 444.83 644.00, 449.00 622.00 C 453.17 600.00, 464.50 559.00, 466.00 546.00 C 467.50 533.00, 468.67 542.50, 458.00 544.00 C 447.33 545.50, 418.33 553.17, 402.00 555.00 C 385.67 556.83, 373.83 556.33, 360.00 555.00 C 346.17 553.67, 330.83 550.17, 319.00 547.00 C 307.17 543.83, 294.83 536.50, 289.00 536.00 Z"/><path d="M 961.00 537.00 C 948.50 539.17, 907.83 552.00, 889.00 555.00 C 870.17 558.00, 864.17 557.00, 848.00 555.00 C 831.83 553.00, 802.83 545.00, 792.00 543.00 C 781.17 541.00, 784.83 542.50, 783.00 543.00 C 781.17 543.50, 778.67 533.83, 781.00 546.00 C 783.33 558.17, 792.67 592.33, 797.00 616.00 C 801.33 639.67, 804.83 668.83, 807.00 688.00 C 809.17 707.17, 809.67 709.00, 810.00 731.00 C 810.33 753.00, 810.50 792.83, 809.00 820.00 C 807.50 847.17, 804.50 870.50, 801.00 894.00 C 797.50 917.50, 794.00 936.17, 788.00 961.00 C 782.00 985.83, 773.50 1016.67, 765.00 1043.00 C 756.50 1069.33, 741.33 1104.83, 737.00 1119.00 C 732.67 1133.17, 736.67 1127.17, 739.00 1128.00 C 741.33 1128.83, 745.83 1127.83, 751.00 1124.00 C 756.17 1120.17, 757.33 1120.50, 770.00 1105.00 C 782.67 1089.50, 811.33 1053.50, 827.00 1031.00 C 842.67 1008.50, 851.17 995.00, 864.00 970.00 C 876.83 945.00, 892.83 910.00, 904.00 881.00 C 915.17 852.00, 923.00 826.67, 931.00 796.00 C 939.00 765.33, 946.67 728.67, 952.00 697.00 C 957.33 665.33, 961.00 631.83, 963.00 606.00 C 965.00 580.17, 964.33 553.50, 964.00 542.00 C 963.67 530.50, 973.50 534.83, 961.00 537.00 Z"/>
|
|
8
|
+
</g>
|
|
9
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ImgHTMLAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
type WalrosPortalTransitionProps = {
|
|
5
|
+
duration?: number;
|
|
6
|
+
onComplete?: () => void;
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
storageMode?: "always" | "session" | "once";
|
|
10
|
+
storageKey?: string;
|
|
11
|
+
zIndex?: number;
|
|
12
|
+
};
|
|
13
|
+
declare function WalrosPortalTransition({ duration, onComplete, backgroundColor, enabled, storageMode, storageKey, zIndex, }: WalrosPortalTransitionProps): react.JSX.Element | null;
|
|
14
|
+
|
|
15
|
+
type WalrosLogoProps = Omit<ImgHTMLAttributes<HTMLImageElement>, "src">;
|
|
16
|
+
declare function WalrosLogo({ alt, draggable, ...props }: WalrosLogoProps): react.JSX.Element;
|
|
17
|
+
|
|
18
|
+
type WalrosWordmarkProps = Omit<ImgHTMLAttributes<HTMLImageElement>, "src"> & {
|
|
19
|
+
variant?: "light" | "dark";
|
|
20
|
+
};
|
|
21
|
+
declare function WalrosWordmark({ variant, alt, draggable, ...props }: WalrosWordmarkProps): react.JSX.Element;
|
|
22
|
+
|
|
23
|
+
declare const walrosPortalSilhouetteUrl: string;
|
|
24
|
+
declare const walrosLogoChromeUrl: string;
|
|
25
|
+
declare const walrosWordmarkLightUrl: string;
|
|
26
|
+
declare const walrosWordmarkDarkUrl: string;
|
|
27
|
+
|
|
28
|
+
export { WalrosLogo, type WalrosLogoProps, WalrosPortalTransition, type WalrosPortalTransitionProps, WalrosWordmark, type WalrosWordmarkProps, walrosLogoChromeUrl, walrosPortalSilhouetteUrl, walrosWordmarkDarkUrl, walrosWordmarkLightUrl };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
import { useState, useRef, useId, useEffect, useLayoutEffect } from 'react';
|
|
2
|
+
import { gsap } from 'gsap';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
// src/components/WalrosPortalTransition.tsx
|
|
6
|
+
|
|
7
|
+
// src/assets.ts
|
|
8
|
+
var walrosPortalSilhouetteUrl = new URL(
|
|
9
|
+
"./assets/walros-portal-silhouette.svg",
|
|
10
|
+
import.meta.url
|
|
11
|
+
).href;
|
|
12
|
+
var walrosLogoChromeUrl = new URL(
|
|
13
|
+
"./assets/walros-logo-chrome.png",
|
|
14
|
+
import.meta.url
|
|
15
|
+
).href;
|
|
16
|
+
var walrosWordmarkLightUrl = new URL(
|
|
17
|
+
"./assets/walros-wordmark-light.png",
|
|
18
|
+
import.meta.url
|
|
19
|
+
).href;
|
|
20
|
+
var walrosWordmarkDarkUrl = new URL(
|
|
21
|
+
"./assets/walros-wordmark-dark.png",
|
|
22
|
+
import.meta.url
|
|
23
|
+
).href;
|
|
24
|
+
var SILHOUETTE_VIEWBOX = 1254;
|
|
25
|
+
var FOCUS_X = 626;
|
|
26
|
+
var FOCUS_Y = 333;
|
|
27
|
+
var PORTAL_RADIUS = 190;
|
|
28
|
+
function getStorage(mode) {
|
|
29
|
+
if (typeof window === "undefined") return null;
|
|
30
|
+
try {
|
|
31
|
+
const storage = mode === "session" ? window.sessionStorage : window.localStorage;
|
|
32
|
+
const testKey = "__walros_portal_test__";
|
|
33
|
+
storage.setItem(testKey, "1");
|
|
34
|
+
storage.removeItem(testKey);
|
|
35
|
+
return storage;
|
|
36
|
+
} catch {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function shouldRunTransition(enabled, storageMode, storageKey) {
|
|
41
|
+
if (!enabled) return false;
|
|
42
|
+
if (storageMode === "always") return true;
|
|
43
|
+
if (typeof window === "undefined") return false;
|
|
44
|
+
const storage = getStorage(storageMode);
|
|
45
|
+
if (!storage) return true;
|
|
46
|
+
try {
|
|
47
|
+
return storage.getItem(storageKey) == null;
|
|
48
|
+
} catch {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function WalrosPortalTransition({
|
|
53
|
+
duration = 750,
|
|
54
|
+
onComplete,
|
|
55
|
+
backgroundColor = "#02050b",
|
|
56
|
+
enabled = true,
|
|
57
|
+
storageMode = "always",
|
|
58
|
+
storageKey = "walros-portal-seen",
|
|
59
|
+
zIndex = 9999
|
|
60
|
+
}) {
|
|
61
|
+
const [shouldRun] = useState(
|
|
62
|
+
() => shouldRunTransition(enabled, storageMode, storageKey)
|
|
63
|
+
);
|
|
64
|
+
const [visible, setVisible] = useState(shouldRun);
|
|
65
|
+
const [size, setSize] = useState({ w: 0, h: 0 });
|
|
66
|
+
const overlayRef = useRef(null);
|
|
67
|
+
const maskScaleRef = useRef(null);
|
|
68
|
+
const glowScaleRef = useRef(null);
|
|
69
|
+
const completedRef = useRef(false);
|
|
70
|
+
const startedRef = useRef(false);
|
|
71
|
+
const rafRef = useRef(null);
|
|
72
|
+
const timelineRef = useRef(null);
|
|
73
|
+
const previousOverflowRef = useRef("");
|
|
74
|
+
const uid = useId().replace(/[:]/g, "_");
|
|
75
|
+
const maskId = `walros-portal-mask-${uid}`;
|
|
76
|
+
const glowFilterId = `walros-portal-glow-${uid}`;
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
if (!visible) return;
|
|
79
|
+
const element = overlayRef.current;
|
|
80
|
+
if (!element) return;
|
|
81
|
+
const measure = () => {
|
|
82
|
+
const rect = element.getBoundingClientRect();
|
|
83
|
+
setSize(
|
|
84
|
+
(previous) => previous.w === rect.width && previous.h === rect.height ? previous : { w: rect.width, h: rect.height }
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
measure();
|
|
88
|
+
const observer = typeof ResizeObserver !== "undefined" ? new ResizeObserver(measure) : null;
|
|
89
|
+
observer?.observe(element);
|
|
90
|
+
window.addEventListener("resize", measure);
|
|
91
|
+
return () => {
|
|
92
|
+
observer?.disconnect();
|
|
93
|
+
window.removeEventListener("resize", measure);
|
|
94
|
+
};
|
|
95
|
+
}, [visible]);
|
|
96
|
+
useLayoutEffect(() => {
|
|
97
|
+
if (!enabled) {
|
|
98
|
+
setVisible(false);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (!visible) return;
|
|
102
|
+
if (completedRef.current || startedRef.current) return;
|
|
103
|
+
if (size.w <= 0 || size.h <= 0) return;
|
|
104
|
+
const overlay = overlayRef.current;
|
|
105
|
+
const maskScale = maskScaleRef.current;
|
|
106
|
+
const glowScale = glowScaleRef.current;
|
|
107
|
+
if (!overlay || !maskScale) return;
|
|
108
|
+
startedRef.current = true;
|
|
109
|
+
previousOverflowRef.current = document.body.style.overflow;
|
|
110
|
+
document.body.style.overflow = "hidden";
|
|
111
|
+
const finish = () => {
|
|
112
|
+
if (completedRef.current) return;
|
|
113
|
+
completedRef.current = true;
|
|
114
|
+
document.body.style.overflow = previousOverflowRef.current;
|
|
115
|
+
if (storageMode !== "always") {
|
|
116
|
+
const storage = getStorage(storageMode);
|
|
117
|
+
try {
|
|
118
|
+
storage?.setItem(storageKey, "1");
|
|
119
|
+
} catch {
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
setVisible(false);
|
|
123
|
+
onComplete?.();
|
|
124
|
+
};
|
|
125
|
+
const reducedMotion = window.matchMedia(
|
|
126
|
+
"(prefers-reduced-motion: reduce)"
|
|
127
|
+
).matches;
|
|
128
|
+
if (reducedMotion) {
|
|
129
|
+
const timeline = gsap.timeline({ onComplete: finish });
|
|
130
|
+
timelineRef.current = timeline;
|
|
131
|
+
timeline.to(overlay, {
|
|
132
|
+
opacity: 0,
|
|
133
|
+
duration: 0.15,
|
|
134
|
+
ease: "power1.out"
|
|
135
|
+
});
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
rafRef.current = requestAnimationFrame(() => {
|
|
139
|
+
rafRef.current = null;
|
|
140
|
+
const halfDiagonal = Math.sqrt(size.w * size.w + size.h * size.h) / 2;
|
|
141
|
+
const initialPixels2 = Math.min(
|
|
142
|
+
180,
|
|
143
|
+
Math.max(120, size.w * 0.12)
|
|
144
|
+
);
|
|
145
|
+
const initialScale2 = initialPixels2 / SILHOUETTE_VIEWBOX;
|
|
146
|
+
const finalScale = (halfDiagonal + 80) / PORTAL_RADIUS * 1.15;
|
|
147
|
+
gsap.set(maskScale, {
|
|
148
|
+
svgOrigin: "0 0",
|
|
149
|
+
scale: initialScale2
|
|
150
|
+
});
|
|
151
|
+
if (glowScale) {
|
|
152
|
+
gsap.set(glowScale, {
|
|
153
|
+
svgOrigin: "0 0",
|
|
154
|
+
scale: initialScale2,
|
|
155
|
+
opacity: 0.85
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
gsap.set(overlay, { opacity: 1 });
|
|
159
|
+
const totalSeconds = duration / 1e3;
|
|
160
|
+
const timeline = gsap.timeline({ onComplete: finish });
|
|
161
|
+
timelineRef.current = timeline;
|
|
162
|
+
timeline.to(
|
|
163
|
+
maskScale,
|
|
164
|
+
{
|
|
165
|
+
scale: initialScale2 * 1.4,
|
|
166
|
+
duration: totalSeconds * 0.15,
|
|
167
|
+
ease: "power2.out"
|
|
168
|
+
},
|
|
169
|
+
0
|
|
170
|
+
);
|
|
171
|
+
if (glowScale) {
|
|
172
|
+
timeline.to(
|
|
173
|
+
glowScale,
|
|
174
|
+
{
|
|
175
|
+
scale: initialScale2 * 1.4,
|
|
176
|
+
opacity: 1,
|
|
177
|
+
duration: totalSeconds * 0.15,
|
|
178
|
+
ease: "power2.out"
|
|
179
|
+
},
|
|
180
|
+
0
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
timeline.to(
|
|
184
|
+
maskScale,
|
|
185
|
+
{
|
|
186
|
+
scale: finalScale,
|
|
187
|
+
duration: totalSeconds * 0.85,
|
|
188
|
+
ease: "power2.in"
|
|
189
|
+
},
|
|
190
|
+
totalSeconds * 0.15
|
|
191
|
+
);
|
|
192
|
+
if (glowScale) {
|
|
193
|
+
timeline.to(
|
|
194
|
+
glowScale,
|
|
195
|
+
{
|
|
196
|
+
scale: finalScale * 0.9,
|
|
197
|
+
opacity: 0,
|
|
198
|
+
duration: totalSeconds * 0.4,
|
|
199
|
+
ease: "power2.in"
|
|
200
|
+
},
|
|
201
|
+
totalSeconds * 0.45
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
timeline.to(
|
|
205
|
+
overlay,
|
|
206
|
+
{
|
|
207
|
+
opacity: 0,
|
|
208
|
+
duration: totalSeconds * 0.1,
|
|
209
|
+
ease: "power2.out"
|
|
210
|
+
},
|
|
211
|
+
totalSeconds * 0.9
|
|
212
|
+
);
|
|
213
|
+
});
|
|
214
|
+
}, [
|
|
215
|
+
duration,
|
|
216
|
+
enabled,
|
|
217
|
+
onComplete,
|
|
218
|
+
size,
|
|
219
|
+
storageKey,
|
|
220
|
+
storageMode,
|
|
221
|
+
visible
|
|
222
|
+
]);
|
|
223
|
+
useEffect(() => {
|
|
224
|
+
return () => {
|
|
225
|
+
if (rafRef.current !== null) {
|
|
226
|
+
cancelAnimationFrame(rafRef.current);
|
|
227
|
+
}
|
|
228
|
+
timelineRef.current?.kill();
|
|
229
|
+
if (startedRef.current && !completedRef.current) {
|
|
230
|
+
document.body.style.overflow = previousOverflowRef.current;
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
}, []);
|
|
234
|
+
if (!shouldRun || !visible) return null;
|
|
235
|
+
const { w, h } = size;
|
|
236
|
+
const ready = w > 0 && h > 0;
|
|
237
|
+
const viewportCenterX = w / 2;
|
|
238
|
+
const viewportCenterY = h / 2;
|
|
239
|
+
const initialPixels = Math.min(
|
|
240
|
+
180,
|
|
241
|
+
Math.max(120, w * 0.12)
|
|
242
|
+
);
|
|
243
|
+
const initialScale = initialPixels / SILHOUETTE_VIEWBOX;
|
|
244
|
+
const visualCenter = SILHOUETTE_VIEWBOX / 2;
|
|
245
|
+
const initialOffsetX = (visualCenter - FOCUS_X) * initialScale;
|
|
246
|
+
const initialOffsetY = (visualCenter - FOCUS_Y) * initialScale;
|
|
247
|
+
const portalCenterX = viewportCenterX - initialOffsetX;
|
|
248
|
+
const portalCenterY = viewportCenterY - initialOffsetY;
|
|
249
|
+
return /* @__PURE__ */ jsx(
|
|
250
|
+
"div",
|
|
251
|
+
{
|
|
252
|
+
ref: overlayRef,
|
|
253
|
+
"aria-hidden": "true",
|
|
254
|
+
style: {
|
|
255
|
+
position: "fixed",
|
|
256
|
+
inset: 0,
|
|
257
|
+
width: "100vw",
|
|
258
|
+
height: "100dvh",
|
|
259
|
+
zIndex,
|
|
260
|
+
pointerEvents: "none",
|
|
261
|
+
overflow: "hidden",
|
|
262
|
+
backgroundColor: ready ? "transparent" : backgroundColor
|
|
263
|
+
},
|
|
264
|
+
children: ready && /* @__PURE__ */ jsxs(
|
|
265
|
+
"svg",
|
|
266
|
+
{
|
|
267
|
+
width: "100%",
|
|
268
|
+
height: "100%",
|
|
269
|
+
viewBox: `0 0 ${w} ${h}`,
|
|
270
|
+
preserveAspectRatio: "none",
|
|
271
|
+
style: {
|
|
272
|
+
position: "absolute",
|
|
273
|
+
inset: 0,
|
|
274
|
+
display: "block"
|
|
275
|
+
},
|
|
276
|
+
children: [
|
|
277
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
278
|
+
/* @__PURE__ */ jsx(
|
|
279
|
+
"filter",
|
|
280
|
+
{
|
|
281
|
+
id: glowFilterId,
|
|
282
|
+
x: "-50%",
|
|
283
|
+
y: "-50%",
|
|
284
|
+
width: "200%",
|
|
285
|
+
height: "200%",
|
|
286
|
+
children: /* @__PURE__ */ jsx("feGaussianBlur", { stdDeviation: "28" })
|
|
287
|
+
}
|
|
288
|
+
),
|
|
289
|
+
/* @__PURE__ */ jsxs(
|
|
290
|
+
"mask",
|
|
291
|
+
{
|
|
292
|
+
id: maskId,
|
|
293
|
+
maskUnits: "userSpaceOnUse",
|
|
294
|
+
x: "0",
|
|
295
|
+
y: "0",
|
|
296
|
+
width: w,
|
|
297
|
+
height: h,
|
|
298
|
+
children: [
|
|
299
|
+
/* @__PURE__ */ jsx(
|
|
300
|
+
"rect",
|
|
301
|
+
{
|
|
302
|
+
x: "0",
|
|
303
|
+
y: "0",
|
|
304
|
+
width: w,
|
|
305
|
+
height: h,
|
|
306
|
+
fill: "white"
|
|
307
|
+
}
|
|
308
|
+
),
|
|
309
|
+
/* @__PURE__ */ jsx(
|
|
310
|
+
"g",
|
|
311
|
+
{
|
|
312
|
+
transform: `translate(${portalCenterX} ${portalCenterY})`,
|
|
313
|
+
children: /* @__PURE__ */ jsx(
|
|
314
|
+
"g",
|
|
315
|
+
{
|
|
316
|
+
ref: maskScaleRef,
|
|
317
|
+
transform: `scale(${initialScale})`,
|
|
318
|
+
children: /* @__PURE__ */ jsx(
|
|
319
|
+
"image",
|
|
320
|
+
{
|
|
321
|
+
href: walrosPortalSilhouetteUrl,
|
|
322
|
+
x: -FOCUS_X,
|
|
323
|
+
y: -FOCUS_Y,
|
|
324
|
+
width: SILHOUETTE_VIEWBOX,
|
|
325
|
+
height: SILHOUETTE_VIEWBOX
|
|
326
|
+
}
|
|
327
|
+
)
|
|
328
|
+
}
|
|
329
|
+
)
|
|
330
|
+
}
|
|
331
|
+
)
|
|
332
|
+
]
|
|
333
|
+
}
|
|
334
|
+
)
|
|
335
|
+
] }),
|
|
336
|
+
/* @__PURE__ */ jsx(
|
|
337
|
+
"rect",
|
|
338
|
+
{
|
|
339
|
+
x: "0",
|
|
340
|
+
y: "0",
|
|
341
|
+
width: w,
|
|
342
|
+
height: h,
|
|
343
|
+
fill: backgroundColor,
|
|
344
|
+
mask: `url(#${maskId})`
|
|
345
|
+
}
|
|
346
|
+
),
|
|
347
|
+
/* @__PURE__ */ jsx(
|
|
348
|
+
"g",
|
|
349
|
+
{
|
|
350
|
+
transform: `translate(${portalCenterX} ${portalCenterY})`,
|
|
351
|
+
style: {
|
|
352
|
+
mixBlendMode: "screen",
|
|
353
|
+
pointerEvents: "none"
|
|
354
|
+
},
|
|
355
|
+
children: /* @__PURE__ */ jsx(
|
|
356
|
+
"g",
|
|
357
|
+
{
|
|
358
|
+
ref: glowScaleRef,
|
|
359
|
+
transform: `scale(${initialScale})`,
|
|
360
|
+
opacity: "0.85",
|
|
361
|
+
children: /* @__PURE__ */ jsx("g", { filter: `url(#${glowFilterId})`, children: /* @__PURE__ */ jsx(
|
|
362
|
+
"image",
|
|
363
|
+
{
|
|
364
|
+
href: walrosPortalSilhouetteUrl,
|
|
365
|
+
x: -FOCUS_X,
|
|
366
|
+
y: -FOCUS_Y,
|
|
367
|
+
width: SILHOUETTE_VIEWBOX,
|
|
368
|
+
height: SILHOUETTE_VIEWBOX,
|
|
369
|
+
style: {
|
|
370
|
+
filter: "brightness(0) saturate(100%) invert(58%) sepia(94%) saturate(1352%) hue-rotate(182deg)",
|
|
371
|
+
opacity: 0.6
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
) })
|
|
375
|
+
}
|
|
376
|
+
)
|
|
377
|
+
}
|
|
378
|
+
)
|
|
379
|
+
]
|
|
380
|
+
}
|
|
381
|
+
)
|
|
382
|
+
}
|
|
383
|
+
);
|
|
384
|
+
}
|
|
385
|
+
function WalrosLogo({
|
|
386
|
+
alt = "WalrOS",
|
|
387
|
+
draggable = false,
|
|
388
|
+
...props
|
|
389
|
+
}) {
|
|
390
|
+
return /* @__PURE__ */ jsx(
|
|
391
|
+
"img",
|
|
392
|
+
{
|
|
393
|
+
src: walrosLogoChromeUrl,
|
|
394
|
+
alt,
|
|
395
|
+
draggable,
|
|
396
|
+
...props
|
|
397
|
+
}
|
|
398
|
+
);
|
|
399
|
+
}
|
|
400
|
+
function WalrosWordmark({
|
|
401
|
+
variant = "light",
|
|
402
|
+
alt = "WalrOS",
|
|
403
|
+
draggable = false,
|
|
404
|
+
...props
|
|
405
|
+
}) {
|
|
406
|
+
const src = variant === "dark" ? walrosWordmarkDarkUrl : walrosWordmarkLightUrl;
|
|
407
|
+
return /* @__PURE__ */ jsx(
|
|
408
|
+
"img",
|
|
409
|
+
{
|
|
410
|
+
src,
|
|
411
|
+
alt,
|
|
412
|
+
draggable,
|
|
413
|
+
...props
|
|
414
|
+
}
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export { WalrosLogo, WalrosPortalTransition, WalrosWordmark, walrosLogoChromeUrl, walrosPortalSilhouetteUrl, walrosWordmarkDarkUrl, walrosWordmarkLightUrl };
|
|
419
|
+
//# sourceMappingURL=index.js.map
|
|
420
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/assets.ts","../src/components/WalrosPortalTransition.tsx","../src/components/WalrosLogo.tsx","../src/components/WalrosWordmark.tsx"],"names":["initialPixels","initialScale","jsx"],"mappings":";;;;;;;AAAO,IAAM,4BAA4B,IAAI,GAAA;AAAA,EAC3C,uCAAA;AAAA,EACA,MAAA,CAAA,IAAA,CAAY;AACd,CAAA,CAAE;AAEK,IAAM,sBAAsB,IAAI,GAAA;AAAA,EACrC,iCAAA;AAAA,EACA,MAAA,CAAA,IAAA,CAAY;AACd,CAAA,CAAE;AAEK,IAAM,yBAAyB,IAAI,GAAA;AAAA,EACxC,oCAAA;AAAA,EACA,MAAA,CAAA,IAAA,CAAY;AACd,CAAA,CAAE;AAEK,IAAM,wBAAwB,IAAI,GAAA;AAAA,EACvC,mCAAA;AAAA,E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,QAAA,kBAAA,GAAA;AAAA,sBAAC,OAAA;AAAA,sBAAA;AAAA,wBACC,IAAA,EAAM,yBAAA;AAAA,wBACN,GAAG,CAAC,OAAA;AAAA,wBACJ,GAAG,CAAC,OAAA;AAAA,wBACJ,KAAA,EAAO,kBAAA;AAAA,wBACP,MAAA,EAAQ,kBAAA;AAAA,wBACR,KAAA,EAAO;AAAA,0BACL,MAAA,EACE,wFAAA;AAAA,0BACF,OAAA,EAAS;AAAA;AACX;AAAA,qBACF,EACF;AAAA;AAAA;AACF;AAAA;AACF;AAAA;AAAA;AACF;AAAA,GAEJ;AAEJ;ACnaO,SAAS,UAAA,CAAW;AAAA,EACzB,GAAA,GAAM,QAAA;AAAA,EACN,SAAA,GAAY,KAAA;AAAA,EACZ,GAAG;AACL,CAAA,EAAoB;AAClB,EAAA,uBACEC,GAAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA,EAAK,mBAAA;AAAA,MACL,GAAA;AAAA,MACA,SAAA;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;ACRO,SAAS,cAAA,CAAe;AAAA,EAC7B,OAAA,GAAU,OAAA;AAAA,EACV,GAAA,GAAM,QAAA;AAAA,EACN,SAAA,GAAY,KAAA;AAAA,EACZ,GAAG;AACL,CAAA,EAAwB;AACtB,EAAA,MAAM,GAAA,GACJ,OAAA,KAAY,MAAA,GACR,qBAAA,GACA,sBAAA;AAEN,EAAA,uBACEA,GAAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,GAAA;AAAA,MACA,SAAA;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ","file":"index.js","sourcesContent":["export const walrosPortalSilhouetteUrl = new URL(\n \"./assets/walros-portal-silhouette.svg\",\n import.meta.url,\n).href;\n\nexport const walrosLogoChromeUrl = new URL(\n \"./assets/walros-logo-chrome.png\",\n import.meta.url,\n).href;\n\nexport const walrosWordmarkLightUrl = new URL(\n \"./assets/walros-wordmark-light.png\",\n import.meta.url,\n).href;\n\nexport const walrosWordmarkDarkUrl = new URL(\n \"./assets/walros-wordmark-dark.png\",\n import.meta.url,\n).href;\n","import {\n useEffect,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\";\nimport { gsap } from \"gsap\";\nimport { walrosPortalSilhouetteUrl } from \"../assets\";\n\nexport type WalrosPortalTransitionProps = {\n duration?: number;\n onComplete?: () => void;\n backgroundColor?: string;\n enabled?: boolean;\n storageMode?: \"always\" | \"session\" | \"once\";\n storageKey?: string;\n zIndex?: number;\n};\n\nconst SILHOUETTE_VIEWBOX = 1254;\nconst FOCUS_X = 626;\nconst FOCUS_Y = 333;\nconst PORTAL_RADIUS = 190;\n\nfunction getStorage(mode: \"session\" | \"once\"): Storage | null {\n if (typeof window === \"undefined\") return null;\n\n try {\n const storage =\n mode === \"session\"\n ? window.sessionStorage\n : window.localStorage;\n const testKey = \"__walros_portal_test__\";\n storage.setItem(testKey, \"1\");\n storage.removeItem(testKey);\n return storage;\n } catch {\n return null;\n }\n}\n\nfunction shouldRunTransition(\n enabled: boolean,\n storageMode: \"always\" | \"session\" | \"once\",\n storageKey: string,\n): boolean {\n if (!enabled) return false;\n if (storageMode === \"always\") return true;\n if (typeof window === \"undefined\") return false;\n\n const storage = getStorage(storageMode);\n if (!storage) return true;\n\n try {\n return storage.getItem(storageKey) == null;\n } catch {\n return true;\n }\n}\n\nexport function WalrosPortalTransition({\n duration = 750,\n onComplete,\n backgroundColor = \"#02050b\",\n enabled = true,\n storageMode = \"always\",\n storageKey = \"walros-portal-seen\",\n zIndex = 9999,\n}: WalrosPortalTransitionProps) {\n const [shouldRun] = useState(() =>\n shouldRunTransition(enabled, storageMode, storageKey),\n );\n const [visible, setVisible] = useState(shouldRun);\n const [size, setSize] = useState({ w: 0, h: 0 });\n\n const overlayRef = useRef<HTMLDivElement | null>(null);\n const maskScaleRef = useRef<SVGGElement | null>(null);\n const glowScaleRef = useRef<SVGGElement | null>(null);\n const completedRef = useRef(false);\n const startedRef = useRef(false);\n const rafRef = useRef<number | null>(null);\n const timelineRef = useRef<gsap.core.Timeline | null>(null);\n const previousOverflowRef = useRef(\"\");\n\n const uid = useId().replace(/[:]/g, \"_\");\n const maskId = `walros-portal-mask-${uid}`;\n const glowFilterId = `walros-portal-glow-${uid}`;\n\n useEffect(() => {\n if (!visible) return;\n\n const element = overlayRef.current;\n if (!element) return;\n\n const measure = () => {\n const rect = element.getBoundingClientRect();\n setSize((previous) =>\n previous.w === rect.width && previous.h === rect.height\n ? previous\n : { w: rect.width, h: rect.height },\n );\n };\n\n measure();\n\n const observer =\n typeof ResizeObserver !== \"undefined\"\n ? new ResizeObserver(measure)\n : null;\n\n observer?.observe(element);\n window.addEventListener(\"resize\", measure);\n\n return () => {\n observer?.disconnect();\n window.removeEventListener(\"resize\", measure);\n };\n }, [visible]);\n\n useLayoutEffect(() => {\n if (!enabled) {\n setVisible(false);\n return;\n }\n\n if (!visible) return;\n if (completedRef.current || startedRef.current) return;\n if (size.w <= 0 || size.h <= 0) return;\n\n const overlay = overlayRef.current;\n const maskScale = maskScaleRef.current;\n const glowScale = glowScaleRef.current;\n\n if (!overlay || !maskScale) return;\n\n startedRef.current = true;\n previousOverflowRef.current = document.body.style.overflow;\n document.body.style.overflow = \"hidden\";\n\n const finish = () => {\n if (completedRef.current) return;\n\n completedRef.current = true;\n document.body.style.overflow = previousOverflowRef.current;\n\n if (storageMode !== \"always\") {\n const storage = getStorage(storageMode);\n try {\n storage?.setItem(storageKey, \"1\");\n } catch {\n // El modo privado o una cuota llena no deben romper la web.\n }\n }\n\n setVisible(false);\n onComplete?.();\n };\n\n const reducedMotion = window.matchMedia(\n \"(prefers-reduced-motion: reduce)\",\n ).matches;\n\n if (reducedMotion) {\n const timeline = gsap.timeline({ onComplete: finish });\n timelineRef.current = timeline;\n timeline.to(overlay, {\n opacity: 0,\n duration: 0.15,\n ease: \"power1.out\",\n });\n return;\n }\n\n rafRef.current = requestAnimationFrame(() => {\n rafRef.current = null;\n\n const halfDiagonal =\n Math.sqrt(size.w * size.w + size.h * size.h) / 2;\n const initialPixels = Math.min(\n 180,\n Math.max(120, size.w * 0.12),\n );\n const initialScale =\n initialPixels / SILHOUETTE_VIEWBOX;\n const finalScale =\n ((halfDiagonal + 80) / PORTAL_RADIUS) * 1.15;\n\n gsap.set(maskScale, {\n svgOrigin: \"0 0\",\n scale: initialScale,\n });\n\n if (glowScale) {\n gsap.set(glowScale, {\n svgOrigin: \"0 0\",\n scale: initialScale,\n opacity: 0.85,\n });\n }\n\n gsap.set(overlay, { opacity: 1 });\n\n const totalSeconds = duration / 1000;\n const timeline = gsap.timeline({ onComplete: finish });\n timelineRef.current = timeline;\n\n timeline.to(\n maskScale,\n {\n scale: initialScale * 1.4,\n duration: totalSeconds * 0.15,\n ease: \"power2.out\",\n },\n 0,\n );\n\n if (glowScale) {\n timeline.to(\n glowScale,\n {\n scale: initialScale * 1.4,\n opacity: 1,\n duration: totalSeconds * 0.15,\n ease: \"power2.out\",\n },\n 0,\n );\n }\n\n timeline.to(\n maskScale,\n {\n scale: finalScale,\n duration: totalSeconds * 0.85,\n ease: \"power2.in\",\n },\n totalSeconds * 0.15,\n );\n\n if (glowScale) {\n timeline.to(\n glowScale,\n {\n scale: finalScale * 0.9,\n opacity: 0,\n duration: totalSeconds * 0.4,\n ease: \"power2.in\",\n },\n totalSeconds * 0.45,\n );\n }\n\n timeline.to(\n overlay,\n {\n opacity: 0,\n duration: totalSeconds * 0.1,\n ease: \"power2.out\",\n },\n totalSeconds * 0.9,\n );\n });\n }, [\n duration,\n enabled,\n onComplete,\n size,\n storageKey,\n storageMode,\n visible,\n ]);\n\n useEffect(() => {\n return () => {\n if (rafRef.current !== null) {\n cancelAnimationFrame(rafRef.current);\n }\n\n timelineRef.current?.kill();\n\n if (startedRef.current && !completedRef.current) {\n document.body.style.overflow =\n previousOverflowRef.current;\n }\n };\n }, []);\n\n if (!shouldRun || !visible) return null;\n\n const { w, h } = size;\n const ready = w > 0 && h > 0;\n\n const viewportCenterX = w / 2;\n const viewportCenterY = h / 2;\n const initialPixels = Math.min(\n 180,\n Math.max(120, w * 0.12),\n );\n const initialScale =\n initialPixels / SILHOUETTE_VIEWBOX;\n const visualCenter = SILHOUETTE_VIEWBOX / 2;\n const initialOffsetX =\n (visualCenter - FOCUS_X) * initialScale;\n const initialOffsetY =\n (visualCenter - FOCUS_Y) * initialScale;\n const portalCenterX =\n viewportCenterX - initialOffsetX;\n const portalCenterY =\n viewportCenterY - initialOffsetY;\n\n return (\n <div\n ref={overlayRef}\n aria-hidden=\"true\"\n style={{\n position: \"fixed\",\n inset: 0,\n width: \"100vw\",\n height: \"100dvh\",\n zIndex,\n pointerEvents: \"none\",\n overflow: \"hidden\",\n backgroundColor: ready\n ? \"transparent\"\n : backgroundColor,\n }}\n >\n {ready && (\n <svg\n width=\"100%\"\n height=\"100%\"\n viewBox={`0 0 ${w} ${h}`}\n preserveAspectRatio=\"none\"\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"block\",\n }}\n >\n <defs>\n <filter\n id={glowFilterId}\n x=\"-50%\"\n y=\"-50%\"\n width=\"200%\"\n height=\"200%\"\n >\n <feGaussianBlur stdDeviation=\"28\" />\n </filter>\n\n <mask\n id={maskId}\n maskUnits=\"userSpaceOnUse\"\n x=\"0\"\n y=\"0\"\n width={w}\n height={h}\n >\n <rect\n x=\"0\"\n y=\"0\"\n width={w}\n height={h}\n fill=\"white\"\n />\n\n <g\n transform={`translate(${portalCenterX} ${portalCenterY})`}\n >\n <g\n ref={maskScaleRef}\n transform={`scale(${initialScale})`}\n >\n <image\n href={walrosPortalSilhouetteUrl}\n x={-FOCUS_X}\n y={-FOCUS_Y}\n width={SILHOUETTE_VIEWBOX}\n height={SILHOUETTE_VIEWBOX}\n />\n </g>\n </g>\n </mask>\n </defs>\n\n <rect\n x=\"0\"\n y=\"0\"\n width={w}\n height={h}\n fill={backgroundColor}\n mask={`url(#${maskId})`}\n />\n\n <g\n transform={`translate(${portalCenterX} ${portalCenterY})`}\n style={{\n mixBlendMode: \"screen\",\n pointerEvents: \"none\",\n }}\n >\n <g\n ref={glowScaleRef}\n transform={`scale(${initialScale})`}\n opacity=\"0.85\"\n >\n <g filter={`url(#${glowFilterId})`}>\n <image\n href={walrosPortalSilhouetteUrl}\n x={-FOCUS_X}\n y={-FOCUS_Y}\n width={SILHOUETTE_VIEWBOX}\n height={SILHOUETTE_VIEWBOX}\n style={{\n filter:\n \"brightness(0) saturate(100%) invert(58%) sepia(94%) saturate(1352%) hue-rotate(182deg)\",\n opacity: 0.6,\n }}\n />\n </g>\n </g>\n </g>\n </svg>\n )}\n </div>\n );\n}\n\nexport default WalrosPortalTransition;\n","import type { ImgHTMLAttributes } from \"react\";\nimport { walrosLogoChromeUrl } from \"../assets\";\n\nexport type WalrosLogoProps = Omit<\n ImgHTMLAttributes<HTMLImageElement>,\n \"src\"\n>;\n\nexport function WalrosLogo({\n alt = \"WalrOS\",\n draggable = false,\n ...props\n}: WalrosLogoProps) {\n return (\n <img\n src={walrosLogoChromeUrl}\n alt={alt}\n draggable={draggable}\n {...props}\n />\n );\n}\n\nexport default WalrosLogo;\n","import type { ImgHTMLAttributes } from \"react\";\nimport {\n walrosWordmarkDarkUrl,\n walrosWordmarkLightUrl,\n} from \"../assets\";\n\nexport type WalrosWordmarkProps = Omit<\n ImgHTMLAttributes<HTMLImageElement>,\n \"src\"\n> & {\n variant?: \"light\" | \"dark\";\n};\n\nexport function WalrosWordmark({\n variant = \"light\",\n alt = \"WalrOS\",\n draggable = false,\n ...props\n}: WalrosWordmarkProps) {\n const src =\n variant === \"dark\"\n ? walrosWordmarkDarkUrl\n : walrosWordmarkLightUrl;\n\n return (\n <img\n src={src}\n alt={alt}\n draggable={draggable}\n {...props}\n />\n );\n}\n\nexport default WalrosWordmark;\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@walrosproject/ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Componentes y recursos visuales oficiales del ecosistema WalrOS.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"README.md",
|
|
19
|
+
"LICENSE"
|
|
20
|
+
],
|
|
21
|
+
"sideEffects": false,
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsup && node scripts/copy-assets.mjs",
|
|
24
|
+
"check": "tsc --noEmit",
|
|
25
|
+
"pack:check": "npm pack --dry-run",
|
|
26
|
+
"prepublishOnly": "npm run check && npm run build"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"gsap": "^3.12.0"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"react": ">=18 <20",
|
|
33
|
+
"react-dom": ">=18 <20"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/react": "^19.0.0",
|
|
37
|
+
"@types/react-dom": "^19.0.0",
|
|
38
|
+
"react": "^19.0.0",
|
|
39
|
+
"react-dom": "^19.0.0",
|
|
40
|
+
"tsup": "^8.0.0",
|
|
41
|
+
"typescript": "^5.7.0"
|
|
42
|
+
},
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=18"
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
48
|
+
},
|
|
49
|
+
"repository": {
|
|
50
|
+
"type": "git",
|
|
51
|
+
"url": "git+https://github.com/walrosproject/walros-ui.git"
|
|
52
|
+
},
|
|
53
|
+
"homepage": "https://walros.org",
|
|
54
|
+
"bugs": {
|
|
55
|
+
"url": "https://github.com/walrosproject/walros-ui/issues"
|
|
56
|
+
},
|
|
57
|
+
"keywords": [
|
|
58
|
+
"walros",
|
|
59
|
+
"react",
|
|
60
|
+
"ui",
|
|
61
|
+
"components",
|
|
62
|
+
"animation",
|
|
63
|
+
"gsap"
|
|
64
|
+
],
|
|
65
|
+
"license": "SEE LICENSE IN LICENSE"
|
|
66
|
+
}
|