@react-email/preview-server 4.2.10 → 4.2.12
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/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +5 -5
- package/.next/build-manifest.json +2 -2
- package/.next/next-minimal-server.js.nft.json +1 -1
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/preview/[...slug]/page.js +25 -25
- package/.next/server/app/preview/[...slug]/page.js.nft.json +1 -1
- package/.next/server/app/preview/[...slug]/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/235.js +1 -1
- package/.next/server/chunks/593.js +1 -0
- package/.next/server/chunks/630.js +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{615-6794ae4379dbdcd7.js → 615-96e04174ae422082.js} +1 -1
- package/.next/static/chunks/app/layout-873f139023fe1b60.js +1 -0
- package/.next/static/chunks/app/preview/[...slug]/page-2bd3b2c525aecbf3.js +1 -0
- package/.next/static/css/{e2f28c91a6a919eb.css → 2016446a90966a61.css} +1 -1
- package/.next/static/media/19cfc7226ec3afaa-s.woff2 +0 -0
- package/.next/static/media/21350d82a1f187e9-s.woff2 +0 -0
- package/.next/static/media/ba9851c3c22cd980-s.woff2 +0 -0
- package/.next/static/media/c5fe6dc8356a8c31-s.woff2 +0 -0
- package/.next/trace +29 -29
- package/CHANGELOG.md +8 -0
- package/package.json +2 -2
- package/readme.md +3 -4
- package/src/actions/email-validation/check-compatibility.ts +1 -0
- package/src/actions/get-email-path-from-slug.ts +1 -1
- package/src/actions/render-email-by-path.tsx +20 -18
- package/src/app/env.ts +0 -4
- package/src/app/layout.tsx +8 -5
- package/src/app/page.tsx +2 -4
- package/src/app/preview/[...slug]/error-overlay.tsx +1 -0
- package/src/app/preview/[...slug]/page.tsx +3 -5
- package/src/app/preview/[...slug]/preview.tsx +3 -3
- package/src/components/resizable-wrapper.tsx +3 -2
- package/src/components/toolbar.tsx +2 -3
- package/src/contexts/emails.tsx +3 -6
- package/src/contexts/preview.tsx +13 -1
- package/src/hooks/use-hot-reload.ts +2 -2
- package/src/utils/caniemail/get-compatibility-stats-for-entry.ts +0 -1
- package/src/utils/convert-stack-with-sourcemap.ts +0 -1
- package/src/utils/get-emails-directory-metadata.ts +0 -1
- package/src/utils/run-bundled-code.ts +1 -3
- package/src/utils/testing/request-response-email.tsx +0 -1
- package/tailwind-internals.d.ts +0 -2
- package/.next/server/chunks/764.js +0 -1
- package/.next/static/chunks/app/layout-3efce01da1283283.js +0 -1
- package/.next/static/chunks/app/preview/[...slug]/page-8ec1ff0a91263414.js +0 -1
- package/.next/static/media/26a46d62cd723877-s.woff2 +0 -0
- package/.next/static/media/55c55f0601d81cf3-s.woff2 +0 -0
- package/.next/static/media/581909926a08bbc8-s.woff2 +0 -0
- package/.next/static/media/97e0cb1ae144a2a9-s.woff2 +0 -0
- package/src/contexts/fragment-identifier.tsx +0 -48
- package/src/hooks/use-icon-animation.ts +0 -41
- /package/.next/static/{VF4Opcpyx3KTkj3r5bKlL → uokDo0eZqRUtNrDAJfT75}/_buildManifest.js +0 -0
- /package/.next/static/{VF4Opcpyx3KTkj3r5bKlL → uokDo0eZqRUtNrDAJfT75}/_ssgManifest.js +0 -0
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { DotLottie } from '@lottiefiles/dotlottie-react';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
const TIMEOUT = 150;
|
|
5
|
-
const THRESHOLD_ANIMATION = 0.9;
|
|
6
|
-
|
|
7
|
-
export const useIconAnimation = () => {
|
|
8
|
-
const ref = React.useRef<DotLottie>(null);
|
|
9
|
-
const timer = React.useRef<NodeJS.Timeout | null>(null);
|
|
10
|
-
|
|
11
|
-
const onMouseLeave = React.useCallback(() => {
|
|
12
|
-
timer.current && clearTimeout(timer.current);
|
|
13
|
-
}, []);
|
|
14
|
-
|
|
15
|
-
const onMouseEnter = React.useCallback(() => {
|
|
16
|
-
if (!ref.current) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const total = Math.round(ref.current.totalFrames ?? 0);
|
|
21
|
-
const current = Math.round((ref.current.currentFrame ?? 0) + 1);
|
|
22
|
-
|
|
23
|
-
if (current === 1 || current >= total * THRESHOLD_ANIMATION) {
|
|
24
|
-
timer.current = setTimeout(() => {
|
|
25
|
-
if (!ref.current) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
ref.current.stop();
|
|
30
|
-
ref.current.setSpeed(1);
|
|
31
|
-
ref.current.play();
|
|
32
|
-
}, TIMEOUT);
|
|
33
|
-
}
|
|
34
|
-
}, []);
|
|
35
|
-
|
|
36
|
-
return {
|
|
37
|
-
ref,
|
|
38
|
-
onMouseLeave,
|
|
39
|
-
onMouseEnter,
|
|
40
|
-
};
|
|
41
|
-
};
|
|
File without changes
|
|
File without changes
|