promote-email-templates 0.1.6 → 0.1.7

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.
Files changed (71) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +15 -14
  3. package/.react-email/.eslintrc.js +0 -52
  4. package/.react-email/.prettierignore +0 -3
  5. package/.react-email/.prettierrc.js +0 -8
  6. package/.react-email/license.md +0 -7
  7. package/.react-email/next.config.js +0 -36
  8. package/.react-email/package.json +0 -1
  9. package/.react-email/postcss.config.js +0 -8
  10. package/.react-email/readme.md +0 -44
  11. package/.react-email/src/actions/get-email-path-from-slug.ts +0 -26
  12. package/.react-email/src/actions/get-emails-directory-metadata.spec.ts +0 -73
  13. package/.react-email/src/actions/get-emails-directory-metadata.ts +0 -91
  14. package/.react-email/src/actions/render-email-by-path.tsx +0 -59
  15. package/.react-email/src/app/favicon.ico +0 -0
  16. package/.react-email/src/app/globals.css +0 -35
  17. package/.react-email/src/app/inter.ts +0 -7
  18. package/.react-email/src/app/layout.tsx +0 -36
  19. package/.react-email/src/app/logo.png +0 -0
  20. package/.react-email/src/app/page.tsx +0 -47
  21. package/.react-email/src/app/preview/[...slug]/page.tsx +0 -65
  22. package/.react-email/src/app/preview/[...slug]/preview.tsx +0 -141
  23. package/.react-email/src/app/preview/[...slug]/rendering-error.tsx +0 -40
  24. package/.react-email/src/components/button.tsx +0 -90
  25. package/.react-email/src/components/code-container.tsx +0 -145
  26. package/.react-email/src/components/code.tsx +0 -112
  27. package/.react-email/src/components/heading.tsx +0 -113
  28. package/.react-email/src/components/icons/icon-arrow-down.tsx +0 -16
  29. package/.react-email/src/components/icons/icon-base.tsx +0 -24
  30. package/.react-email/src/components/icons/icon-button.tsx +0 -23
  31. package/.react-email/src/components/icons/icon-check.tsx +0 -19
  32. package/.react-email/src/components/icons/icon-clipboard.tsx +0 -40
  33. package/.react-email/src/components/icons/icon-download.tsx +0 -19
  34. package/.react-email/src/components/icons/icon-file.tsx +0 -19
  35. package/.react-email/src/components/icons/icon-folder-open.tsx +0 -19
  36. package/.react-email/src/components/icons/icon-folder.tsx +0 -18
  37. package/.react-email/src/components/icons/icon-hide-sidebar.tsx +0 -23
  38. package/.react-email/src/components/icons/icon-monitor.tsx +0 -19
  39. package/.react-email/src/components/icons/icon-phone.tsx +0 -26
  40. package/.react-email/src/components/icons/icon-source.tsx +0 -19
  41. package/.react-email/src/components/index.ts +0 -7
  42. package/.react-email/src/components/logo.tsx +0 -64
  43. package/.react-email/src/components/send.tsx +0 -135
  44. package/.react-email/src/components/shell.tsx +0 -115
  45. package/.react-email/src/components/sidebar/index.ts +0 -1
  46. package/.react-email/src/components/sidebar/sidebar-directory-children.tsx +0 -134
  47. package/.react-email/src/components/sidebar/sidebar-directory.tsx +0 -106
  48. package/.react-email/src/components/sidebar/sidebar.tsx +0 -45
  49. package/.react-email/src/components/text.tsx +0 -99
  50. package/.react-email/src/components/tooltip-content.tsx +0 -32
  51. package/.react-email/src/components/tooltip.tsx +0 -19
  52. package/.react-email/src/components/topbar.tsx +0 -161
  53. package/.react-email/src/contexts/emails.tsx +0 -127
  54. package/.react-email/src/hooks/use-hot-reload.ts +0 -35
  55. package/.react-email/src/hooks/use-rendering-metadata.ts +0 -36
  56. package/.react-email/src/utils/cn.ts +0 -6
  57. package/.react-email/src/utils/constants.ts +0 -6
  58. package/.react-email/src/utils/copy-text-to-clipboard.ts +0 -7
  59. package/.react-email/src/utils/emails-directory-absolute-path.ts +0 -34
  60. package/.react-email/src/utils/get-email-component.ts +0 -108
  61. package/.react-email/src/utils/improve-error-with-sourcemap.ts +0 -55
  62. package/.react-email/src/utils/index.ts +0 -5
  63. package/.react-email/src/utils/language-map.ts +0 -7
  64. package/.react-email/src/utils/static-node-modules-for-vm.ts +0 -92
  65. package/.react-email/src/utils/types/as.ts +0 -26
  66. package/.react-email/src/utils/types/email-template.ts +0 -8
  67. package/.react-email/src/utils/types/error-object.ts +0 -11
  68. package/.react-email/src/utils/types/hot-reload-change.ts +0 -6
  69. package/.react-email/src/utils/types/hot-reload-event.ts +0 -6
  70. package/.react-email/src/utils/unreachable.ts +0 -8
  71. package/.react-email/tailwind.config.ts +0 -94
