@vibes.diy/use-vibes-base 0.16.2 → 0.17.1-dev-next
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/components/BrutalistCard/BrutalistCard.d.ts +1 -0
- package/components/BrutalistCard/BrutalistCard.js +2 -2
- package/components/BrutalistCard/BrutalistCard.js.map +1 -1
- package/components/BrutalistCard/BrutalistCard.styles.d.ts +1 -1
- package/components/BrutalistCard/BrutalistCard.styles.js +12 -2
- package/components/BrutalistCard/BrutalistCard.styles.js.map +1 -1
- package/contexts/VibeContext.d.ts +31 -0
- package/contexts/VibeContext.js +65 -0
- package/contexts/VibeContext.js.map +1 -0
- package/hooks/vibes-gen/IframeVibesComponent.js +1 -1
- package/hooks/vibes-gen/IframeVibesComponent.js.map +1 -1
- package/index.d.ts +8 -6
- package/index.js +88 -17
- package/index.js.map +1 -1
- package/mounting/index.d.ts +4 -0
- package/mounting/index.js +4 -0
- package/mounting/index.js.map +1 -0
- package/mounting/mountVibeCode.d.ts +1 -0
- package/mounting/mountVibeCode.js +53 -0
- package/mounting/mountVibeCode.js.map +1 -0
- package/mounting/mountVibeWithCleanup.d.ts +1 -0
- package/mounting/mountVibeWithCleanup.js +56 -0
- package/mounting/mountVibeWithCleanup.js.map +1 -0
- package/mounting/types.d.ts +10 -0
- package/mounting/types.js +7 -0
- package/mounting/types.js.map +1 -0
- package/package.json +12 -9
- package/vibe-app-mount.d.ts +4 -5
- package/vibe-app-mount.js +20 -105
- package/vibe-app-mount.js.map +1 -1
- package/ManualRedirectStrategy.d.ts +0 -24
- package/ManualRedirectStrategy.js +0 -289
- package/ManualRedirectStrategy.js.map +0 -1
- package/components/AuthWall/AuthWall.d.ts +0 -8
- package/components/AuthWall/AuthWall.js +0 -161
- package/components/AuthWall/AuthWall.js.map +0 -1
- package/components/AuthWall/AuthWall.styles.d.ts +0 -24
- package/components/AuthWall/AuthWall.styles.js +0 -82
- package/components/AuthWall/AuthWall.styles.js.map +0 -1
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState, useRef } from 'react';
|
|
2
|
-
import { getWrapperStyle, getImageContentWrapperStyle, getImageSectionStyle, getOverlayStyle, getMenuStyle, getTitleStyle, getDescriptionStyle, } from './AuthWall.styles.js';
|
|
3
|
-
import { VibesButton } from '../VibesButton/VibesButton.js';
|
|
4
|
-
import { BrutalistCard } from '../BrutalistCard/BrutalistCard.js';
|
|
5
|
-
const FALLBACK_IMAGE_URL = 'https://images.unsplash.com/photo-1518837695005-2083093ee35b?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80';
|
|
6
|
-
const MENU_OPEN_DELAY_MS = 500;
|
|
7
|
-
const MENU_SLIDE_DURATION_MS = 900;
|
|
8
|
-
const FADE_OUT_DURATION_MS = 500;
|
|
9
|
-
export function AuthWall({ onLogin, imageUrl, title, open }) {
|
|
10
|
-
const [isVisible, setIsVisible] = useState(open);
|
|
11
|
-
const [menuOpen, setMenuOpen] = useState(false);
|
|
12
|
-
const [isFadingOut, setIsFadingOut] = useState(false);
|
|
13
|
-
const [isHovering, setIsHovering] = useState(false);
|
|
14
|
-
const [menuHeight, setMenuHeight] = useState(0);
|
|
15
|
-
const [actualImageUrl, setActualImageUrl] = useState(imageUrl);
|
|
16
|
-
const menuRef = useRef(null);
|
|
17
|
-
const timeoutsRef = useRef([]);
|
|
18
|
-
const prevOpenRef = useRef(undefined);
|
|
19
|
-
const prevMenuHeightRef = useRef(0);
|
|
20
|
-
const prefersReducedMotion = typeof window !== 'undefined' && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
if (!isVisible)
|
|
23
|
-
return;
|
|
24
|
-
if (menuRef.current) {
|
|
25
|
-
setMenuHeight(menuRef.current.offsetHeight);
|
|
26
|
-
}
|
|
27
|
-
}, [isVisible]);
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
if (!isVisible)
|
|
30
|
-
return;
|
|
31
|
-
const menuEl = menuRef.current;
|
|
32
|
-
if (!menuEl)
|
|
33
|
-
return;
|
|
34
|
-
const updateHeight = () => setMenuHeight(menuEl.offsetHeight);
|
|
35
|
-
updateHeight();
|
|
36
|
-
let ro = null;
|
|
37
|
-
const hasRO = typeof window !== 'undefined' && 'ResizeObserver' in window;
|
|
38
|
-
if (hasRO) {
|
|
39
|
-
ro = new ResizeObserver(() => {
|
|
40
|
-
updateHeight();
|
|
41
|
-
});
|
|
42
|
-
ro.observe(menuEl);
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
window.addEventListener('resize', updateHeight);
|
|
46
|
-
}
|
|
47
|
-
return () => {
|
|
48
|
-
if (ro) {
|
|
49
|
-
ro.disconnect();
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
window.removeEventListener('resize', updateHeight);
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
}, [isVisible]);
|
|
56
|
-
useEffect(() => {
|
|
57
|
-
const prevOpen = prevOpenRef.current;
|
|
58
|
-
const openChanged = prevOpen !== open;
|
|
59
|
-
const menuHeightBecameAvailable = prevMenuHeightRef.current === 0 && menuHeight > 0;
|
|
60
|
-
prevOpenRef.current = open;
|
|
61
|
-
prevMenuHeightRef.current = menuHeight;
|
|
62
|
-
if (!openChanged && !menuHeightBecameAvailable)
|
|
63
|
-
return;
|
|
64
|
-
timeoutsRef.current.forEach(clearTimeout);
|
|
65
|
-
timeoutsRef.current = [];
|
|
66
|
-
if (prefersReducedMotion) {
|
|
67
|
-
setIsVisible(open);
|
|
68
|
-
setMenuOpen(open);
|
|
69
|
-
setIsFadingOut(false);
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
if (open) {
|
|
73
|
-
setIsVisible(true);
|
|
74
|
-
setIsFadingOut(false);
|
|
75
|
-
setMenuOpen(false);
|
|
76
|
-
if (menuHeight > 0) {
|
|
77
|
-
const openTimeout = setTimeout(() => {
|
|
78
|
-
setMenuOpen(true);
|
|
79
|
-
}, MENU_OPEN_DELAY_MS);
|
|
80
|
-
timeoutsRef.current.push(openTimeout);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
if (!prevOpen)
|
|
85
|
-
return;
|
|
86
|
-
setMenuOpen(false);
|
|
87
|
-
const fadeTimeout = setTimeout(() => {
|
|
88
|
-
setIsFadingOut(true);
|
|
89
|
-
}, MENU_SLIDE_DURATION_MS);
|
|
90
|
-
timeoutsRef.current.push(fadeTimeout);
|
|
91
|
-
const hideTimeout = setTimeout(() => {
|
|
92
|
-
setIsVisible(false);
|
|
93
|
-
setIsFadingOut(false);
|
|
94
|
-
}, MENU_SLIDE_DURATION_MS + FADE_OUT_DURATION_MS);
|
|
95
|
-
timeoutsRef.current.push(hideTimeout);
|
|
96
|
-
}
|
|
97
|
-
}, [open, menuHeight, prefersReducedMotion]);
|
|
98
|
-
useEffect(() => {
|
|
99
|
-
return () => {
|
|
100
|
-
timeoutsRef.current.forEach(clearTimeout);
|
|
101
|
-
timeoutsRef.current = [];
|
|
102
|
-
};
|
|
103
|
-
}, []);
|
|
104
|
-
useEffect(() => {
|
|
105
|
-
if (!imageUrl) {
|
|
106
|
-
setActualImageUrl(FALLBACK_IMAGE_URL);
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
let canceled = false;
|
|
110
|
-
const img = new Image();
|
|
111
|
-
img.onload = () => {
|
|
112
|
-
if (!canceled)
|
|
113
|
-
setActualImageUrl(imageUrl);
|
|
114
|
-
};
|
|
115
|
-
img.onerror = () => {
|
|
116
|
-
if (!canceled) {
|
|
117
|
-
setActualImageUrl(FALLBACK_IMAGE_URL);
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
img.src = imageUrl;
|
|
121
|
-
return () => {
|
|
122
|
-
canceled = true;
|
|
123
|
-
};
|
|
124
|
-
}, [imageUrl]);
|
|
125
|
-
if (!isVisible)
|
|
126
|
-
return null;
|
|
127
|
-
const overlayStyle = {
|
|
128
|
-
...getOverlayStyle(),
|
|
129
|
-
transition: 'backdrop-filter 0.4s ease',
|
|
130
|
-
backdropFilter: isHovering ? 'blur(4px)' : 'blur(12px)',
|
|
131
|
-
};
|
|
132
|
-
const imageContentWrapperStyle = {
|
|
133
|
-
...getImageContentWrapperStyle(),
|
|
134
|
-
transition: prefersReducedMotion
|
|
135
|
-
? 'none'
|
|
136
|
-
: `transform ${MENU_SLIDE_DURATION_MS / 1000}s ease, opacity ${FADE_OUT_DURATION_MS / 1000}s ease`,
|
|
137
|
-
transform: menuOpen ? `translateY(-${menuHeight}px)` : 'translateY(0)',
|
|
138
|
-
opacity: isFadingOut ? 0 : 1,
|
|
139
|
-
willChange: 'transform, opacity',
|
|
140
|
-
};
|
|
141
|
-
const menuStyle = {
|
|
142
|
-
...getMenuStyle(),
|
|
143
|
-
transition: prefersReducedMotion ? 'none' : `opacity ${FADE_OUT_DURATION_MS / 1000}s ease`,
|
|
144
|
-
opacity: isFadingOut ? 0 : 1,
|
|
145
|
-
};
|
|
146
|
-
return (React.createElement("div", { style: getWrapperStyle() },
|
|
147
|
-
React.createElement("div", { ref: menuRef, style: menuStyle },
|
|
148
|
-
React.createElement(BrutalistCard, { size: "lg", style: {
|
|
149
|
-
position: 'relative',
|
|
150
|
-
textAlign: 'left',
|
|
151
|
-
maxWidth: '400px',
|
|
152
|
-
width: '90%',
|
|
153
|
-
} },
|
|
154
|
-
React.createElement("h1", { style: getTitleStyle() }, title),
|
|
155
|
-
React.createElement("p", { style: getDescriptionStyle() }, "Login to access this Vibe!"),
|
|
156
|
-
React.createElement(VibesButton, { variant: "primary", onClick: onLogin, onHover: () => setIsHovering(true), onUnhover: () => setIsHovering(false) }, "Login"))),
|
|
157
|
-
React.createElement("div", { style: imageContentWrapperStyle },
|
|
158
|
-
React.createElement("div", { style: getImageSectionStyle(actualImageUrl) },
|
|
159
|
-
React.createElement("div", { style: overlayStyle })))));
|
|
160
|
-
}
|
|
161
|
-
//# sourceMappingURL=AuthWall.js.map
|
|
@@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aAAa,IACZ,IAAI,EAAC,IAAI,EACT,KAAK,EAAE;oBACL,QAAQ,EAAE,UAAU;oBACpB,SAAS,EAAE,MAAM;oBACjB,QAAQ,EAAE,OAAO;oBACjB,KAAK,EAAE,KAAK;iBACb;gBAED,4BAAI,KAAK,EAAE,aAAa,EAAE,IAAG,KAAK,CAAM;gBACxC,2BAAG,KAAK,EAAE,mBAAmB,EAAE,iCAAgC;gBAC/D,oBAAC,WAAW,IACV,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,EAClC,SAAS,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,YAGzB,CACA,CACZ;QAGN,6BAAK,KAAK,EAAE,wBAAwB;YAClC,6BAAK,KAAK,EAAE,oBAAoB,CAAC,cAAc,CAAC;gBAC9C,6BAAK,KAAK,EAAE,YAAY,GAAI,CACxB,CACF,CACF,CACP,CAAC;AAAA,CACH"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
export declare const authWallTheme: {
|
|
3
|
-
colors: {
|
|
4
|
-
menuBg: string;
|
|
5
|
-
shadow: string;
|
|
6
|
-
gridLineColor: string;
|
|
7
|
-
};
|
|
8
|
-
dimensions: {
|
|
9
|
-
gridSize: string;
|
|
10
|
-
padding: string;
|
|
11
|
-
};
|
|
12
|
-
animation: {
|
|
13
|
-
duration: string;
|
|
14
|
-
easing: string;
|
|
15
|
-
blurAmount: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export declare const getWrapperStyle: () => CSSProperties;
|
|
19
|
-
export declare const getMenuStyle: () => CSSProperties;
|
|
20
|
-
export declare const getImageContentWrapperStyle: () => CSSProperties;
|
|
21
|
-
export declare const getImageSectionStyle: (imageUrl: string) => CSSProperties;
|
|
22
|
-
export declare const getOverlayStyle: () => CSSProperties;
|
|
23
|
-
export declare const getTitleStyle: () => CSSProperties;
|
|
24
|
-
export declare const getDescriptionStyle: () => CSSProperties;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
export const authWallTheme = {
|
|
2
|
-
colors: {
|
|
3
|
-
menuBg: 'var(--aw-menu-bg, #d4d4d4)',
|
|
4
|
-
shadow: 'var(--aw-shadow, rgba(0, 0, 0, 0.3))',
|
|
5
|
-
gridLineColor: 'var(--aw-grid-line, rgba(255, 255, 255, 0.5))',
|
|
6
|
-
},
|
|
7
|
-
dimensions: {
|
|
8
|
-
gridSize: '40px',
|
|
9
|
-
padding: '24px',
|
|
10
|
-
},
|
|
11
|
-
animation: {
|
|
12
|
-
duration: '0.4s',
|
|
13
|
-
easing: 'ease',
|
|
14
|
-
blurAmount: '4px',
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
export const getWrapperStyle = () => ({
|
|
18
|
-
position: 'relative',
|
|
19
|
-
overflow: 'hidden',
|
|
20
|
-
});
|
|
21
|
-
export const getMenuStyle = () => ({
|
|
22
|
-
position: 'fixed',
|
|
23
|
-
bottom: 0,
|
|
24
|
-
left: 0,
|
|
25
|
-
right: 0,
|
|
26
|
-
zIndex: 1000,
|
|
27
|
-
backgroundColor: authWallTheme.colors.menuBg,
|
|
28
|
-
backgroundImage: `
|
|
29
|
-
linear-gradient(${authWallTheme.colors.gridLineColor} 1px, transparent 1px),
|
|
30
|
-
linear-gradient(90deg, ${authWallTheme.colors.gridLineColor} 1px, transparent 1px)
|
|
31
|
-
`,
|
|
32
|
-
backgroundSize: authWallTheme.dimensions.gridSize + ' ' + authWallTheme.dimensions.gridSize,
|
|
33
|
-
boxShadow: `0 -2px 10px ${authWallTheme.colors.shadow}`,
|
|
34
|
-
padding: authWallTheme.dimensions.padding,
|
|
35
|
-
display: 'flex',
|
|
36
|
-
alignItems: 'center',
|
|
37
|
-
justifyContent: 'center',
|
|
38
|
-
height: '80vh',
|
|
39
|
-
});
|
|
40
|
-
export const getImageContentWrapperStyle = () => ({
|
|
41
|
-
position: 'fixed',
|
|
42
|
-
top: 0,
|
|
43
|
-
left: 0,
|
|
44
|
-
right: 0,
|
|
45
|
-
bottom: 0,
|
|
46
|
-
zIndex: 1100,
|
|
47
|
-
overflowY: 'auto',
|
|
48
|
-
});
|
|
49
|
-
export const getImageSectionStyle = (imageUrl) => ({
|
|
50
|
-
width: '100%',
|
|
51
|
-
height: '100%',
|
|
52
|
-
backgroundImage: `url(${imageUrl})`,
|
|
53
|
-
backgroundSize: 'cover',
|
|
54
|
-
backgroundPosition: 'center',
|
|
55
|
-
display: 'flex',
|
|
56
|
-
alignItems: 'center',
|
|
57
|
-
justifyContent: 'center',
|
|
58
|
-
});
|
|
59
|
-
export const getOverlayStyle = () => ({
|
|
60
|
-
position: 'absolute',
|
|
61
|
-
top: 0,
|
|
62
|
-
left: 0,
|
|
63
|
-
right: 0,
|
|
64
|
-
bottom: 0,
|
|
65
|
-
backdropFilter: 'blur(12px)',
|
|
66
|
-
backgroundColor: 'rgba(255, 255, 255, 0.4)',
|
|
67
|
-
});
|
|
68
|
-
export const getTitleStyle = () => ({
|
|
69
|
-
fontSize: '1.3rem',
|
|
70
|
-
fontWeight: 800,
|
|
71
|
-
marginBottom: '0px',
|
|
72
|
-
color: '#1a1a1a',
|
|
73
|
-
textTransform: 'uppercase',
|
|
74
|
-
letterSpacing: '0.05em',
|
|
75
|
-
});
|
|
76
|
-
export const getDescriptionStyle = () => ({
|
|
77
|
-
fontSize: '1rem',
|
|
78
|
-
marginBottom: '2rem',
|
|
79
|
-
marginTop: '8px',
|
|
80
|
-
color: '#333333',
|
|
81
|
-
});
|
|
82
|
-
//# sourceMappingURL=AuthWall.styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthWall.styles.js","sourceRoot":"","sources":["../../../jsr/components/AuthWall/AuthWall.styles.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,MAAM,EAAE;QACN,MAAM,EAAE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