@usewaypoint/email-builder 0.0.2

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 (31) hide show
  1. package/LICENSE +19 -0
  2. package/README.md +1 -0
  3. package/dist/Reader/core.d.ts +1834 -0
  4. package/dist/Reader/core.d.ts.map +1 -0
  5. package/dist/Reader/core.js +80 -0
  6. package/dist/Reader/core.js.map +1 -0
  7. package/dist/blocks/ColumnsContainer/ColumnsContainerPropsSchema.d.ts +136 -0
  8. package/dist/blocks/ColumnsContainer/ColumnsContainerPropsSchema.d.ts.map +1 -0
  9. package/dist/blocks/ColumnsContainer/ColumnsContainerPropsSchema.js +16 -0
  10. package/dist/blocks/ColumnsContainer/ColumnsContainerPropsSchema.js.map +1 -0
  11. package/dist/blocks/ColumnsContainer/ColumnsContainerReader.d.ts +4 -0
  12. package/dist/blocks/ColumnsContainer/ColumnsContainerReader.d.ts.map +1 -0
  13. package/dist/blocks/ColumnsContainer/ColumnsContainerReader.js +23 -0
  14. package/dist/blocks/ColumnsContainer/ColumnsContainerReader.js.map +1 -0
  15. package/dist/blocks/Container/ContainerPropsSchema.d.ts +83 -0
  16. package/dist/blocks/Container/ContainerPropsSchema.d.ts.map +1 -0
  17. package/dist/blocks/Container/ContainerPropsSchema.js +12 -0
  18. package/dist/blocks/Container/ContainerPropsSchema.js.map +1 -0
  19. package/dist/blocks/Container/ContainerReader.d.ts +4 -0
  20. package/dist/blocks/Container/ContainerReader.d.ts.map +1 -0
  21. package/dist/blocks/Container/ContainerReader.js +9 -0
  22. package/dist/blocks/Container/ContainerReader.js.map +1 -0
  23. package/dist/blocks/EmailLayout/EmailLayoutPropsSchema.d.ts +22 -0
  24. package/dist/blocks/EmailLayout/EmailLayoutPropsSchema.d.ts.map +1 -0
  25. package/dist/blocks/EmailLayout/EmailLayoutPropsSchema.js +28 -0
  26. package/dist/blocks/EmailLayout/EmailLayoutPropsSchema.js.map +1 -0
  27. package/dist/blocks/EmailLayout/EmailLayoutReader.d.ts +4 -0
  28. package/dist/blocks/EmailLayout/EmailLayoutReader.d.ts.map +1 -0
  29. package/dist/blocks/EmailLayout/EmailLayoutReader.js +51 -0
  30. package/dist/blocks/EmailLayout/EmailLayoutReader.js.map +1 -0
  31. package/package.json +33 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/Reader/core.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA6ExB,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAA0C,CAAC;AAI5E,MAAM,MAAM,iBAAiB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAC/C,wBAAgB,WAAW,CAAC,EAAE,EAAE,EAAE,EAAE,iBAAiB,qBAGpD;AACD,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC;AAChF,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC;IAC5D,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AACF,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,YAAY,qBAMrE"}