@@ -1,26 +0,0 @@
1
- export type As<
2
- DefaultTag extends React.ElementType,
3
- T1 extends React.ElementType,
4
- T2 extends React.ElementType = T1,
5
- T3 extends React.ElementType = T1,
6
- T4 extends React.ElementType = T1,
7
- T5 extends React.ElementType = T1,
8
- > =
9
- | (React.ComponentPropsWithRef<DefaultTag> & {
10
- as?: DefaultTag;
11
- })
12
- | (React.ComponentPropsWithRef<T1> & {
13
- as: T1;
14
- })
15
- | (React.ComponentPropsWithRef<T2> & {
16
- as: T2;
17
- })
18
- | (React.ComponentPropsWithRef<T3> & {
19
- as: T3;
20
- })
21
- | (React.ComponentPropsWithRef<T4> & {
22
- as: T4;
23
- })
24
- | (React.ComponentPropsWithRef<T5> & {
25
- as: T5;
26
- });
@@ -1,8 +0,0 @@
1
- export interface EmailTemplate {
2
- (props: Record<string, unknown> | Record<string, never>): React.ReactNode;
3
- PreviewProps?: Record<string, unknown>;
4
- }
5
-
6
- export const isEmailTemplate = (val: unknown): val is EmailTemplate => {
7
- return typeof val === 'function';
8
- };
@@ -1,11 +0,0 @@
1
- /**
2
- * An object that mimics the structure of the Error class,
3
- * we just can't use the Error class here because server actions can't
4
- * return classes
5
- */
6
- export interface ErrorObject {
7
- name: string;
8
- stack: string | undefined;
9
- cause: unknown;
10
- message: string;
11
- }
@@ -1,6 +0,0 @@
1
- import type { HotReloadEvent } from './hot-reload-event';
2
-
3
- export interface HotReloadChange {
4
- filename: string;
5
- event: HotReloadEvent;
6
- }
@@ -1,6 +0,0 @@
1
- export type HotReloadEvent =
2
- | 'add'
3
- | 'addDir'
4
- | 'change'
5
- | 'unlink'
6
- | 'unlinkDir';
@@ -1,8 +0,0 @@
1
- export const unreachable = (
2
- condition: string | Record<string, unknown>,
3
- message = `Entered unreachable code. Received '${
4
- typeof condition === 'string' ? condition : JSON.stringify(condition)
5
- }'.`,
6
- ): never => {
7
- throw new TypeError(message);
8
- };
@@ -1,94 +0,0 @@
1
- import type { Config } from 'tailwindcss';
2
- import colors = require('@radix-ui/colors');
3
- import { fontFamily } from 'tailwindcss/defaultTheme';
4
- import plugin from 'tailwindcss/plugin';
5
-
6
- const iOsHeight = plugin(({ addUtilities }) => {
7
- const supportsTouchRule = '@supports (-webkit-touch-callout: none)';
8
- const webkitFillAvailable = '-webkit-fill-available';
9
-
10
- const utilities = {
11
- '.min-h-screen-ios': {
12
- [supportsTouchRule]: {
13
- minHeight: webkitFillAvailable,
14
- },
15
- },
16
- '.h-screen-ios': {
17
- [supportsTouchRule]: {
18
- height: webkitFillAvailable,
19
- },
20
- },
21
- };
22
-
23
- // @ts-expect-error This works normally, not sure what this error is
24
- addUtilities(utilities, ['responsive']);
25
- });
26
-
27
- const config: Config = {
28
- content: {
29
- // needs to be relative because tailwind will find the content
30
- // by default based on the process's cwd
31
- relative: true,
32
- files: [
33
- './src/components/**/*.{js,ts,jsx,tsx,mdx}',
34
- './src/app/**/*.{js,ts,jsx,tsx,mdx}',
35
- ],
36
- },
37
- theme: {
38
- extend: {
39
- backgroundImage: {
40
- gradient:
41
- 'linear-gradient(145.37deg, rgba(255, 255, 255, 0.09) -8.75%, rgba(255, 255, 255, 0.027) 83.95%)',
42
- gradientHover:
43
- 'linear-gradient(145.37deg, rgba(255, 255, 255, 0.1) -8.75%, rgba(255, 255, 255, 0.057) 83.95%)',
44
- shine:
45
- 'linear-gradient(45deg, rgba(255,255,255,0) 45%,rgba(255,255,255,1) 50%,rgba(255,255,255,0) 55%,rgba(255,255,255,0) 100%)',
46
- },
47
- colors: {
48
- cyan: {
49
- 1: colors.cyanDarkA.cyanA1,
50
- 2: colors.cyanDarkA.cyanA2,
51
- 3: colors.cyanDarkA.cyanA3,
52
- 4: colors.cyanDarkA.cyanA4,
53
- 5: colors.cyanDarkA.cyanA5,
54
- 6: colors.cyanDarkA.cyanA6,
55
- 7: colors.cyanDarkA.cyanA7,
56
- 8: colors.cyanDarkA.cyanA8,
57
- 9: colors.cyanDarkA.cyanA9,
58
- 10: colors.cyanDarkA.cyanA10,
59
- 11: colors.cyanDarkA.cyanA11,
60
- 12: colors.cyanDarkA.cyanA12,
61
- },
62
- slate: {
63
- 1: colors.slateDarkA.slateA1,
64
- 2: colors.slateDarkA.slateA2,
65
- 3: colors.slateDarkA.slateA3,
66
- 4: colors.slateDarkA.slateA4,
67
- 5: colors.slateDarkA.slateA5,
68
- 6: colors.slateDarkA.slateA6,
69
- 7: colors.slateDarkA.slateA7,
70
- 8: colors.slateDarkA.slateA8,
71
- 9: colors.slateDarkA.slateA9,
72
- 10: colors.slateDarkA.slateA10,
73
- 11: colors.slateDarkA.slateA11,
74
- 12: colors.slateDarkA.slateA12,
75
- },
76
- },
77
- fontFamily: {
78
- sans: ['var(--font-inter)', ...fontFamily.sans],
79
- },
80
- keyframes: {
81
- shine: {
82
- '0%': { backgroundPosition: '-100%' },
83
- '100%': { backgroundPosition: '100%' },
84
- },
85
- dash: {
86
- '0%': { strokeDashoffset: '1000' },
87
- '100%': { strokeDashoffset: '0' },
88
- },
89
- },
90
- },
91
- },
92
- plugins: [iOsHeight],
93
- };
94
- export default config;