react-email 3.0.5 → 3.0.6
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/CHANGELOG.md +6 -0
- package/dist/cli/index.js +5 -6
- package/dist/cli/index.mjs +41 -44
- package/dist/preview/.next/BUILD_ID +1 -1
- package/dist/preview/.next/app-build-manifest.json +9 -9
- package/dist/preview/.next/build-manifest.json +3 -3
- package/dist/preview/.next/cache/.rscinfo +1 -1
- package/dist/preview/.next/cache/eslint/.cache_1c3sgg +1 -0
- package/dist/preview/.next/cache/webpack/client-production/0.pack +0 -0
- package/dist/preview/.next/cache/webpack/client-production/index.pack +0 -0
- package/dist/preview/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/dist/preview/.next/cache/webpack/server-production/0.pack +0 -0
- package/dist/preview/.next/cache/webpack/server-production/index.pack +0 -0
- package/dist/preview/.next/next-minimal-server.js.nft.json +1 -1
- package/dist/preview/.next/next-server.js.nft.json +1 -1
- package/dist/preview/.next/prerender-manifest.json +1 -1
- package/dist/preview/.next/required-server-files.json +1 -1
- package/dist/preview/.next/server/app/_not-found/page.js +1 -1
- package/dist/preview/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/preview/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/preview/.next/server/app/favicon.ico/route.js +1 -1
- package/dist/preview/.next/server/app/page.js +1 -1
- package/dist/preview/.next/server/app/page.js.nft.json +1 -1
- package/dist/preview/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/preview/.next/server/app/preview/[...slug]/page.js +7 -6
- package/dist/preview/.next/server/app/preview/[...slug]/page.js.nft.json +1 -1
- package/dist/preview/.next/server/app/preview/[...slug]/page_client-reference-manifest.js +1 -1
- package/dist/preview/.next/server/chunks/196.js +5 -0
- package/dist/preview/.next/server/chunks/391.js +1 -0
- package/dist/preview/.next/server/chunks/720.js +3 -3
- package/dist/preview/.next/server/middleware-build-manifest.js +1 -1
- package/dist/preview/.next/server/next-font-manifest.js +1 -1
- package/dist/preview/.next/server/next-font-manifest.json +1 -1
- package/dist/preview/.next/server/pages/500.html +1 -1
- package/dist/preview/.next/server/server-reference-manifest.js +1 -1
- package/dist/preview/.next/server/server-reference-manifest.json +1 -1
- package/dist/preview/.next/static/chunks/{154-69b91a0c2fd801b8.js → 154-4202f86af36ccff4.js} +1 -1
- package/dist/preview/.next/static/chunks/app/layout-a2901ed1c2c53661.js +1 -0
- package/dist/preview/.next/static/chunks/app/{page-2c3e297e38c526ef.js → page-54a86772095e22e0.js} +1 -1
- package/dist/preview/.next/static/chunks/app/preview/[...slug]/{page-2b4988ba6daf34e1.js → page-2bfad134b65ddd79.js} +1 -1
- package/dist/preview/.next/static/chunks/main-app-cd104297c6bcc87e.js +1 -0
- package/dist/preview/.next/trace +21 -20
- package/dist/preview/.next/types/app/layout.ts +1 -1
- package/dist/preview/.next/types/app/preview/[...slug]/page.ts +1 -1
- package/package.json +1 -1
- package/src/actions/get-emails-directory-metadata-action.ts +19 -0
- package/src/app/layout.tsx +1 -1
- package/src/app/preview/[...slug]/page.tsx +1 -1
- package/src/components/sidebar/sidebar-directory-children.tsx +1 -1
- package/src/components/sidebar/sidebar-directory.tsx +1 -1
- package/src/contexts/emails.tsx +3 -5
- package/src/{actions → utils}/get-emails-directory-metadata.spec.ts +1 -1
- package/src/utils/get-emails-directory-metadata.ts +119 -0
- package/dist/index.d.mts +0 -20
- package/dist/index.d.ts +0 -20
- package/dist/index.js +0 -96
- package/dist/index.mjs +0 -21
- package/dist/package/index.d.mts +0 -33
- package/dist/package/index.d.ts +0 -33
- package/dist/package/index.js +0 -62
- package/dist/package/index.mjs +0 -7
- package/dist/preview/.next/cache/eslint/.cache_1vyas3k +0 -1
- package/dist/preview/.next/server/chunks/420.js +0 -1
- package/dist/preview/.next/server/chunks/625.js +0 -5
- package/dist/preview/.next/static/chunks/app/layout-e1b6f1534cbbe5bd.js +0 -1
- package/dist/preview/.next/static/chunks/main-app-2c7f96205a73f128.js +0 -1
- package/src/actions/get-emails-directory-metadata.ts +0 -123
- package/src/package/body/dist/index.d.mts +0 -6
- package/src/package/body/dist/index.d.ts +0 -6
- package/src/package/body/dist/index.js +0 -79
- package/src/package/body/dist/index.mjs +0 -45
- package/src/package/button/dist/index.d.mts +0 -6
- package/src/package/button/dist/index.d.ts +0 -6
- package/src/package/button/dist/index.js +0 -252
- package/src/package/button/dist/index.mjs +0 -218
- package/src/package/code-block/dist/index.d.mts +0 -4906
- package/src/package/code-block/dist/index.d.ts +0 -4906
- package/src/package/code-block/dist/index.js +0 -18205
- package/src/package/code-block/dist/index.mjs +0 -18133
- package/src/package/code-inline/dist/index.d.mts +0 -11
- package/src/package/code-inline/dist/index.d.ts +0 -11
- package/src/package/code-inline/dist/index.js +0 -106
- package/src/package/code-inline/dist/index.mjs +0 -72
- package/src/package/column/dist/index.d.mts +0 -6
- package/src/package/column/dist/index.d.ts +0 -6
- package/src/package/column/dist/index.js +0 -79
- package/src/package/column/dist/index.mjs +0 -45
- package/src/package/components/dist/index.d.mts +0 -20
- package/src/package/components/dist/index.d.ts +0 -20
- package/src/package/components/dist/index.js +0 -62
- package/src/package/components/dist/index.mjs +0 -21
- package/src/package/container/dist/index.d.mts +0 -6
- package/src/package/container/dist/index.d.ts +0 -6
- package/src/package/container/dist/index.js +0 -93
- package/src/package/container/dist/index.mjs +0 -59
- package/src/package/font/dist/index.d.mts +0 -25
- package/src/package/font/dist/index.d.ts +0 -25
- package/src/package/font/dist/index.js +0 -55
- package/src/package/font/dist/index.mjs +0 -28
- package/src/package/head/dist/index.d.mts +0 -6
- package/src/package/head/dist/index.d.ts +0 -6
- package/src/package/head/dist/index.js +0 -83
- package/src/package/head/dist/index.mjs +0 -49
- package/src/package/heading/dist/index.d.mts +0 -43
- package/src/package/heading/dist/index.d.ts +0 -43
- package/src/package/heading/dist/index.js +0 -113
- package/src/package/heading/dist/index.mjs +0 -79
- package/src/package/hr/dist/index.d.mts +0 -6
- package/src/package/hr/dist/index.d.ts +0 -6
- package/src/package/hr/dist/index.js +0 -89
- package/src/package/hr/dist/index.mjs +0 -55
- package/src/package/html/dist/index.d.mts +0 -6
- package/src/package/html/dist/index.d.ts +0 -6
- package/src/package/html/dist/index.js +0 -79
- package/src/package/html/dist/index.mjs +0 -45
- package/src/package/img/dist/index.d.mts +0 -6
- package/src/package/img/dist/index.d.ts +0 -6
- package/src/package/img/dist/index.js +0 -94
- package/src/package/img/dist/index.mjs +0 -60
- package/src/package/link/dist/index.d.mts +0 -6
- package/src/package/link/dist/index.d.ts +0 -6
- package/src/package/link/dist/index.js +0 -90
- package/src/package/link/dist/index.mjs +0 -56
- package/src/package/markdown/dist/index.d.mts +0 -15
- package/src/package/markdown/dist/index.d.ts +0 -15
- package/src/package/markdown/dist/index.js +0 -92
- package/src/package/markdown/dist/index.mjs +0 -58
- package/src/package/preview/dist/index.d.mts +0 -12
- package/src/package/preview/dist/index.d.ts +0 -12
- package/src/package/preview/dist/index.js +0 -108
- package/src/package/preview/dist/index.mjs +0 -73
- package/src/package/render/dist/browser/index.d.mts +0 -24
- package/src/package/render/dist/browser/index.d.ts +0 -24
- package/src/package/render/dist/browser/index.js +0 -250
- package/src/package/render/dist/browser/index.mjs +0 -214
- package/src/package/render/dist/index.d.mts +0 -23
- package/src/package/render/dist/index.d.ts +0 -23
- package/src/package/render/dist/index.js +0 -768
- package/src/package/render/dist/index.mjs +0 -733
- package/src/package/render/dist/node/index.d.mts +0 -27
- package/src/package/render/dist/node/index.d.ts +0 -27
- package/src/package/render/dist/node/index.js +0 -212
- package/src/package/render/dist/node/index.mjs +0 -176
- package/src/package/row/dist/index.d.mts +0 -10
- package/src/package/row/dist/index.d.ts +0 -10
- package/src/package/row/dist/index.js +0 -93
- package/src/package/row/dist/index.mjs +0 -59
- package/src/package/section/dist/index.d.mts +0 -6
- package/src/package/section/dist/index.d.ts +0 -6
- package/src/package/section/dist/index.js +0 -93
- package/src/package/section/dist/index.mjs +0 -59
- package/src/package/tailwind/dist/index.d.ts +0 -19
- package/src/package/tailwind/dist/index.js +0 -48
- package/src/package/tailwind/dist/index.mjs +0 -17167
- package/src/package/tailwind/dist/tailwindcss/config.d.ts +0 -376
- package/src/package/tailwind/dist/tailwindcss/generated/.gitkeep +0 -0
- package/src/package/tailwind/dist/tailwindcss/generated/colors.d.ts +0 -298
- package/src/package/tailwind/dist/tailwindcss/generated/corePluginList.d.ts +0 -1
- package/src/package/tailwind/dist/tailwindcss/generated/default-theme.d.ts +0 -397
- package/src/package/tailwind/dist/tailwindcss/index.d.ts +0 -11
- package/src/package/text/dist/index.d.mts +0 -6
- package/src/package/text/dist/index.d.ts +0 -6
- package/src/package/text/dist/index.js +0 -89
- package/src/package/text/dist/index.mjs +0 -55
- /package/dist/preview/.next/static/{6K68y2QEZ1dLbv-Xhi30p → Trk1e7GzgKOLunAXBDCy-}/_buildManifest.js +0 -0
- /package/dist/preview/.next/static/{6K68y2QEZ1dLbv-Xhi30p → Trk1e7GzgKOLunAXBDCy-}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// File: /home/gabriel/Projects/
|
|
1
|
+
// File: /home/gabriel/Projects/Resend/react-email.git/tertiary/packages/react-email/src/app/layout.tsx
|
|
2
2
|
import * as entry from '../../../src/app/layout.js'
|
|
3
3
|
import type { ResolvingMetadata, ResolvingViewport } from 'next/dist/lib/metadata/types/metadata-interface.js'
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// File: /home/gabriel/Projects/
|
|
1
|
+
// File: /home/gabriel/Projects/Resend/react-email.git/tertiary/packages/react-email/src/app/preview/[...slug]/page.tsx
|
|
2
2
|
import * as entry from '../../../../../src/app/preview/[...slug]/page.js'
|
|
3
3
|
import type { ResolvingMetadata, ResolvingViewport } from 'next/dist/lib/metadata/types/metadata-interface.js'
|
|
4
4
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use server';
|
|
2
|
+
|
|
3
|
+
import type { EmailsDirectory } from '../utils/get-emails-directory-metadata';
|
|
4
|
+
import { getEmailsDirectoryMetadata } from '../utils/get-emails-directory-metadata';
|
|
5
|
+
|
|
6
|
+
export const getEmailsDirectoryMetadataAction = async (
|
|
7
|
+
absolutePathToEmailsDirectory: string,
|
|
8
|
+
keepFileExtensions = false,
|
|
9
|
+
isSubDirectory = false,
|
|
10
|
+
|
|
11
|
+
baseDirectoryPath = absolutePathToEmailsDirectory,
|
|
12
|
+
): Promise<EmailsDirectory | undefined> => {
|
|
13
|
+
return getEmailsDirectoryMetadata(
|
|
14
|
+
absolutePathToEmailsDirectory,
|
|
15
|
+
keepFileExtensions,
|
|
16
|
+
isSubDirectory,
|
|
17
|
+
baseDirectoryPath,
|
|
18
|
+
);
|
|
19
|
+
};
|
package/src/app/layout.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Metadata } from 'next';
|
|
2
2
|
import './globals.css';
|
|
3
|
-
import { getEmailsDirectoryMetadata } from '../actions/get-emails-directory-metadata';
|
|
4
3
|
import { emailsDirectoryAbsolutePath } from '../utils/emails-directory-absolute-path';
|
|
5
4
|
import { EmailsProvider } from '../contexts/emails';
|
|
5
|
+
import { getEmailsDirectoryMetadata } from '../utils/get-emails-directory-metadata';
|
|
6
6
|
import { inter } from './inter';
|
|
7
7
|
|
|
8
8
|
export const metadata: Metadata = {
|
|
@@ -2,10 +2,10 @@ import path from 'node:path';
|
|
|
2
2
|
import { Suspense } from 'react';
|
|
3
3
|
import { redirect } from 'next/navigation';
|
|
4
4
|
import { getEmailPathFromSlug } from '../../../actions/get-email-path-from-slug';
|
|
5
|
-
import { getEmailsDirectoryMetadata } from '../../../actions/get-emails-directory-metadata';
|
|
6
5
|
import { renderEmailByPath } from '../../../actions/render-email-by-path';
|
|
7
6
|
import { emailsDirectoryAbsolutePath } from '../../../utils/emails-directory-absolute-path';
|
|
8
7
|
import Home from '../../page';
|
|
8
|
+
import { getEmailsDirectoryMetadata } from '../../../utils/get-emails-directory-metadata';
|
|
9
9
|
import Preview from './preview';
|
|
10
10
|
|
|
11
11
|
export const dynamicParams = true;
|
|
@@ -2,7 +2,7 @@ import { AnimatePresence, LayoutGroup, motion } from 'framer-motion';
|
|
|
2
2
|
import * as Collapsible from '@radix-ui/react-collapsible';
|
|
3
3
|
import Link from 'next/link';
|
|
4
4
|
import { useSearchParams } from 'next/navigation';
|
|
5
|
-
import type { EmailsDirectory } from '../../
|
|
5
|
+
import type { EmailsDirectory } from '../../utils/get-emails-directory-metadata';
|
|
6
6
|
import { emailsDirectoryAbsolutePath } from '../../utils/emails-directory-absolute-path';
|
|
7
7
|
import { cn } from '../../utils';
|
|
8
8
|
import { IconFile } from '../icons/icon-file';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import * as Collapsible from '@radix-ui/react-collapsible';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { cn } from '../../utils';
|
|
5
|
-
import { type EmailsDirectory } from '../../
|
|
5
|
+
import { type EmailsDirectory } from '../../utils/get-emails-directory-metadata';
|
|
6
6
|
import { Heading } from '../heading';
|
|
7
7
|
import { IconFolder } from '../icons/icon-folder';
|
|
8
8
|
import { IconFolderOpen } from '../icons/icon-folder-open';
|
package/src/contexts/emails.tsx
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { createContext, useContext, useState } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
getEmailsDirectoryMetadata,
|
|
5
|
-
type EmailsDirectory,
|
|
6
|
-
} from '../actions/get-emails-directory-metadata';
|
|
3
|
+
import { getEmailsDirectoryMetadataAction } from '../actions/get-emails-directory-metadata-action';
|
|
7
4
|
import { useHotreload } from '../hooks/use-hot-reload';
|
|
5
|
+
import type { EmailsDirectory } from '../utils/get-emails-directory-metadata';
|
|
8
6
|
|
|
9
7
|
const EmailsContext = createContext<
|
|
10
8
|
| {
|
|
@@ -37,7 +35,7 @@ export const EmailsProvider = (props: {
|
|
|
37
35
|
// the rules of hooks
|
|
38
36
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
39
37
|
useHotreload(async () => {
|
|
40
|
-
const metadata = await
|
|
38
|
+
const metadata = await getEmailsDirectoryMetadataAction(
|
|
41
39
|
props.initialEmailsDirectoryMetadata.absolutePath,
|
|
42
40
|
);
|
|
43
41
|
if (metadata) {
|
|
@@ -4,7 +4,7 @@ import { getEmailsDirectoryMetadata } from './get-emails-directory-metadata';
|
|
|
4
4
|
test('getEmailsDirectoryMetadata on demo emails', async () => {
|
|
5
5
|
const emailsDirectoryPath = path.resolve(
|
|
6
6
|
__dirname,
|
|
7
|
-
'../../../../apps/demo/emails
|
|
7
|
+
'../../../../apps/demo/emails',
|
|
8
8
|
);
|
|
9
9
|
expect(await getEmailsDirectoryMetadata(emailsDirectoryPath)).toEqual({
|
|
10
10
|
absolutePath: emailsDirectoryPath,
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
|
|
5
|
+
const isFileAnEmail = (fullPath: string): boolean => {
|
|
6
|
+
const stat = fs.statSync(fullPath);
|
|
7
|
+
|
|
8
|
+
if (stat.isDirectory()) return false;
|
|
9
|
+
|
|
10
|
+
const { ext } = path.parse(fullPath);
|
|
11
|
+
|
|
12
|
+
if (!['.js', '.tsx', '.jsx'].includes(ext)) return false;
|
|
13
|
+
|
|
14
|
+
// This is to avoid a possible race condition where the file doesn't exist anymore
|
|
15
|
+
// once we are checking if it is an actual email, this couuld cause issues that
|
|
16
|
+
// would be very hard to debug and find out the why of it happening.
|
|
17
|
+
if (!fs.existsSync(fullPath)) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// check with a heuristic to see if the file has at least
|
|
22
|
+
// a default export
|
|
23
|
+
const fileContents = fs.readFileSync(fullPath, 'utf8');
|
|
24
|
+
|
|
25
|
+
return /\bexport\s+default\b/gm.test(fileContents);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export interface EmailsDirectory {
|
|
29
|
+
absolutePath: string;
|
|
30
|
+
relativePath: string;
|
|
31
|
+
directoryName: string;
|
|
32
|
+
emailFilenames: string[];
|
|
33
|
+
subDirectories: EmailsDirectory[];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const mergeDirectoriesWithSubDirectories = (
|
|
37
|
+
emailsDirectoryMetadata: EmailsDirectory,
|
|
38
|
+
): EmailsDirectory => {
|
|
39
|
+
let currentResultingMergedDirectory: EmailsDirectory =
|
|
40
|
+
emailsDirectoryMetadata;
|
|
41
|
+
|
|
42
|
+
while (
|
|
43
|
+
currentResultingMergedDirectory.emailFilenames.length === 0 &&
|
|
44
|
+
currentResultingMergedDirectory.subDirectories.length === 1
|
|
45
|
+
) {
|
|
46
|
+
const onlySubDirectory = currentResultingMergedDirectory.subDirectories[0]!;
|
|
47
|
+
currentResultingMergedDirectory = {
|
|
48
|
+
...onlySubDirectory,
|
|
49
|
+
directoryName: path.join(
|
|
50
|
+
currentResultingMergedDirectory.directoryName,
|
|
51
|
+
onlySubDirectory.directoryName,
|
|
52
|
+
),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return currentResultingMergedDirectory;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const getEmailsDirectoryMetadata = async (
|
|
60
|
+
absolutePathToEmailsDirectory: string,
|
|
61
|
+
keepFileExtensions = false,
|
|
62
|
+
isSubDirectory = false,
|
|
63
|
+
|
|
64
|
+
baseDirectoryPath = absolutePathToEmailsDirectory,
|
|
65
|
+
): Promise<EmailsDirectory | undefined> => {
|
|
66
|
+
if (!fs.existsSync(absolutePathToEmailsDirectory)) return;
|
|
67
|
+
|
|
68
|
+
const dirents = await fs.promises.readdir(absolutePathToEmailsDirectory, {
|
|
69
|
+
withFileTypes: true,
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
const emailFilenames = dirents
|
|
73
|
+
.filter((dirent) =>
|
|
74
|
+
isFileAnEmail(path.join(absolutePathToEmailsDirectory, dirent.name)),
|
|
75
|
+
)
|
|
76
|
+
.map((dirent) =>
|
|
77
|
+
keepFileExtensions
|
|
78
|
+
? dirent.name
|
|
79
|
+
: dirent.name.replace(path.extname(dirent.name), ''),
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
const subDirectories = await Promise.all(
|
|
83
|
+
dirents
|
|
84
|
+
.filter(
|
|
85
|
+
(dirent) =>
|
|
86
|
+
dirent.isDirectory() &&
|
|
87
|
+
!dirent.name.startsWith('_') &&
|
|
88
|
+
dirent.name !== 'static',
|
|
89
|
+
)
|
|
90
|
+
.map((dirent) => {
|
|
91
|
+
const direntAbsolutePath = path.join(
|
|
92
|
+
absolutePathToEmailsDirectory,
|
|
93
|
+
dirent.name,
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
return getEmailsDirectoryMetadata(
|
|
97
|
+
direntAbsolutePath,
|
|
98
|
+
keepFileExtensions,
|
|
99
|
+
true,
|
|
100
|
+
baseDirectoryPath,
|
|
101
|
+
) as Promise<EmailsDirectory>;
|
|
102
|
+
}),
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
const emailsMetadata = {
|
|
106
|
+
absolutePath: absolutePathToEmailsDirectory,
|
|
107
|
+
relativePath: path.relative(
|
|
108
|
+
baseDirectoryPath,
|
|
109
|
+
absolutePathToEmailsDirectory,
|
|
110
|
+
),
|
|
111
|
+
directoryName: absolutePathToEmailsDirectory.split(path.sep).pop()!,
|
|
112
|
+
emailFilenames,
|
|
113
|
+
subDirectories,
|
|
114
|
+
} satisfies EmailsDirectory;
|
|
115
|
+
|
|
116
|
+
return isSubDirectory
|
|
117
|
+
? mergeDirectoriesWithSubDirectories(emailsMetadata)
|
|
118
|
+
: emailsMetadata;
|
|
119
|
+
};
|
package/dist/index.d.mts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export * from '@react-email/body';
|
|
2
|
-
export * from '@react-email/button';
|
|
3
|
-
export * from '@react-email/code-block';
|
|
4
|
-
export * from '@react-email/code-inline';
|
|
5
|
-
export * from '@react-email/column';
|
|
6
|
-
export * from '@react-email/container';
|
|
7
|
-
export * from '@react-email/font';
|
|
8
|
-
export * from '@react-email/head';
|
|
9
|
-
export * from '@react-email/heading';
|
|
10
|
-
export * from '@react-email/hr';
|
|
11
|
-
export * from '@react-email/html';
|
|
12
|
-
export * from '@react-email/img';
|
|
13
|
-
export * from '@react-email/link';
|
|
14
|
-
export * from '@react-email/markdown';
|
|
15
|
-
export * from '@react-email/preview';
|
|
16
|
-
export * from '@react-email/render';
|
|
17
|
-
export * from '@react-email/row';
|
|
18
|
-
export * from '@react-email/section';
|
|
19
|
-
export * from '@react-email/tailwind';
|
|
20
|
-
export * from '@react-email/text';
|
package/dist/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export * from '@react-email/body';
|
|
2
|
-
export * from '@react-email/button';
|
|
3
|
-
export * from '@react-email/code-block';
|
|
4
|
-
export * from '@react-email/code-inline';
|
|
5
|
-
export * from '@react-email/column';
|
|
6
|
-
export * from '@react-email/container';
|
|
7
|
-
export * from '@react-email/font';
|
|
8
|
-
export * from '@react-email/head';
|
|
9
|
-
export * from '@react-email/heading';
|
|
10
|
-
export * from '@react-email/hr';
|
|
11
|
-
export * from '@react-email/html';
|
|
12
|
-
export * from '@react-email/img';
|
|
13
|
-
export * from '@react-email/link';
|
|
14
|
-
export * from '@react-email/markdown';
|
|
15
|
-
export * from '@react-email/preview';
|
|
16
|
-
export * from '@react-email/render';
|
|
17
|
-
export * from '@react-email/row';
|
|
18
|
-
export * from '@react-email/section';
|
|
19
|
-
export * from '@react-email/tailwind';
|
|
20
|
-
export * from '@react-email/text';
|
package/dist/index.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
function _define_property(obj, key, value) {
|
|
2
|
-
if (key in obj) {
|
|
3
|
-
Object.defineProperty(obj, key, {
|
|
4
|
-
value: value,
|
|
5
|
-
enumerable: true,
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true
|
|
8
|
-
});
|
|
9
|
-
} else {
|
|
10
|
-
obj[key] = value;
|
|
11
|
-
}
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
14
|
-
function _object_spread(target) {
|
|
15
|
-
for(var i = 1; i < arguments.length; i++){
|
|
16
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
17
|
-
var ownKeys = Object.keys(source);
|
|
18
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
19
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
20
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
ownKeys.forEach(function(key) {
|
|
24
|
-
_define_property(target, key, source[key]);
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
return target;
|
|
28
|
-
}
|
|
29
|
-
var __defProp = Object.defineProperty;
|
|
30
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
31
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
32
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
33
|
-
var __copyProps = function(to, from, except, desc) {
|
|
34
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
35
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
36
|
-
try {
|
|
37
|
-
var _loop = function() {
|
|
38
|
-
var key = _step.value;
|
|
39
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
40
|
-
get: function() {
|
|
41
|
-
return from[key];
|
|
42
|
-
},
|
|
43
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
|
|
47
|
-
} catch (err) {
|
|
48
|
-
_didIteratorError = true;
|
|
49
|
-
_iteratorError = err;
|
|
50
|
-
} finally{
|
|
51
|
-
try {
|
|
52
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
53
|
-
_iterator.return();
|
|
54
|
-
}
|
|
55
|
-
} finally{
|
|
56
|
-
if (_didIteratorError) {
|
|
57
|
-
throw _iteratorError;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return to;
|
|
63
|
-
};
|
|
64
|
-
var __reExport = function(target, mod, secondTarget) {
|
|
65
|
-
return __copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default");
|
|
66
|
-
};
|
|
67
|
-
var __toCommonJS = function(mod) {
|
|
68
|
-
return __copyProps(__defProp({}, "__esModule", {
|
|
69
|
-
value: true
|
|
70
|
-
}), mod);
|
|
71
|
-
};
|
|
72
|
-
// src/package/index.ts
|
|
73
|
-
var package_exports = {};
|
|
74
|
-
module.exports = __toCommonJS(package_exports);
|
|
75
|
-
__reExport(package_exports, require("@react-email/body"), module.exports);
|
|
76
|
-
__reExport(package_exports, require("@react-email/button"), module.exports);
|
|
77
|
-
__reExport(package_exports, require("@react-email/code-block"), module.exports);
|
|
78
|
-
__reExport(package_exports, require("@react-email/code-inline"), module.exports);
|
|
79
|
-
__reExport(package_exports, require("@react-email/column"), module.exports);
|
|
80
|
-
__reExport(package_exports, require("@react-email/container"), module.exports);
|
|
81
|
-
__reExport(package_exports, require("@react-email/font"), module.exports);
|
|
82
|
-
__reExport(package_exports, require("@react-email/head"), module.exports);
|
|
83
|
-
__reExport(package_exports, require("@react-email/heading"), module.exports);
|
|
84
|
-
__reExport(package_exports, require("@react-email/hr"), module.exports);
|
|
85
|
-
__reExport(package_exports, require("@react-email/html"), module.exports);
|
|
86
|
-
__reExport(package_exports, require("@react-email/img"), module.exports);
|
|
87
|
-
__reExport(package_exports, require("@react-email/link"), module.exports);
|
|
88
|
-
__reExport(package_exports, require("@react-email/markdown"), module.exports);
|
|
89
|
-
__reExport(package_exports, require("@react-email/preview"), module.exports);
|
|
90
|
-
__reExport(package_exports, require("@react-email/render"), module.exports);
|
|
91
|
-
__reExport(package_exports, require("@react-email/row"), module.exports);
|
|
92
|
-
__reExport(package_exports, require("@react-email/section"), module.exports);
|
|
93
|
-
__reExport(package_exports, require("@react-email/tailwind"), module.exports);
|
|
94
|
-
__reExport(package_exports, require("@react-email/text"), module.exports);
|
|
95
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
96
|
-
0 && (module.exports = _object_spread({}, require("@react-email/body"), require("@react-email/button"), require("@react-email/code-block"), require("@react-email/code-inline"), require("@react-email/column"), require("@react-email/container"), require("@react-email/font"), require("@react-email/head"), require("@react-email/heading"), require("@react-email/hr"), require("@react-email/html"), require("@react-email/img"), require("@react-email/link"), require("@react-email/markdown"), require("@react-email/preview"), require("@react-email/render"), require("@react-email/row"), require("@react-email/section"), require("@react-email/tailwind"), require("@react-email/text")));
|
package/dist/index.mjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// src/package/index.ts
|
|
2
|
-
export * from "@react-email/body";
|
|
3
|
-
export * from "@react-email/button";
|
|
4
|
-
export * from "@react-email/code-block";
|
|
5
|
-
export * from "@react-email/code-inline";
|
|
6
|
-
export * from "@react-email/column";
|
|
7
|
-
export * from "@react-email/container";
|
|
8
|
-
export * from "@react-email/font";
|
|
9
|
-
export * from "@react-email/head";
|
|
10
|
-
export * from "@react-email/heading";
|
|
11
|
-
export * from "@react-email/hr";
|
|
12
|
-
export * from "@react-email/html";
|
|
13
|
-
export * from "@react-email/img";
|
|
14
|
-
export * from "@react-email/link";
|
|
15
|
-
export * from "@react-email/markdown";
|
|
16
|
-
export * from "@react-email/preview";
|
|
17
|
-
export * from "@react-email/render";
|
|
18
|
-
export * from "@react-email/row";
|
|
19
|
-
export * from "@react-email/section";
|
|
20
|
-
export * from "@react-email/tailwind";
|
|
21
|
-
export * from "@react-email/text";
|
package/dist/package/index.d.mts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
type Control<ValueType> = {
|
|
2
|
-
type: 'number';
|
|
3
|
-
defaultValue: ValueType;
|
|
4
|
-
} | {
|
|
5
|
-
type: 'email' | 'text';
|
|
6
|
-
defaultValue: string;
|
|
7
|
-
} | {
|
|
8
|
-
type: 'checkbox';
|
|
9
|
-
defaultValue: boolean;
|
|
10
|
-
} | {
|
|
11
|
-
type: 'select';
|
|
12
|
-
options: {
|
|
13
|
-
name: string;
|
|
14
|
-
value: ValueType;
|
|
15
|
-
}[];
|
|
16
|
-
defaultValue: ValueType;
|
|
17
|
-
};
|
|
18
|
-
type SafeControl<ValueType> = ValueType extends string ? Control<ValueType> & {
|
|
19
|
-
type: 'email' | 'text' | 'select';
|
|
20
|
-
} : ValueType extends number ? Control<ValueType> & {
|
|
21
|
-
type: 'number';
|
|
22
|
-
} : ValueType extends boolean ? Control<ValueType> & {
|
|
23
|
-
type: 'checkbox';
|
|
24
|
-
} : Control<ValueType>;
|
|
25
|
-
type Controls<Props extends object = Record<string, unknown>> = {
|
|
26
|
-
[K in keyof Props]?: SafeControl<Props[K]>;
|
|
27
|
-
};
|
|
28
|
-
declare const setupForPreview: <Props extends object>(component: {
|
|
29
|
-
(props: Props): React.ReactNode;
|
|
30
|
-
controls?: Controls<Props> | undefined;
|
|
31
|
-
}, controls: Controls<Props>) => void;
|
|
32
|
-
|
|
33
|
-
export { Control, Controls, setupForPreview };
|
package/dist/package/index.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
type Control<ValueType> = {
|
|
2
|
-
type: 'number';
|
|
3
|
-
defaultValue: ValueType;
|
|
4
|
-
} | {
|
|
5
|
-
type: 'email' | 'text';
|
|
6
|
-
defaultValue: string;
|
|
7
|
-
} | {
|
|
8
|
-
type: 'checkbox';
|
|
9
|
-
defaultValue: boolean;
|
|
10
|
-
} | {
|
|
11
|
-
type: 'select';
|
|
12
|
-
options: {
|
|
13
|
-
name: string;
|
|
14
|
-
value: ValueType;
|
|
15
|
-
}[];
|
|
16
|
-
defaultValue: ValueType;
|
|
17
|
-
};
|
|
18
|
-
type SafeControl<ValueType> = ValueType extends string ? Control<ValueType> & {
|
|
19
|
-
type: 'email' | 'text' | 'select';
|
|
20
|
-
} : ValueType extends number ? Control<ValueType> & {
|
|
21
|
-
type: 'number';
|
|
22
|
-
} : ValueType extends boolean ? Control<ValueType> & {
|
|
23
|
-
type: 'checkbox';
|
|
24
|
-
} : Control<ValueType>;
|
|
25
|
-
type Controls<Props extends object = Record<string, unknown>> = {
|
|
26
|
-
[K in keyof Props]?: SafeControl<Props[K]>;
|
|
27
|
-
};
|
|
28
|
-
declare const setupForPreview: <Props extends object>(component: {
|
|
29
|
-
(props: Props): React.ReactNode;
|
|
30
|
-
controls?: Controls<Props> | undefined;
|
|
31
|
-
}, controls: Controls<Props>) => void;
|
|
32
|
-
|
|
33
|
-
export { Control, Controls, setupForPreview };
|
package/dist/package/index.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = function(target, all) {
|
|
6
|
-
for(var name in all)__defProp(target, name, {
|
|
7
|
-
get: all[name],
|
|
8
|
-
enumerable: true
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = function(to, from, except, desc) {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
14
|
-
try {
|
|
15
|
-
var _loop = function() {
|
|
16
|
-
var key = _step.value;
|
|
17
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
18
|
-
get: function() {
|
|
19
|
-
return from[key];
|
|
20
|
-
},
|
|
21
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
|
|
25
|
-
} catch (err) {
|
|
26
|
-
_didIteratorError = true;
|
|
27
|
-
_iteratorError = err;
|
|
28
|
-
} finally{
|
|
29
|
-
try {
|
|
30
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
31
|
-
_iterator.return();
|
|
32
|
-
}
|
|
33
|
-
} finally{
|
|
34
|
-
if (_didIteratorError) {
|
|
35
|
-
throw _iteratorError;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return to;
|
|
41
|
-
};
|
|
42
|
-
var __toCommonJS = function(mod) {
|
|
43
|
-
return __copyProps(__defProp({}, "__esModule", {
|
|
44
|
-
value: true
|
|
45
|
-
}), mod);
|
|
46
|
-
};
|
|
47
|
-
// src/package/index.ts
|
|
48
|
-
var package_exports = {};
|
|
49
|
-
__export(package_exports, {
|
|
50
|
-
setupForPreview: function() {
|
|
51
|
-
return setupForPreview;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
module.exports = __toCommonJS(package_exports);
|
|
55
|
-
// src/package/setup-for-preview.ts
|
|
56
|
-
var setupForPreview = function(component, controls) {
|
|
57
|
-
component.controls = controls;
|
|
58
|
-
};
|
|
59
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
60
|
-
0 && (module.exports = {
|
|
61
|
-
setupForPreview: setupForPreview
|
|
62
|
-
});
|