@rudyzeinoun/email-builder 0.0.16 → 0.0.18
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/dist/index.d.mts +18 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +8 -5
- package/dist/index.mjs +8 -5
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -39,6 +39,9 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
|
|
|
39
39
|
left: number;
|
|
40
40
|
} | null | undefined;
|
|
41
41
|
}>>>;
|
|
42
|
+
className: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
43
|
+
loopStart: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
44
|
+
loopEnd: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
42
45
|
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
43
46
|
columns: z.ZodTuple<[z.ZodObject<{
|
|
44
47
|
childrenIds: z.ZodArray<z.ZodString, "many">;
|
|
@@ -98,6 +101,9 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
|
|
|
98
101
|
left: number;
|
|
99
102
|
} | null | undefined;
|
|
100
103
|
} | null | undefined;
|
|
104
|
+
className?: string | null | undefined;
|
|
105
|
+
loopStart?: number | null | undefined;
|
|
106
|
+
loopEnd?: number | null | undefined;
|
|
101
107
|
props?: {
|
|
102
108
|
columns: [{
|
|
103
109
|
childrenIds: string[];
|
|
@@ -121,6 +127,9 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
|
|
|
121
127
|
left: number;
|
|
122
128
|
} | null | undefined;
|
|
123
129
|
} | null | undefined;
|
|
130
|
+
className?: string | null | undefined;
|
|
131
|
+
loopStart?: number | null | undefined;
|
|
132
|
+
loopEnd?: number | null | undefined;
|
|
124
133
|
props?: {
|
|
125
134
|
columns: [{
|
|
126
135
|
childrenIds: string[];
|
|
@@ -970,6 +979,9 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
|
|
|
970
979
|
left: number;
|
|
971
980
|
} | null | undefined;
|
|
972
981
|
}>>>;
|
|
982
|
+
className: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
983
|
+
loopStart: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
984
|
+
loopEnd: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
973
985
|
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
974
986
|
columns: z.ZodTuple<[z.ZodObject<{
|
|
975
987
|
childrenIds: z.ZodArray<z.ZodString, "many">;
|
|
@@ -1029,6 +1041,9 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
|
|
|
1029
1041
|
left: number;
|
|
1030
1042
|
} | null | undefined;
|
|
1031
1043
|
} | null | undefined;
|
|
1044
|
+
className?: string | null | undefined;
|
|
1045
|
+
loopStart?: number | null | undefined;
|
|
1046
|
+
loopEnd?: number | null | undefined;
|
|
1032
1047
|
props?: {
|
|
1033
1048
|
columns: [{
|
|
1034
1049
|
childrenIds: string[];
|
|
@@ -1052,6 +1067,9 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
|
|
|
1052
1067
|
left: number;
|
|
1053
1068
|
} | null | undefined;
|
|
1054
1069
|
} | null | undefined;
|
|
1070
|
+
className?: string | null | undefined;
|
|
1071
|
+
loopStart?: number | null | undefined;
|
|
1072
|
+
loopEnd?: number | null | undefined;
|
|
1055
1073
|
props?: {
|
|
1056
1074
|
columns: [{
|
|
1057
1075
|
childrenIds: string[];
|
package/dist/index.d.ts
CHANGED
|
@@ -39,6 +39,9 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
|
|
|
39
39
|
left: number;
|
|
40
40
|
} | null | undefined;
|
|
41
41
|
}>>>;
|
|
42
|
+
className: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
43
|
+
loopStart: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
44
|
+
loopEnd: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
42
45
|
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
43
46
|
columns: z.ZodTuple<[z.ZodObject<{
|
|
44
47
|
childrenIds: z.ZodArray<z.ZodString, "many">;
|
|
@@ -98,6 +101,9 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
|
|
|
98
101
|
left: number;
|
|
99
102
|
} | null | undefined;
|
|
100
103
|
} | null | undefined;
|
|
104
|
+
className?: string | null | undefined;
|
|
105
|
+
loopStart?: number | null | undefined;
|
|
106
|
+
loopEnd?: number | null | undefined;
|
|
101
107
|
props?: {
|
|
102
108
|
columns: [{
|
|
103
109
|
childrenIds: string[];
|
|
@@ -121,6 +127,9 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
|
|
|
121
127
|
left: number;
|
|
122
128
|
} | null | undefined;
|
|
123
129
|
} | null | undefined;
|
|
130
|
+
className?: string | null | undefined;
|
|
131
|
+
loopStart?: number | null | undefined;
|
|
132
|
+
loopEnd?: number | null | undefined;
|
|
124
133
|
props?: {
|
|
125
134
|
columns: [{
|
|
126
135
|
childrenIds: string[];
|
|
@@ -970,6 +979,9 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
|
|
|
970
979
|
left: number;
|
|
971
980
|
} | null | undefined;
|
|
972
981
|
}>>>;
|
|
982
|
+
className: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
983
|
+
loopStart: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
984
|
+
loopEnd: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
973
985
|
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
974
986
|
columns: z.ZodTuple<[z.ZodObject<{
|
|
975
987
|
childrenIds: z.ZodArray<z.ZodString, "many">;
|
|
@@ -1029,6 +1041,9 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
|
|
|
1029
1041
|
left: number;
|
|
1030
1042
|
} | null | undefined;
|
|
1031
1043
|
} | null | undefined;
|
|
1044
|
+
className?: string | null | undefined;
|
|
1045
|
+
loopStart?: number | null | undefined;
|
|
1046
|
+
loopEnd?: number | null | undefined;
|
|
1032
1047
|
props?: {
|
|
1033
1048
|
columns: [{
|
|
1034
1049
|
childrenIds: string[];
|
|
@@ -1052,6 +1067,9 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
|
|
|
1052
1067
|
left: number;
|
|
1053
1068
|
} | null | undefined;
|
|
1054
1069
|
} | null | undefined;
|
|
1070
|
+
className?: string | null | undefined;
|
|
1071
|
+
loopStart?: number | null | undefined;
|
|
1072
|
+
loopEnd?: number | null | undefined;
|
|
1055
1073
|
props?: {
|
|
1056
1074
|
columns: [{
|
|
1057
1075
|
childrenIds: string[];
|
package/dist/index.js
CHANGED
|
@@ -86,10 +86,13 @@ var import_document_core = require("@usewaypoint/document-core");
|
|
|
86
86
|
|
|
87
87
|
// src/blocks/ColumnsContainer/ColumnsContainerPropsSchema.ts
|
|
88
88
|
var import_zod = require("zod");
|
|
89
|
-
var import_block_columns_container = require("@
|
|
89
|
+
var import_block_columns_container = require("@rudyzeinoun/block-columns-container");
|
|
90
90
|
var BasePropsShape = import_block_columns_container.ColumnsContainerPropsSchema.shape.props.unwrap().unwrap().shape;
|
|
91
91
|
var ColumnsContainerPropsSchema = import_zod.z.object({
|
|
92
92
|
style: import_block_columns_container.ColumnsContainerPropsSchema.shape.style,
|
|
93
|
+
className: import_zod.z.string().optional().nullable(),
|
|
94
|
+
loopStart: import_zod.z.number().optional().nullable(),
|
|
95
|
+
loopEnd: import_zod.z.number().optional().nullable(),
|
|
93
96
|
props: import_zod.z.object(__spreadProps(__spreadValues({}, BasePropsShape), {
|
|
94
97
|
columns: import_zod.z.tuple([
|
|
95
98
|
import_zod.z.object({ childrenIds: import_zod.z.array(import_zod.z.string()) }),
|
|
@@ -102,14 +105,14 @@ var ColumnsContainerPropsSchema_default = ColumnsContainerPropsSchema;
|
|
|
102
105
|
|
|
103
106
|
// src/blocks/ColumnsContainer/ColumnsContainerReader.tsx
|
|
104
107
|
var import_react = __toESM(require("react"));
|
|
105
|
-
var import_block_columns_container2 = require("@
|
|
106
|
-
function ColumnsContainerReader({ style, props }) {
|
|
108
|
+
var import_block_columns_container2 = require("@rudyzeinoun/block-columns-container");
|
|
109
|
+
function ColumnsContainerReader({ style, props, className, loopStart, loopEnd }) {
|
|
107
110
|
const _a = props != null ? props : {}, { columns } = _a, restProps = __objRest(_a, ["columns"]);
|
|
108
111
|
let cols = void 0;
|
|
109
112
|
if (columns) {
|
|
110
113
|
cols = columns.map((col) => col.childrenIds.map((childId) => /* @__PURE__ */ import_react.default.createElement(ReaderBlock, { key: childId, id: childId })));
|
|
111
114
|
}
|
|
112
|
-
return /* @__PURE__ */ import_react.default.createElement(import_block_columns_container2.ColumnsContainer, { props: restProps, columns: cols, style });
|
|
115
|
+
return /* @__PURE__ */ import_react.default.createElement(import_block_columns_container2.ColumnsContainer, { props: restProps, columns: cols, style, className, loopStart, loopEnd });
|
|
113
116
|
}
|
|
114
117
|
|
|
115
118
|
// src/blocks/Container/ContainerPropsSchema.tsx
|
|
@@ -131,7 +134,7 @@ var import_block_container2 = require("@rudyzeinoun/block-container");
|
|
|
131
134
|
function ContainerReader({ style, props, className, loopStart, loopEnd }) {
|
|
132
135
|
var _a;
|
|
133
136
|
const childrenIds = (_a = props == null ? void 0 : props.childrenIds) != null ? _a : [];
|
|
134
|
-
return /* @__PURE__ */ import_react2.default.createElement(import_block_container2.Container, { className,
|
|
137
|
+
return /* @__PURE__ */ import_react2.default.createElement(import_block_container2.Container, { className, loopStart, loopEnd, style }, childrenIds.map((childId) => /* @__PURE__ */ import_react2.default.createElement(ReaderBlock, { key: childId, id: childId })));
|
|
135
138
|
}
|
|
136
139
|
|
|
137
140
|
// src/blocks/EmailLayout/EmailLayoutPropsSchema.tsx
|
package/dist/index.mjs
CHANGED
|
@@ -53,10 +53,13 @@ import {
|
|
|
53
53
|
|
|
54
54
|
// src/blocks/ColumnsContainer/ColumnsContainerPropsSchema.ts
|
|
55
55
|
import { z } from "zod";
|
|
56
|
-
import { ColumnsContainerPropsSchema as BaseColumnsContainerPropsSchema } from "@
|
|
56
|
+
import { ColumnsContainerPropsSchema as BaseColumnsContainerPropsSchema } from "@rudyzeinoun/block-columns-container";
|
|
57
57
|
var BasePropsShape = BaseColumnsContainerPropsSchema.shape.props.unwrap().unwrap().shape;
|
|
58
58
|
var ColumnsContainerPropsSchema = z.object({
|
|
59
59
|
style: BaseColumnsContainerPropsSchema.shape.style,
|
|
60
|
+
className: z.string().optional().nullable(),
|
|
61
|
+
loopStart: z.number().optional().nullable(),
|
|
62
|
+
loopEnd: z.number().optional().nullable(),
|
|
60
63
|
props: z.object(__spreadProps(__spreadValues({}, BasePropsShape), {
|
|
61
64
|
columns: z.tuple([
|
|
62
65
|
z.object({ childrenIds: z.array(z.string()) }),
|
|
@@ -69,14 +72,14 @@ var ColumnsContainerPropsSchema_default = ColumnsContainerPropsSchema;
|
|
|
69
72
|
|
|
70
73
|
// src/blocks/ColumnsContainer/ColumnsContainerReader.tsx
|
|
71
74
|
import React from "react";
|
|
72
|
-
import { ColumnsContainer as BaseColumnsContainer } from "@
|
|
73
|
-
function ColumnsContainerReader({ style, props }) {
|
|
75
|
+
import { ColumnsContainer as BaseColumnsContainer } from "@rudyzeinoun/block-columns-container";
|
|
76
|
+
function ColumnsContainerReader({ style, props, className, loopStart, loopEnd }) {
|
|
74
77
|
const _a = props != null ? props : {}, { columns } = _a, restProps = __objRest(_a, ["columns"]);
|
|
75
78
|
let cols = void 0;
|
|
76
79
|
if (columns) {
|
|
77
80
|
cols = columns.map((col) => col.childrenIds.map((childId) => /* @__PURE__ */ React.createElement(ReaderBlock, { key: childId, id: childId })));
|
|
78
81
|
}
|
|
79
|
-
return /* @__PURE__ */ React.createElement(BaseColumnsContainer, { props: restProps, columns: cols, style });
|
|
82
|
+
return /* @__PURE__ */ React.createElement(BaseColumnsContainer, { props: restProps, columns: cols, style, className, loopStart, loopEnd });
|
|
80
83
|
}
|
|
81
84
|
|
|
82
85
|
// src/blocks/Container/ContainerPropsSchema.tsx
|
|
@@ -98,7 +101,7 @@ import { Container as BaseContainer } from "@rudyzeinoun/block-container";
|
|
|
98
101
|
function ContainerReader({ style, props, className, loopStart, loopEnd }) {
|
|
99
102
|
var _a;
|
|
100
103
|
const childrenIds = (_a = props == null ? void 0 : props.childrenIds) != null ? _a : [];
|
|
101
|
-
return /* @__PURE__ */ React2.createElement(BaseContainer, { className,
|
|
104
|
+
return /* @__PURE__ */ React2.createElement(BaseContainer, { className, loopStart, loopEnd, style }, childrenIds.map((childId) => /* @__PURE__ */ React2.createElement(ReaderBlock, { key: childId, id: childId })));
|
|
102
105
|
}
|
|
103
106
|
|
|
104
107
|
// src/blocks/EmailLayout/EmailLayoutPropsSchema.tsx
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rudyzeinoun/email-builder",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"description": "React component to render email messages",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "npx
|
|
19
|
+
"build": "npx tsup src/index.ts --format esm,cjs --dts --out-dir dist"
|
|
20
20
|
},
|
|
21
21
|
"author": "carlos@usewaypoint.com",
|
|
22
22
|
"license": "MIT",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@rudyzeinoun/block-container": "^0.0.8",
|
|
30
30
|
"@usewaypoint/block-avatar": "^0.0.3",
|
|
31
31
|
"@usewaypoint/block-button": "^0.0.3",
|
|
32
|
-
"@
|
|
32
|
+
"@rudyzeinoun/block-columns-container": "^0.0.4",
|
|
33
33
|
"@usewaypoint/block-divider": "^0.0.4",
|
|
34
34
|
"@usewaypoint/block-heading": "^0.0.3",
|
|
35
35
|
"@usewaypoint/block-html": "^0.0.3",
|