@@ -0,0 +1,80 @@
1
+ import React, { createContext, useContext } from 'react';
2
+ import { z } from 'zod';
3
+ import { Avatar, AvatarPropsSchema } from '@usewaypoint/block-avatar';
4
+ import { Button, ButtonPropsSchema } from '@usewaypoint/block-button';
5
+ import { Divider, DividerPropsSchema } from '@usewaypoint/block-divider';
6
+ import { Heading, HeadingPropsSchema } from '@usewaypoint/block-heading';
7
+ import { Html, HtmlPropsSchema } from '@usewaypoint/block-html';
8
+ import { Image, ImagePropsSchema } from '@usewaypoint/block-image';
9
+ import { Spacer, SpacerPropsSchema } from '@usewaypoint/block-spacer';
10
+ import { Text, TextPropsSchema } from '@usewaypoint/block-text';
11
+ import { buildBlockComponent, buildBlockConfigurationDictionary, buildBlockConfigurationSchema, } from '@usewaypoint/document-core';
12
+ import ColumnsContainerPropsSchema from '../blocks/ColumnsContainer/ColumnsContainerPropsSchema';
13
+ import ColumnsContainerReader from '../blocks/ColumnsContainer/ColumnsContainerReader';
14
+ import { ContainerPropsSchema } from '../blocks/Container/ContainerPropsSchema';
15
+ import ContainerReader from '../blocks/Container/ContainerReader';
16
+ import { EmailLayoutPropsSchema } from '../blocks/EmailLayout/EmailLayoutPropsSchema';
17
+ import EmailLayoutReader from '../blocks/EmailLayout/EmailLayoutReader';
18
+ const ReaderContext = createContext({});
19
+ function useReaderDocument() {
20
+ return useContext(ReaderContext);
21
+ }
22
+ const READER_DICTIONARY = buildBlockConfigurationDictionary({
23
+ ColumnsContainer: {
24
+ schema: ColumnsContainerPropsSchema,
25
+ Component: ColumnsContainerReader,
26
+ },
27
+ Container: {
28
+ schema: ContainerPropsSchema,
29
+ Component: ContainerReader,
30
+ },
31
+ EmailLayout: {
32
+ schema: EmailLayoutPropsSchema,
33
+ Component: EmailLayoutReader,
34
+ },
35
+ //
36
+ Avatar: {
37
+ schema: AvatarPropsSchema,
38
+ Component: Avatar,
39
+ },
40
+ Button: {
41
+ schema: ButtonPropsSchema,
42
+ Component: Button,
43
+ },
44
+ Divider: {
45
+ schema: DividerPropsSchema,
46
+ Component: Divider,
47
+ },
48
+ Heading: {
49
+ schema: HeadingPropsSchema,
50
+ Component: Heading,
51
+ },
52
+ Html: {
53
+ schema: HtmlPropsSchema,
54
+ Component: Html,
55
+ },
56
+ Image: {
57
+ schema: ImagePropsSchema,
58
+ Component: Image,
59
+ },
60
+ Spacer: {
61
+ schema: SpacerPropsSchema,
62
+ Component: Spacer,
63
+ },
64
+ Text: {
65
+ schema: TextPropsSchema,
66
+ Component: Text,
67
+ },
68
+ });
69
+ const ReaderBlockSchema = buildBlockConfigurationSchema(READER_DICTIONARY);
70
+ export const ReaderDocumentSchema = z.record(z.string(), ReaderBlockSchema);
71
+ const BaseReaderBlock = buildBlockComponent(READER_DICTIONARY);
72
+ export function ReaderBlock({ id }) {
73
+ const document = useReaderDocument();
74
+ return React.createElement(BaseReaderBlock, Object.assign({}, document[id]));
75
+ }
76
+ export default function Reader({ document, rootBlockId }) {
77
+ return (React.createElement(ReaderContext.Provider, { value: document },
78
+ React.createElement(ReaderBlock, { id: rootBlockId })));
79
+ }
80
+ //# sourceMappingURL=core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../../src/Reader/core.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EACL,mBAAmB,EACnB,iCAAiC,EACjC,6BAA6B,GAC9B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,2BAA2B,MAAM,wDAAwD,CAAC;AACjG,OAAO,sBAAsB,MAAM,mDAAmD,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,eAAe,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,iBAAiB,MAAM,yCAAyC,CAAC;AAExE,MAAM,aAAa,GAA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AM,UAAU,WAAW,CAAC,EAAE,EAAE,EAAqB;IACnD,MAAM,QAAQ,GAAG,iBAAiB,EAAE,CAAC;IACrC,OAAO,oBAAC,eAAe,oBAAK,QAAQ,CAAC,EAAE,CAAC,EAAI,CAAC;AAC/C,CAAC;AAMD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAgB;IACpE,OAAO,CACL,oBAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ;QACrC,oBAAC,WAAW,IAAC,EAAE,EAAE,WAAW,GAAI,CACT,CAC1B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,136 @@
1
+ import { z } from 'zod';
2
+ declare const ColumnsContainerPropsSchema: z.ZodObject<{
3
+ style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
4
+ backgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
+ padding: z.ZodNullable<z.ZodOptional<z.ZodObject<{
6
+ top: z.ZodNumber;
7
+ bottom: z.ZodNumber;
8
+ right: z.ZodNumber;
9
+ left: z.ZodNumber;
10
+ }, "strip", z.ZodTypeAny, {
11
+ top: number;
12
+ bottom: number;
13
+ right: number;
14
+ left: number;
15
+ }, {
16
+ top: number;
17
+ bottom: number;
18
+ right: number;
19
+ left: number;
20
+ }>>>;
21
+ }, "strip", z.ZodTypeAny, {
22
+ backgroundColor?: string | null | undefined;
23
+ padding?: {
24
+ top: number;
25
+ bottom: number;
26
+ right: number;
27
+ left: number;
28
+ } | null | undefined;
29
+ }, {
30
+ backgroundColor?: string | null | undefined;
31
+ padding?: {
32
+ top: number;
33
+ bottom: number;
34
+ right: number;
35
+ left: number;
36
+ } | null | undefined;
37
+ }>>>;
38
+ props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
39
+ columns: z.ZodTuple<[z.ZodObject<{
40
+ childrenIds: z.ZodArray<z.ZodString, "many">;
41
+ }, "strip", z.ZodTypeAny, {
42
+ childrenIds: string[];
43
+ }, {
44
+ childrenIds: string[];
45
+ }>, z.ZodObject<{
46
+ childrenIds: z.ZodArray<z.ZodString, "many">;
47
+ }, "strip", z.ZodTypeAny, {
48
+ childrenIds: string[];
49
+ }, {
50
+ childrenIds: string[];
51
+ }>, z.ZodObject<{
52
+ childrenIds: z.ZodArray<z.ZodString, "many">;
53
+ }, "strip", z.ZodTypeAny, {
54
+ childrenIds: string[];
55
+ }, {
56
+ childrenIds: string[];
57
+ }>], null>;
58
+ fixedWidths: z.ZodNullable<z.ZodOptional<z.ZodTuple<[z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodOptional<z.ZodNullable<z.ZodNumber>>], null>>>;
59
+ columnsCount: z.ZodNullable<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<2>, z.ZodLiteral<3>]>>>;
60
+ columnsGap: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
61
+ contentAlignment: z.ZodNullable<z.ZodOptional<z.ZodEnum<["top", "middle", "bottom"]>>>;
62
+ }, "strip", z.ZodTypeAny, {
63
+ columns: [{
64
+ childrenIds: string[];
65
+ }, {
66
+ childrenIds: string[];
67
+ }, {
68
+ childrenIds: string[];
69
+ }];
70
+ fixedWidths?: [number | null | undefined, number | null | undefined, number | null | undefined] | null | undefined;
71
+ columnsCount?: 2 | 3 | null | undefined;
72
+ columnsGap?: number | null | undefined;
73
+ contentAlignment?: "top" | "middle" | "bottom" | null | undefined;
74
+ }, {
75
+ columns: [{
76
+ childrenIds: string[];
77
+ }, {
78
+ childrenIds: string[];
79
+ }, {
80
+ childrenIds: string[];
81
+ }];
82
+ fixedWidths?: [number | null | undefined, number | null | undefined, number | null | undefined] | null | undefined;
83
+ columnsCount?: 2 | 3 | null | undefined;
84
+ columnsGap?: number | null | undefined;
85
+ contentAlignment?: "top" | "middle" | "bottom" | null | undefined;
86
+ }>>>;
87
+ }, "strip", z.ZodTypeAny, {
88
+ style?: {
89
+ backgroundColor?: string | null | undefined;
90
+ padding?: {
91
+ top: number;
92
+ bottom: number;
93
+ right: number;
94
+ left: number;
95
+ } | null | undefined;
96
+ } | null | undefined;
97
+ props?: {
98
+ columns: [{
99
+ childrenIds: string[];
100
+ }, {
101
+ childrenIds: string[];
102
+ }, {
103
+ childrenIds: string[];
104
+ }];
105
+ fixedWidths?: [number | null | undefined, number | null | undefined, number | null | undefined] | null | undefined;
106
+ columnsCount?: 2 | 3 | null | undefined;
107
+ columnsGap?: number | null | undefined;
108
+ contentAlignment?: "top" | "middle" | "bottom" | null | undefined;
109
+ } | null | undefined;
110
+ }, {
111
+ style?: {
112
+ backgroundColor?: string | null | undefined;
113
+ padding?: {
114
+ top: number;
115
+ bottom: number;
116
+ right: number;
117
+ left: number;
118
+ } | null | undefined;
119
+ } | null | undefined;
120
+ props?: {
121
+ columns: [{
122
+ childrenIds: string[];
123
+ }, {
124
+ childrenIds: string[];
125
+ }, {
126
+ childrenIds: string[];
127
+ }];
128
+ fixedWidths?: [number | null | undefined, number | null | undefined, number | null | undefined] | null | undefined;
129
+ columnsCount?: 2 | 3 | null | undefined;
130
+ columnsGap?: number | null | undefined;
131
+ contentAlignment?: "top" | "middle" | "bottom" | null | undefined;
132
+ } | null | undefined;
133
+ }>;
134
+ export default ColumnsContainerPropsSchema;
135
+ export type ColumnsContainerProps = z.infer<typeof ColumnsContainerPropsSchema>;
136
+ //# sourceMappingURL=ColumnsContainerPropsSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColumnsContainerPropsSchema.d.ts","sourceRoot":"","sources":["../../../src/blocks/ColumnsContainer/ColumnsContainerPropsSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa/B,CAAC;AAEH,eAAe,2BAA2B,CAAC;AAC3C,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ import { ColumnsContainerPropsSchema as BaseColumnsContainerPropsSchema } from '@usewaypoint/block-columns-container';
3
+ const BasePropsShape = BaseColumnsContainerPropsSchema.shape.props.unwrap().unwrap().shape;
4
+ const ColumnsContainerPropsSchema = z.object({
5
+ style: BaseColumnsContainerPropsSchema.shape.style,
6
+ props: z
7
+ .object(Object.assign(Object.assign({}, BasePropsShape), { columns: z.tuple([
8
+ z.object({ childrenIds: z.array(z.string()) }),
9
+ z.object({ childrenIds: z.array(z.string()) }),
10
+ z.object({ childrenIds: z.array(z.string()) }),
11
+ ]) }))
12
+ .optional()
13
+ .nullable(),
14
+ });
15
+ export default ColumnsContainerPropsSchema;
16
+ //# sourceMappingURL=ColumnsContainerPropsSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColumnsContainerPropsSchema.js","sourceRoot":"","sources":["../../../src/blocks/ColumnsContainer/ColumnsContainerPropsSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,2BAA2B,IAAI,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAEtH,MAAM,cAAc,GAAG,+BAA+B,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC;AAE3F,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,+BAA+B,CAAC,KAAK,CAAC,KAAK;IAClD,KAAK,EAAE,CAAC;SACL,MAAM,iCACF,cAAc,KACjB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC;YACf,CAAC,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC;YAC9C,CAAC,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC;YAC9C,CAAC,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC;SAC/C,CAAC,IACF;SACD,QAAQ,EAAE;SACV,QAAQ,EAAE;CACd,CAAC,CAAC;AAEH,eAAe,2BAA2B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ColumnsContainerProps } from './ColumnsContainerPropsSchema';
3
+ export default function ColumnsContainerReader({ style, props }: ColumnsContainerProps): React.JSX.Element;
4
+ //# sourceMappingURL=ColumnsContainerReader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColumnsContainerReader.d.ts","sourceRoot":"","sources":["../../../src/blocks/ColumnsContainer/ColumnsContainerReader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,qBAAqB,qBAQrF"}
@@ -0,0 +1,23 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import React from 'react';
13
+ import { ColumnsContainer as BaseColumnsContainer } from '@usewaypoint/block-columns-container';
14
+ import { ReaderBlock } from '../../Reader/core';
15
+ export default function ColumnsContainerReader({ style, props }) {
16
+ const _a = props !== null && props !== void 0 ? props : {}, { columns } = _a, restProps = __rest(_a, ["columns"]);
17
+ let cols = undefined;
18
+ if (columns) {
19
+ cols = columns.map((col) => col.childrenIds.map((childId) => React.createElement(ReaderBlock, { key: childId, id: childId })));
20
+ }
21
+ return React.createElement(BaseColumnsContainer, { props: restProps, columns: cols, style: style });
22
+ }
23
+ //# sourceMappingURL=ColumnsContainerReader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColumnsContainerReader.js","sourceRoot":"","sources":["../../../src/blocks/ColumnsContainer/ColumnsContainerReader.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,gBAAgB,IAAI,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAEhG,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAyB;IACpF,MAAM,KAA4B,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,EAAvC,EAAE,OAAO,OAA8B,EAAzB,SAAS,cAAvB,WAAyB,CAAc,CAAC;IAC9C,IAAI,IAAI,GAAG,SAAS,CAAC;IACrB,IAAI,OAAO,EAAE,CAAC;QACZ,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,oBAAC,WAAW,IAAC,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,GAAI,CAAC,CAAC,CAAC;IAC5G,CAAC;IAED,OAAO,oBAAC,oBAAoB,IAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,GAAI,CAAC;AACjF,CAAC"}
@@ -0,0 +1,83 @@
1
+ import { z } from 'zod';
2
+ export declare const ContainerPropsSchema: z.ZodObject<{
3
+ style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
4
+ backgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
+ borderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
+ borderRadius: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
7
+ padding: z.ZodNullable<z.ZodOptional<z.ZodObject<{
8
+ top: z.ZodNumber;
9
+ bottom: z.ZodNumber;
10
+ right: z.ZodNumber;
11
+ left: z.ZodNumber;
12
+ }, "strip", z.ZodTypeAny, {
13
+ top: number;
14
+ bottom: number;
15
+ right: number;
16
+ left: number;
17
+ }, {
18
+ top: number;
19
+ bottom: number;
20
+ right: number;
21
+ left: number;
22
+ }>>>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ backgroundColor?: string | null | undefined;
25
+ borderColor?: string | null | undefined;
26
+ borderRadius?: number | null | undefined;
27
+ padding?: {
28
+ top: number;
29
+ bottom: number;
30
+ right: number;
31
+ left: number;
32
+ } | null | undefined;
33
+ }, {
34
+ backgroundColor?: string | null | undefined;
35
+ borderColor?: string | null | undefined;
36
+ borderRadius?: number | null | undefined;
37
+ padding?: {
38
+ top: number;
39
+ bottom: number;
40
+ right: number;
41
+ left: number;
42
+ } | null | undefined;
43
+ }>>>;
44
+ props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
45
+ childrenIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
46
+ }, "strip", z.ZodTypeAny, {
47
+ childrenIds?: string[] | null | undefined;
48
+ }, {
49
+ childrenIds?: string[] | null | undefined;
50
+ }>>>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ style?: {
53
+ backgroundColor?: string | null | undefined;
54
+ borderColor?: string | null | undefined;
55
+ borderRadius?: number | null | undefined;
56
+ padding?: {
57
+ top: number;
58
+ bottom: number;
59
+ right: number;
60
+ left: number;
61
+ } | null | undefined;
62
+ } | null | undefined;
63
+ props?: {
64
+ childrenIds?: string[] | null | undefined;
65
+ } | null | undefined;
66
+ }, {
67
+ style?: {
68
+ backgroundColor?: string | null | undefined;
69
+ borderColor?: string | null | undefined;
70
+ borderRadius?: number | null | undefined;
71
+ padding?: {
72
+ top: number;
73
+ bottom: number;
74
+ right: number;
75
+ left: number;
76
+ } | null | undefined;
77
+ } | null | undefined;
78
+ props?: {
79
+ childrenIds?: string[] | null | undefined;
80
+ } | null | undefined;
81
+ }>;
82
+ export type ContainerProps = z.infer<typeof ContainerPropsSchema>;
83
+ //# sourceMappingURL=ContainerPropsSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContainerPropsSchema.d.ts","sourceRoot":"","sources":["../../../src/blocks/Container/ContainerPropsSchema.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ import { ContainerPropsSchema as BaseContainerPropsSchema } from '@usewaypoint/block-container';
3
+ export const ContainerPropsSchema = z.object({
4
+ style: BaseContainerPropsSchema.shape.style,
5
+ props: z
6
+ .object({
7
+ childrenIds: z.array(z.string()).optional().nullable(),
8
+ })
9
+ .optional()
10
+ .nullable(),
11
+ });
12
+ //# sourceMappingURL=ContainerPropsSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContainerPropsSchema.js","sourceRoot":"","sources":["../../../src/blocks/Container/ContainerPropsSchema.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oBAAoB,IAAI,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAEhG,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,wBAAwB,CAAC,KAAK,CAAC,KAAK;IAC3C,KAAK,EAAE,CAAC;SACL,MAAM,CAAC;QACN,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;KACvD,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,EAAE;CACd,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ContainerProps } from './ContainerPropsSchema';
3
+ export default function ContainerReader({ style, props }: ContainerProps): React.JSX.Element;
4
+ //# sourceMappingURL=ContainerReader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContainerReader.d.ts","sourceRoot":"","sources":["../../../src/blocks/Container/ContainerReader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,cAAc,qBASvE"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { Container as BaseContainer } from '@usewaypoint/block-container';
3
+ import { ReaderBlock } from '../../Reader/core';
4
+ export default function ContainerReader({ style, props }) {
5
+ var _a;
6
+ const childrenIds = (_a = props === null || props === void 0 ? void 0 : props.childrenIds) !== null && _a !== void 0 ? _a : [];
7
+ return (React.createElement(BaseContainer, { style: style }, childrenIds.map((childId) => (React.createElement(ReaderBlock, { key: childId, id: childId })))));
8
+ }
9
+ //# sourceMappingURL=ContainerReader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContainerReader.js","sourceRoot":"","sources":["../../../src/blocks/Container/ContainerReader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAE,KAAK,EAAE,KAAK,EAAkB;;IACtE,MAAM,WAAW,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,mCAAI,EAAE,CAAC;IAC7C,OAAO,CACL,oBAAC,aAAa,IAAC,KAAK,EAAE,KAAK,IACxB,WAAW,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAC5B,oBAAC,WAAW,IAAC,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,GAAI,CAC3C,CAAC,CACY,CACjB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { z } from 'zod';
2
+ export declare const EmailLayoutPropsSchema: z.ZodObject<{
3
+ backdropColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4
+ canvasColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
+ textColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
+ fontFamily: z.ZodOptional<z.ZodNullable<z.ZodEnum<["MODERN_SANS", "BOOK_SANS", "ORGANIC_SANS", "GEOMETRIC_SANS", "HEAVY_SANS", "ROUNDED_SANS", "MODERN_SERIF", "BOOK_SERIF", "MONOSPACE"]>>>;
7
+ childrenIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ backdropColor?: string | null | undefined;
10
+ canvasColor?: string | null | undefined;
11
+ textColor?: string | null | undefined;
12
+ fontFamily?: "MODERN_SANS" | "BOOK_SANS" | "ORGANIC_SANS" | "GEOMETRIC_SANS" | "HEAVY_SANS" | "ROUNDED_SANS" | "MODERN_SERIF" | "BOOK_SERIF" | "MONOSPACE" | null | undefined;
13
+ childrenIds?: string[] | null | undefined;
14
+ }, {
15
+ backdropColor?: string | null | undefined;
16
+ canvasColor?: string | null | undefined;
17
+ textColor?: string | null | undefined;
18
+ fontFamily?: "MODERN_SANS" | "BOOK_SANS" | "ORGANIC_SANS" | "GEOMETRIC_SANS" | "HEAVY_SANS" | "ROUNDED_SANS" | "MODERN_SERIF" | "BOOK_SERIF" | "MONOSPACE" | null | undefined;
19
+ childrenIds?: string[] | null | undefined;
20
+ }>;
21
+ export type EmailLayoutProps = z.infer<typeof EmailLayoutPropsSchema>;
22
+ //# sourceMappingURL=EmailLayoutPropsSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmailLayoutPropsSchema.d.ts","sourceRoot":"","sources":["../../../src/blocks/EmailLayout/EmailLayoutPropsSchema.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAuBxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;EAMjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { z } from 'zod';
2
+ const COLOR_SCHEMA = z
3
+ .string()
4
+ .regex(/^#[0-9a-fA-F]{6}$/)
5
+ .nullable()
6
+ .optional();
7
+ const FONT_FAMILY_SCHEMA = z
8
+ .enum([
9
+ 'MODERN_SANS',
10
+ 'BOOK_SANS',
11
+ 'ORGANIC_SANS',
12
+ 'GEOMETRIC_SANS',
13
+ 'HEAVY_SANS',
14
+ 'ROUNDED_SANS',
15
+ 'MODERN_SERIF',
16
+ 'BOOK_SERIF',
17
+ 'MONOSPACE',
18
+ ])
19
+ .nullable()
20
+ .optional();
21
+ export const EmailLayoutPropsSchema = z.object({
22
+ backdropColor: COLOR_SCHEMA,
23
+ canvasColor: COLOR_SCHEMA,
24
+ textColor: COLOR_SCHEMA,
25
+ fontFamily: FONT_FAMILY_SCHEMA,
26
+ childrenIds: z.array(z.string()).optional().nullable(),
27
+ });
28
+ //# sourceMappingURL=EmailLayoutPropsSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmailLayoutPropsSchema.js","sourceRoot":"","sources":["../../../src/blocks/EmailLayout/EmailLayoutPropsSchema.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,YAAY,GAAG,CAAC;KACnB,MAAM,EAAE;KACR,KAAK,CAAC,mBAAmB,CAAC;KAC1B,QAAQ,EAAE;KACV,QAAQ,EAAE,CAAC;AAEd,MAAM,kBAAkB,GAAG,CAAC;KACzB,IAAI,CAAC;IACJ,aAAa;IACb,WAAW;IACX,cAAc;IACd,gBAAgB;IAChB,YAAY;IACZ,cAAc;IACd,cAAc;IACd,YAAY;IACZ,WAAW;CACZ,CAAC;KACD,QAAQ,EAAE;KACV,QAAQ,EAAE,CAAC;AAEd,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,aAAa,EAAE,YAAY;IAC3B,WAAW,EAAE,YAAY;IACzB,SAAS,EAAE,YAAY;IACvB,UAAU,EAAE,kBAAkB;IAC9B,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACvD,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { EmailLayoutProps } from './EmailLayoutPropsSchema';
3
+ export default function EmailLayoutReader(props: EmailLayoutProps): React.JSX.Element;
4
+ //# sourceMappingURL=EmailLayoutReader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmailLayoutReader.d.ts","sourceRoot":"","sources":["../../../src/blocks/EmailLayout/EmailLayoutReader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AA0B5D,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,qBA2ChE"}
@@ -0,0 +1,51 @@
1
+ import React from 'react';
2
+ import { ReaderBlock } from '../../Reader/core';
3
+ function getFontFamily(fontFamily) {
4
+ const f = fontFamily !== null && fontFamily !== void 0 ? fontFamily : 'MODERN_SANS';
5
+ switch (f) {
6
+ case 'MODERN_SANS':
7
+ return '"Helvetica Neue", "Arial Nova", "Nimbus Sans", Arial, sans-serif';
8
+ case 'BOOK_SANS':
9
+ return 'Optima, Candara, "Noto Sans", source-sans-pro, sans-serif';
10
+ case 'ORGANIC_SANS':
11
+ return 'Seravek, "Gill Sans Nova", Ubuntu, Calibri, "DejaVu Sans", source-sans-pro, sans-serif';
12
+ case 'GEOMETRIC_SANS':
13
+ return 'Avenir, "Avenir Next LT Pro", Montserrat, Corbel, "URW Gothic", source-sans-pro, sans-serif';
14
+ case 'HEAVY_SANS':
15
+ return 'Bahnschrift, "DIN Alternate", "Franklin Gothic Medium", "Nimbus Sans Narrow", sans-serif-condensed, sans-serif';
16
+ case 'ROUNDED_SANS':
17
+ return 'ui-rounded, "Hiragino Maru Gothic ProN", Quicksand, Comfortaa, Manjari, "Arial Rounded MT Bold", Calibri, source-sans-pro, sans-serif';
18
+ case 'MODERN_SERIF':
19
+ return 'Charter, "Bitstream Charter", "Sitka Text", Cambria, serif';
20
+ case 'BOOK_SERIF':
21
+ return '"Iowan Old Style", "Palatino Linotype", "URW Palladio L", P052, serif';
22
+ case 'MONOSPACE':
23
+ return '"Nimbus Mono PS", "Courier New", "Cutive Mono", monospace';
24
+ }
25
+ }
26
+ export default function EmailLayoutReader(props) {
27
+ var _a, _b, _c, _d;
28
+ const childrenIds = (_a = props.childrenIds) !== null && _a !== void 0 ? _a : [];
29
+ return (React.createElement("div", { style: {
30
+ backgroundColor: (_b = props.backdropColor) !== null && _b !== void 0 ? _b : '#EEEEEE',
31
+ color: (_c = props.textColor) !== null && _c !== void 0 ? _c : '#242424',
32
+ fontFamily: getFontFamily(props.fontFamily),
33
+ fontSize: '16px',
34
+ fontWeight: '400',
35
+ letterSpacing: '0.15008px',
36
+ lineHeight: '1.5',
37
+ margin: '0',
38
+ padding: '32px 0',
39
+ minHeight: '100%',
40
+ width: '100%',
41
+ } },
42
+ React.createElement("table", { align: "center", width: "100%", style: {
43
+ margin: '0 auto',
44
+ maxWidth: '600px',
45
+ backgroundColor: (_d = props.canvasColor) !== null && _d !== void 0 ? _d : '#FFFFFF',
46
+ }, role: "presentation", cellSpacing: "0", cellPadding: "0", border: 0 },
47
+ React.createElement("tbody", null,
48
+ React.createElement("tr", { style: { width: '100%' } },
49
+ React.createElement("td", null, childrenIds.map((childId) => (React.createElement(ReaderBlock, { key: childId, id: childId })))))))));
50
+ }
51
+ //# sourceMappingURL=EmailLayoutReader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmailLayoutReader.js","sourceRoot":"","sources":["../../../src/blocks/EmailLayout/EmailLayoutReader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,SAAS,aAAa,CAAC,UAA0C;IAC/D,MAAM,CAAC,GAAG,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,aAAa,CAAC;IACtC,QAAQ,CAAC,EAAE,CAAC;QACV,KAAK,aAAa;YAChB,OAAO,kEAAkE,CAAC;QAC5E,KAAK,WAAW;YACd,OAAO,2DAA2D,CAAC;QACrE,KAAK,cAAc;YACjB,OAAO,wFAAwF,CAAC;QAClG,KAAK,gBAAgB;YACnB,OAAO,6FAA6F,CAAC;QACvG,KAAK,YAAY;YACf,OAAO,gHAAgH,CAAC;QAC1H,KA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CACP,CAAC;AACJ,CAAC"}
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@usewaypoint/email-builder",
3
+ "version": "0.0.2",
4
+ "description": "React component to render email messages",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "target": "ES2022",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "build": "npx tsc"
13
+ },
14
+ "author": "carlos@usewaypoint.com",
15
+ "license": "MIT",
16
+ "peerDependencies": {
17
+ "react": "^16 || ^17 || ^18",
18
+ "zod": "^1 || ^2 || ^3"
19
+ },
20
+ "dependencies": {
21
+ "@usewaypoint/block-avatar": "^0.0.1",
22
+ "@usewaypoint/block-button": "^0.0.2",
23
+ "@usewaypoint/block-columns-container": "^0.0.2",
24
+ "@usewaypoint/block-container": "^0.0.1",
25
+ "@usewaypoint/block-divider": "^0.0.3",
26
+ "@usewaypoint/block-heading": "^0.0.2",
27
+ "@usewaypoint/block-html": "^0.0.2",
28
+ "@usewaypoint/block-image": "^0.0.4",
29
+ "@usewaypoint/block-spacer": "^0.0.2",
30
+ "@usewaypoint/block-text": "^0.0.2",
31
+ "@usewaypoint/document-core": "^0.0.4"
32
+ }
33
+ }