@maily-to/core 0.3.7 → 2.0.0-beta.10
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/LICENSE +21 -0
- package/dist/blocks/index.cjs +29 -305
- package/dist/blocks/index.d.cts +1 -59
- package/dist/blocks/index.d.mts +46 -0
- package/dist/blocks/index.d.mts.map +1 -0
- package/dist/blocks/index.mjs +2 -273
- package/dist/extensions/index.cjs +354 -9100
- package/dist/extensions/index.d.cts +1 -448
- package/dist/extensions/index.d.mts +282 -0
- package/dist/extensions/index.d.mts.map +1 -0
- package/dist/extensions/index.mjs +322 -9052
- package/dist/index.cjs +10225 -12221
- package/dist/index.d.cts +1 -63
- package/dist/index.d.mts +743 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +10103 -12273
- package/dist/slash-command-BrwA1bHs.d.mts +38 -0
- package/dist/slash-command-BrwA1bHs.d.mts.map +1 -0
- package/dist/theme-D1CI7_8s.d.mts +70 -0
- package/dist/theme-D1CI7_8s.d.mts.map +1 -0
- package/dist/typography-BdOKvXfQ.mjs +911 -0
- package/dist/typography-D-VnwOSw.cjs +970 -0
- package/dist/typography-DW7VApAR.cjs +1072 -0
- package/dist/use-maily-editor-Atvy2kSO.cjs +3993 -0
- package/dist/use-maily-editor-CByaDhmT.cjs +4955 -0
- package/dist/use-maily-editor-idL0RNsG.mjs +4504 -0
- package/package.json +115 -180
- package/readme.md +356 -195
- package/src/styles/index.css +2537 -0
- package/dist/blocks/index.cjs.map +0 -1
- package/dist/blocks/index.d.ts +0 -59
- package/dist/blocks/index.mjs.map +0 -1
- package/dist/extensions/index.cjs.map +0 -1
- package/dist/extensions/index.d.ts +0 -448
- package/dist/extensions/index.mjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.css +0 -2487
- package/dist/index.css.map +0 -1
- package/dist/index.d.ts +0 -63
- package/dist/index.mjs.map +0 -1
|
@@ -0,0 +1,1072 @@
|
|
|
1
|
+
let react_compiler_runtime = require("react/compiler-runtime");
|
|
2
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
+
let lucide_react = require("lucide-react");
|
|
4
|
+
let _maily_to_shared = require("@maily-to/shared");
|
|
5
|
+
//#region src/blocks/button.tsx
|
|
6
|
+
const button = {
|
|
7
|
+
title: "Button",
|
|
8
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.MousePointerIcon, { size: 16 }),
|
|
9
|
+
description: "Add a call to action button to email.",
|
|
10
|
+
searchTerms: [
|
|
11
|
+
"button",
|
|
12
|
+
"cta",
|
|
13
|
+
"link",
|
|
14
|
+
"action"
|
|
15
|
+
],
|
|
16
|
+
command: ({ editor, range }) => {
|
|
17
|
+
editor.chain().focus().deleteRange(range).setButton().run();
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/blocks/footers.tsx
|
|
22
|
+
const COMPANY_LINK_MARKS = [
|
|
23
|
+
{
|
|
24
|
+
type: _maily_to_shared.MAILY_MARK_TYPES.LINK,
|
|
25
|
+
attrs: {
|
|
26
|
+
href: "https://maily.to",
|
|
27
|
+
target: "_blank",
|
|
28
|
+
rel: "noopener noreferrer nofollow"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: _maily_to_shared.MAILY_MARK_TYPES.TEXT_STYLE,
|
|
33
|
+
attrs: { color: "#64748b" }
|
|
34
|
+
},
|
|
35
|
+
{ type: _maily_to_shared.MAILY_MARK_TYPES.UNDERLINE }
|
|
36
|
+
];
|
|
37
|
+
const COMPANY_LINK_SEPARATOR = {
|
|
38
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.TEXT,
|
|
39
|
+
marks: [{
|
|
40
|
+
type: _maily_to_shared.MAILY_MARK_TYPES.TEXT_STYLE,
|
|
41
|
+
attrs: { color: "#64748b" }
|
|
42
|
+
}],
|
|
43
|
+
text: " | "
|
|
44
|
+
};
|
|
45
|
+
const footerCopyrightText = {
|
|
46
|
+
title: "Footer Copyright",
|
|
47
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CopyrightIcon, { size: 16 }),
|
|
48
|
+
description: "Copyright text for the footer.",
|
|
49
|
+
searchTerms: ["footer", "copyright"],
|
|
50
|
+
command: ({ editor, range }) => {
|
|
51
|
+
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
52
|
+
editor.chain().focus().deleteRange(range).insertContent({
|
|
53
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.PARAGRAPH,
|
|
54
|
+
attrs: { style: "text-align:center" },
|
|
55
|
+
content: [{
|
|
56
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.TEXT,
|
|
57
|
+
marks: [{
|
|
58
|
+
type: _maily_to_shared.MAILY_MARK_TYPES.TEXT_STYLE,
|
|
59
|
+
attrs: { color: "#AAAAAA" }
|
|
60
|
+
}],
|
|
61
|
+
text: `Maily © ${currentYear}. All rights reserved.`
|
|
62
|
+
}]
|
|
63
|
+
}).run();
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const footerCommunityFeedbackCta = {
|
|
67
|
+
title: "Footer Community Feedback",
|
|
68
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.RectangleHorizontalIcon, { size: 16 }),
|
|
69
|
+
description: "Community feedback CTA for the footer.",
|
|
70
|
+
searchTerms: [
|
|
71
|
+
"footer",
|
|
72
|
+
"community",
|
|
73
|
+
"feedback",
|
|
74
|
+
"cta"
|
|
75
|
+
],
|
|
76
|
+
command: ({ editor, range }) => {
|
|
77
|
+
editor.chain().focus().deleteRange(range).insertContent([
|
|
78
|
+
{
|
|
79
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.IMAGE,
|
|
80
|
+
attrs: {
|
|
81
|
+
src: "https://maily.to/brand/logo.png",
|
|
82
|
+
width: "8%",
|
|
83
|
+
align: _maily_to_shared.TEXT_ALIGNMENTS.LEFT
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.SPACER,
|
|
88
|
+
attrs: { height: 16 }
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.FOOTER,
|
|
92
|
+
content: [
|
|
93
|
+
{
|
|
94
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.TEXT,
|
|
95
|
+
text: "Enjoyed this month's update?"
|
|
96
|
+
},
|
|
97
|
+
{ type: _maily_to_shared.MAILY_NODE_TYPES.HARD_BREAK },
|
|
98
|
+
{
|
|
99
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.TEXT,
|
|
100
|
+
text: "And, as always, we'd love your feedback – simply reply to the email or reach out via the Discord community!"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
]).run();
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
const footerCompanySignature = {
|
|
108
|
+
title: "Footer Company Signature",
|
|
109
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LayoutTemplateIcon, { size: 16 }),
|
|
110
|
+
description: "Company signature for the footer.",
|
|
111
|
+
searchTerms: [
|
|
112
|
+
"footer",
|
|
113
|
+
"company",
|
|
114
|
+
"signature"
|
|
115
|
+
],
|
|
116
|
+
command: ({ editor, range }) => {
|
|
117
|
+
editor.chain().focus().deleteRange(range).insertContent([
|
|
118
|
+
{ type: _maily_to_shared.MAILY_NODE_TYPES.HORIZONTAL_RULE },
|
|
119
|
+
{
|
|
120
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.IMAGE,
|
|
121
|
+
attrs: {
|
|
122
|
+
src: "https://maily.to/brand/logo.png",
|
|
123
|
+
width: "8%",
|
|
124
|
+
align: _maily_to_shared.TEXT_ALIGNMENTS.CENTER
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.SPACER,
|
|
129
|
+
attrs: { height: 16 }
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.HEADING,
|
|
133
|
+
attrs: {
|
|
134
|
+
level: 3,
|
|
135
|
+
style: "text-align:center"
|
|
136
|
+
},
|
|
137
|
+
content: [{
|
|
138
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.TEXT,
|
|
139
|
+
text: "Maily"
|
|
140
|
+
}]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.SPACER,
|
|
144
|
+
attrs: { height: 4 }
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.FOOTER,
|
|
148
|
+
attrs: { style: "text-align:center" },
|
|
149
|
+
content: [
|
|
150
|
+
{
|
|
151
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.TEXT,
|
|
152
|
+
text: "1234 Example Street, Example, DE 19801, United States"
|
|
153
|
+
},
|
|
154
|
+
{ type: _maily_to_shared.MAILY_NODE_TYPES.HARD_BREAK },
|
|
155
|
+
{
|
|
156
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.TEXT,
|
|
157
|
+
marks: COMPANY_LINK_MARKS,
|
|
158
|
+
text: "VISIT COMPANY"
|
|
159
|
+
},
|
|
160
|
+
COMPANY_LINK_SEPARATOR,
|
|
161
|
+
{
|
|
162
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.TEXT,
|
|
163
|
+
marks: COMPANY_LINK_MARKS,
|
|
164
|
+
text: "VISIT OUR BLOG"
|
|
165
|
+
},
|
|
166
|
+
COMPANY_LINK_SEPARATOR,
|
|
167
|
+
{
|
|
168
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.TEXT,
|
|
169
|
+
marks: COMPANY_LINK_MARKS,
|
|
170
|
+
text: "UNSUBSCRIBE"
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.PARAGRAPH,
|
|
176
|
+
attrs: { style: "text-align:center" },
|
|
177
|
+
content: [
|
|
178
|
+
{
|
|
179
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.INLINE_IMAGE,
|
|
180
|
+
attrs: {
|
|
181
|
+
src: "https://cdn.usemaily.com/images/icons/linkedin.png",
|
|
182
|
+
width: 20,
|
|
183
|
+
height: 20,
|
|
184
|
+
externalLink: "https://www.linkedin.com/in/arikchakma/"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.TEXT,
|
|
189
|
+
text: " "
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.INLINE_IMAGE,
|
|
193
|
+
attrs: {
|
|
194
|
+
src: "https://cdn.usemaily.com/images/icons/youtube.png",
|
|
195
|
+
width: 20,
|
|
196
|
+
height: 20,
|
|
197
|
+
externalLink: "https://www.youtube.com/arikchakma"
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.TEXT,
|
|
202
|
+
text: " "
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.INLINE_IMAGE,
|
|
206
|
+
attrs: {
|
|
207
|
+
src: "https://cdn.usemaily.com/images/icons/twitter.png",
|
|
208
|
+
width: 20,
|
|
209
|
+
height: 20,
|
|
210
|
+
externalLink: "https://x.com/imarikchakma"
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
]).run();
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
//#endregion
|
|
219
|
+
//#region src/components/icons/logo-with-cover-image.tsx
|
|
220
|
+
function LogoWithCoverImageIcon(props) {
|
|
221
|
+
const $ = (0, react_compiler_runtime.c)(9);
|
|
222
|
+
let t0;
|
|
223
|
+
let t1;
|
|
224
|
+
let t2;
|
|
225
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
226
|
+
t0 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
227
|
+
clipRule: "evenodd",
|
|
228
|
+
d: "M4.97634 1.4502H9.02405C9.70389 1.4502 10.2476 1.45019 10.687 1.48609C11.1379 1.52293 11.527 1.6003 11.8849 1.78263C12.4588 2.07504 12.9254 2.54164 13.2178 3.11553C13.4001 3.47338 13.4775 3.86253 13.5143 4.31342C13.5502 4.75277 13.5502 5.29652 13.5502 5.97637V8.02403C13.5502 8.70388 13.5502 9.24763 13.5143 9.68698C13.4775 10.1379 13.4001 10.527 13.2178 10.8849C12.9254 11.4588 12.4588 11.9254 11.8849 12.2178C11.527 12.4001 11.1379 12.4775 10.687 12.5143C10.2476 12.5502 9.70387 12.5502 9.02402 12.5502H4.97636C4.29651 12.5502 3.75276 12.5502 3.31341 12.5143C2.86252 12.4775 2.47337 12.4001 2.11552 12.2178C1.54163 11.9254 1.07504 11.4588 0.782626 10.8849C0.600293 10.527 0.522922 10.1379 0.486083 9.68698C0.450187 9.24764 0.45019 8.70389 0.450195 8.02405V5.97635C0.45019 5.29651 0.450187 4.75276 0.486083 4.31342C0.522922 3.86253 0.600293 3.47338 0.782626 3.11553C1.07504 2.54164 1.54163 2.07504 2.11552 1.78263C2.47337 1.6003 2.86252 1.52293 3.31341 1.48609C3.75276 1.45019 4.2965 1.4502 4.97634 1.4502ZM3.40298 2.58243C3.02012 2.61372 2.79184 2.67259 2.61491 2.76274C2.248 2.94969 1.94968 3.248 1.76273 3.61492C1.67258 3.79185 1.61371 4.02013 1.58243 4.40299C1.55062 4.79228 1.55019 5.29106 1.55019 6.0002V8.0002C1.55019 8.70934 1.55062 9.20812 1.58243 9.59741C1.61371 9.98028 1.67258 10.2086 1.76273 10.3855C1.94968 10.7524 2.248 11.0507 2.61491 11.2377C2.79184 11.3278 3.02012 11.3867 3.40298 11.418C3.79227 11.4498 4.29105 11.4502 5.00019 11.4502H9.00019C9.70933 11.4502 10.2081 11.4498 10.5974 11.418C10.9803 11.3867 11.2086 11.3278 11.3855 11.2377C11.7524 11.0507 12.0507 10.7524 12.2377 10.3855C12.3278 10.2086 12.3867 9.98028 12.418 9.59741C12.4498 9.20812 12.4502 8.70934 12.4502 8.0002V6.0002C12.4502 5.29106 12.4498 4.79228 12.418 4.40299C12.3867 4.02013 12.3278 3.79185 12.2377 3.61492C12.0507 3.248 11.7524 2.94969 11.3855 2.76274C11.2086 2.67259 10.9803 2.61372 10.5974 2.58243C10.2081 2.55063 9.70933 2.5502 9.00019 2.5502H5.00019C4.29105 2.5502 3.79227 2.55063 3.40298 2.58243Z",
|
|
229
|
+
fill: "currentColor",
|
|
230
|
+
fillRule: "evenodd"
|
|
231
|
+
});
|
|
232
|
+
t1 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
233
|
+
clipRule: "evenodd",
|
|
234
|
+
d: "M4.1999 0.450195C4.50366 0.450195 4.7499 0.696438 4.7499 1.00019V2.75019C4.7499 3.05395 4.50366 3.30019 4.1999 3.30019C3.89614 3.30019 3.6499 3.05395 3.6499 2.75019V1.00019C3.6499 0.696438 3.89614 0.450195 4.1999 0.450195Z",
|
|
235
|
+
fill: "currentColor",
|
|
236
|
+
fillRule: "evenodd"
|
|
237
|
+
});
|
|
238
|
+
t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
239
|
+
clipRule: "evenodd",
|
|
240
|
+
d: "M9.8 0.450195C10.1037 0.450195 10.35 0.696438 10.35 1.00019V2.75019C10.35 3.05395 10.1037 3.30019 9.8 3.30019C9.49625 3.30019 9.25 3.05395 9.25 2.75019V1.00019C9.25 0.696438 9.49625 0.450195 9.8 0.450195Z",
|
|
241
|
+
fill: "currentColor",
|
|
242
|
+
fillRule: "evenodd"
|
|
243
|
+
});
|
|
244
|
+
$[0] = t0;
|
|
245
|
+
$[1] = t1;
|
|
246
|
+
$[2] = t2;
|
|
247
|
+
} else {
|
|
248
|
+
t0 = $[0];
|
|
249
|
+
t1 = $[1];
|
|
250
|
+
t2 = $[2];
|
|
251
|
+
}
|
|
252
|
+
let t3;
|
|
253
|
+
let t4;
|
|
254
|
+
let t5;
|
|
255
|
+
let t6;
|
|
256
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
257
|
+
t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("mask", {
|
|
258
|
+
fill: "white",
|
|
259
|
+
id: "logo-with-cover-image-cover",
|
|
260
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
261
|
+
height: "3",
|
|
262
|
+
rx: "0.5",
|
|
263
|
+
width: "8",
|
|
264
|
+
x: "3",
|
|
265
|
+
y: "4"
|
|
266
|
+
})
|
|
267
|
+
});
|
|
268
|
+
t4 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
269
|
+
height: "3",
|
|
270
|
+
mask: "url(#logo-with-cover-image-cover)",
|
|
271
|
+
rx: "0.5",
|
|
272
|
+
stroke: "currentColor",
|
|
273
|
+
strokeWidth: "2",
|
|
274
|
+
width: "8",
|
|
275
|
+
x: "3",
|
|
276
|
+
y: "4"
|
|
277
|
+
});
|
|
278
|
+
t5 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
279
|
+
height: "0.5",
|
|
280
|
+
rx: "0.25",
|
|
281
|
+
stroke: "currentColor",
|
|
282
|
+
strokeWidth: "0.5",
|
|
283
|
+
width: "4.5",
|
|
284
|
+
x: "6.25",
|
|
285
|
+
y: "8.25"
|
|
286
|
+
});
|
|
287
|
+
t6 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
288
|
+
fill: "currentColor",
|
|
289
|
+
height: "1",
|
|
290
|
+
rx: "0.5",
|
|
291
|
+
width: "2",
|
|
292
|
+
x: "3",
|
|
293
|
+
y: "8"
|
|
294
|
+
});
|
|
295
|
+
$[3] = t3;
|
|
296
|
+
$[4] = t4;
|
|
297
|
+
$[5] = t5;
|
|
298
|
+
$[6] = t6;
|
|
299
|
+
} else {
|
|
300
|
+
t3 = $[3];
|
|
301
|
+
t4 = $[4];
|
|
302
|
+
t5 = $[5];
|
|
303
|
+
t6 = $[6];
|
|
304
|
+
}
|
|
305
|
+
let t7;
|
|
306
|
+
if ($[7] !== props) {
|
|
307
|
+
t7 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
308
|
+
fill: "none",
|
|
309
|
+
height: "16",
|
|
310
|
+
viewBox: "0 0 14 14",
|
|
311
|
+
width: "16",
|
|
312
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
313
|
+
...props,
|
|
314
|
+
children: [
|
|
315
|
+
t0,
|
|
316
|
+
t1,
|
|
317
|
+
t2,
|
|
318
|
+
t3,
|
|
319
|
+
t4,
|
|
320
|
+
t5,
|
|
321
|
+
t6
|
|
322
|
+
]
|
|
323
|
+
});
|
|
324
|
+
$[7] = props;
|
|
325
|
+
$[8] = t7;
|
|
326
|
+
} else t7 = $[8];
|
|
327
|
+
return t7;
|
|
328
|
+
}
|
|
329
|
+
//#endregion
|
|
330
|
+
//#region src/components/icons/logo-with-text-horizon.tsx
|
|
331
|
+
function LogoWithTextHorizonIcon(props) {
|
|
332
|
+
const $ = (0, react_compiler_runtime.c)(7);
|
|
333
|
+
let t0;
|
|
334
|
+
let t1;
|
|
335
|
+
let t2;
|
|
336
|
+
let t3;
|
|
337
|
+
let t4;
|
|
338
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
339
|
+
t0 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
340
|
+
clipRule: "evenodd",
|
|
341
|
+
d: "M4.97634 1.4502H9.02405C9.70389 1.4502 10.2476 1.45019 10.687 1.48609C11.1379 1.52293 11.527 1.6003 11.8849 1.78263C12.4588 2.07504 12.9254 2.54164 13.2178 3.11553C13.4001 3.47338 13.4775 3.86253 13.5143 4.31342C13.5502 4.75277 13.5502 5.29652 13.5502 5.97637V8.02403C13.5502 8.70388 13.5502 9.24763 13.5143 9.68698C13.4775 10.1379 13.4001 10.527 13.2178 10.8849C12.9254 11.4588 12.4588 11.9254 11.8849 12.2178C11.527 12.4001 11.1379 12.4775 10.687 12.5143C10.2476 12.5502 9.70387 12.5502 9.02402 12.5502H4.97636C4.29651 12.5502 3.75276 12.5502 3.31341 12.5143C2.86252 12.4775 2.47337 12.4001 2.11552 12.2178C1.54163 11.9254 1.07504 11.4588 0.782626 10.8849C0.600293 10.527 0.522922 10.1379 0.486083 9.68698C0.450187 9.24764 0.45019 8.70389 0.450195 8.02405V5.97635C0.45019 5.29651 0.450187 4.75276 0.486083 4.31342C0.522922 3.86253 0.600293 3.47338 0.782626 3.11553C1.07504 2.54164 1.54163 2.07504 2.11552 1.78263C2.47337 1.6003 2.86252 1.52293 3.31341 1.48609C3.75276 1.45019 4.2965 1.4502 4.97634 1.4502ZM3.40298 2.58243C3.02012 2.61372 2.79184 2.67259 2.61491 2.76274C2.248 2.94969 1.94968 3.248 1.76273 3.61492C1.67258 3.79185 1.61371 4.02013 1.58243 4.40299C1.55062 4.79228 1.55019 5.29106 1.55019 6.0002V8.0002C1.55019 8.70934 1.55062 9.20812 1.58243 9.59741C1.61371 9.98028 1.67258 10.2086 1.76273 10.3855C1.94968 10.7524 2.248 11.0507 2.61491 11.2377C2.79184 11.3278 3.02012 11.3867 3.40298 11.418C3.79227 11.4498 4.29105 11.4502 5.00019 11.4502H9.00019C9.70933 11.4502 10.2081 11.4498 10.5974 11.418C10.9803 11.3867 11.2086 11.3278 11.3855 11.2377C11.7524 11.0507 12.0507 10.7524 12.2377 10.3855C12.3278 10.2086 12.3867 9.98028 12.418 9.59741C12.4498 9.20812 12.4502 8.70934 12.4502 8.0002V6.0002C12.4502 5.29106 12.4498 4.79228 12.418 4.40299C12.3867 4.02013 12.3278 3.79185 12.2377 3.61492C12.0507 3.248 11.7524 2.94969 11.3855 2.76274C11.2086 2.67259 10.9803 2.61372 10.5974 2.58243C10.2081 2.55063 9.70933 2.5502 9.00019 2.5502H5.00019C4.29105 2.5502 3.79227 2.55063 3.40298 2.58243Z",
|
|
342
|
+
fill: "currentColor",
|
|
343
|
+
fillRule: "evenodd"
|
|
344
|
+
});
|
|
345
|
+
t1 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
346
|
+
height: "0.5",
|
|
347
|
+
rx: "0.25",
|
|
348
|
+
stroke: "currentColor",
|
|
349
|
+
strokeWidth: "0.5",
|
|
350
|
+
width: "4.5",
|
|
351
|
+
x: "6.25",
|
|
352
|
+
y: "6.75"
|
|
353
|
+
});
|
|
354
|
+
t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
355
|
+
fill: "currentColor",
|
|
356
|
+
height: "1",
|
|
357
|
+
rx: "0.5",
|
|
358
|
+
width: "2",
|
|
359
|
+
x: "3",
|
|
360
|
+
y: "6.5"
|
|
361
|
+
});
|
|
362
|
+
t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
363
|
+
clipRule: "evenodd",
|
|
364
|
+
d: "M4.1999 0.450195C4.50366 0.450195 4.7499 0.696438 4.7499 1.00019V2.75019C4.7499 3.05395 4.50366 3.30019 4.1999 3.30019C3.89614 3.30019 3.6499 3.05395 3.6499 2.75019V1.00019C3.6499 0.696438 3.89614 0.450195 4.1999 0.450195Z",
|
|
365
|
+
fill: "currentColor",
|
|
366
|
+
fillRule: "evenodd"
|
|
367
|
+
});
|
|
368
|
+
t4 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
369
|
+
clipRule: "evenodd",
|
|
370
|
+
d: "M9.8 0.450195C10.1037 0.450195 10.35 0.696438 10.35 1.00019V2.75019C10.35 3.05395 10.1037 3.30019 9.8 3.30019C9.49625 3.30019 9.25 3.05395 9.25 2.75019V1.00019C9.25 0.696438 9.49625 0.450195 9.8 0.450195Z",
|
|
371
|
+
fill: "currentColor",
|
|
372
|
+
fillRule: "evenodd"
|
|
373
|
+
});
|
|
374
|
+
$[0] = t0;
|
|
375
|
+
$[1] = t1;
|
|
376
|
+
$[2] = t2;
|
|
377
|
+
$[3] = t3;
|
|
378
|
+
$[4] = t4;
|
|
379
|
+
} else {
|
|
380
|
+
t0 = $[0];
|
|
381
|
+
t1 = $[1];
|
|
382
|
+
t2 = $[2];
|
|
383
|
+
t3 = $[3];
|
|
384
|
+
t4 = $[4];
|
|
385
|
+
}
|
|
386
|
+
let t5;
|
|
387
|
+
if ($[5] !== props) {
|
|
388
|
+
t5 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
389
|
+
fill: "none",
|
|
390
|
+
height: "16",
|
|
391
|
+
viewBox: "0 0 14 14",
|
|
392
|
+
width: "16",
|
|
393
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
394
|
+
...props,
|
|
395
|
+
children: [
|
|
396
|
+
t0,
|
|
397
|
+
t1,
|
|
398
|
+
t2,
|
|
399
|
+
t3,
|
|
400
|
+
t4
|
|
401
|
+
]
|
|
402
|
+
});
|
|
403
|
+
$[5] = props;
|
|
404
|
+
$[6] = t5;
|
|
405
|
+
} else t5 = $[6];
|
|
406
|
+
return t5;
|
|
407
|
+
}
|
|
408
|
+
//#endregion
|
|
409
|
+
//#region src/components/icons/logo-with-text-vertical.tsx
|
|
410
|
+
function LogoWithTextVerticalIcon(props) {
|
|
411
|
+
const $ = (0, react_compiler_runtime.c)(7);
|
|
412
|
+
let t0;
|
|
413
|
+
let t1;
|
|
414
|
+
let t2;
|
|
415
|
+
let t3;
|
|
416
|
+
let t4;
|
|
417
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
418
|
+
t0 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
419
|
+
clipRule: "evenodd",
|
|
420
|
+
d: "M4.97634 1.4502H9.02405C9.70389 1.4502 10.2476 1.45019 10.687 1.48609C11.1379 1.52293 11.527 1.6003 11.8849 1.78263C12.4588 2.07504 12.9254 2.54164 13.2178 3.11553C13.4001 3.47338 13.4775 3.86253 13.5143 4.31342C13.5502 4.75277 13.5502 5.29652 13.5502 5.97637V8.02403C13.5502 8.70388 13.5502 9.24763 13.5143 9.68698C13.4775 10.1379 13.4001 10.527 13.2178 10.8849C12.9254 11.4588 12.4588 11.9254 11.8849 12.2178C11.527 12.4001 11.1379 12.4775 10.687 12.5143C10.2476 12.5502 9.70387 12.5502 9.02402 12.5502H4.97636C4.29651 12.5502 3.75276 12.5502 3.31341 12.5143C2.86252 12.4775 2.47337 12.4001 2.11552 12.2178C1.54163 11.9254 1.07504 11.4588 0.782626 10.8849C0.600293 10.527 0.522922 10.1379 0.486083 9.68698C0.450187 9.24764 0.45019 8.70389 0.450195 8.02405V5.97635C0.45019 5.29651 0.450187 4.75276 0.486083 4.31342C0.522922 3.86253 0.600293 3.47338 0.782626 3.11553C1.07504 2.54164 1.54163 2.07504 2.11552 1.78263C2.47337 1.6003 2.86252 1.52293 3.31341 1.48609C3.75276 1.45019 4.2965 1.4502 4.97634 1.4502ZM3.40298 2.58243C3.02012 2.61372 2.79184 2.67259 2.61491 2.76274C2.248 2.94969 1.94968 3.248 1.76273 3.61492C1.67258 3.79185 1.61371 4.02013 1.58243 4.40299C1.55062 4.79228 1.55019 5.29106 1.55019 6.0002V8.0002C1.55019 8.70934 1.55062 9.20812 1.58243 9.59741C1.61371 9.98028 1.67258 10.2086 1.76273 10.3855C1.94968 10.7524 2.248 11.0507 2.61491 11.2377C2.79184 11.3278 3.02012 11.3867 3.40298 11.418C3.79227 11.4498 4.29105 11.4502 5.00019 11.4502H9.00019C9.70933 11.4502 10.2081 11.4498 10.5974 11.418C10.9803 11.3867 11.2086 11.3278 11.3855 11.2377C11.7524 11.0507 12.0507 10.7524 12.2377 10.3855C12.3278 10.2086 12.3867 9.98028 12.418 9.59741C12.4498 9.20812 12.4502 8.70934 12.4502 8.0002V6.0002C12.4502 5.29106 12.4498 4.79228 12.418 4.40299C12.3867 4.02013 12.3278 3.79185 12.2377 3.61492C12.0507 3.248 11.7524 2.94969 11.3855 2.76274C11.2086 2.67259 10.9803 2.61372 10.5974 2.58243C10.2081 2.55063 9.70933 2.5502 9.00019 2.5502H5.00019C4.29105 2.5502 3.79227 2.55063 3.40298 2.58243Z",
|
|
421
|
+
fill: "currentColor",
|
|
422
|
+
fillRule: "evenodd"
|
|
423
|
+
});
|
|
424
|
+
t1 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
425
|
+
height: "0.5",
|
|
426
|
+
rx: "0.25",
|
|
427
|
+
stroke: "currentColor",
|
|
428
|
+
strokeWidth: "0.5",
|
|
429
|
+
width: "5.5",
|
|
430
|
+
x: "4.25",
|
|
431
|
+
y: "8.25"
|
|
432
|
+
});
|
|
433
|
+
t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
434
|
+
fill: "currentColor",
|
|
435
|
+
height: "1",
|
|
436
|
+
rx: "0.5",
|
|
437
|
+
width: "2",
|
|
438
|
+
x: "6",
|
|
439
|
+
y: "6"
|
|
440
|
+
});
|
|
441
|
+
t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
442
|
+
clipRule: "evenodd",
|
|
443
|
+
d: "M4.1999 0.450195C4.50366 0.450195 4.7499 0.696438 4.7499 1.00019V2.75019C4.7499 3.05395 4.50366 3.30019 4.1999 3.30019C3.89614 3.30019 3.6499 3.05395 3.6499 2.75019V1.00019C3.6499 0.696438 3.89614 0.450195 4.1999 0.450195Z",
|
|
444
|
+
fill: "currentColor",
|
|
445
|
+
fillRule: "evenodd"
|
|
446
|
+
});
|
|
447
|
+
t4 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
448
|
+
clipRule: "evenodd",
|
|
449
|
+
d: "M9.8 0.450195C10.1037 0.450195 10.35 0.696438 10.35 1.00019V2.75019C10.35 3.05395 10.1037 3.30019 9.8 3.30019C9.49625 3.30019 9.25 3.05395 9.25 2.75019V1.00019C9.25 0.696438 9.49625 0.450195 9.8 0.450195Z",
|
|
450
|
+
fill: "currentColor",
|
|
451
|
+
fillRule: "evenodd"
|
|
452
|
+
});
|
|
453
|
+
$[0] = t0;
|
|
454
|
+
$[1] = t1;
|
|
455
|
+
$[2] = t2;
|
|
456
|
+
$[3] = t3;
|
|
457
|
+
$[4] = t4;
|
|
458
|
+
} else {
|
|
459
|
+
t0 = $[0];
|
|
460
|
+
t1 = $[1];
|
|
461
|
+
t2 = $[2];
|
|
462
|
+
t3 = $[3];
|
|
463
|
+
t4 = $[4];
|
|
464
|
+
}
|
|
465
|
+
let t5;
|
|
466
|
+
if ($[5] !== props) {
|
|
467
|
+
t5 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
468
|
+
fill: "none",
|
|
469
|
+
height: "16",
|
|
470
|
+
viewBox: "0 0 14 14",
|
|
471
|
+
width: "16",
|
|
472
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
473
|
+
...props,
|
|
474
|
+
children: [
|
|
475
|
+
t0,
|
|
476
|
+
t1,
|
|
477
|
+
t2,
|
|
478
|
+
t3,
|
|
479
|
+
t4
|
|
480
|
+
]
|
|
481
|
+
});
|
|
482
|
+
$[5] = props;
|
|
483
|
+
$[6] = t5;
|
|
484
|
+
} else t5 = $[6];
|
|
485
|
+
return t5;
|
|
486
|
+
}
|
|
487
|
+
//#endregion
|
|
488
|
+
//#region src/blocks/headers.tsx
|
|
489
|
+
const headerLogoWithTextHorizontal = {
|
|
490
|
+
title: "Logo with Text (Horizontal)",
|
|
491
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LogoWithTextHorizonIcon, {}),
|
|
492
|
+
description: "Logo and a text horizontally",
|
|
493
|
+
searchTerms: ["logo", "text"],
|
|
494
|
+
command: ({ editor, range }) => {
|
|
495
|
+
editor.chain().focus().deleteRange(range).insertContent({
|
|
496
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.COLUMNS,
|
|
497
|
+
content: [{
|
|
498
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.COLUMN,
|
|
499
|
+
attrs: {
|
|
500
|
+
width: null,
|
|
501
|
+
verticalAlign: "middle"
|
|
502
|
+
},
|
|
503
|
+
content: [{
|
|
504
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.IMAGE,
|
|
505
|
+
attrs: {
|
|
506
|
+
src: "https://maily.to/brand/logo.png",
|
|
507
|
+
width: "32px",
|
|
508
|
+
align: _maily_to_shared.TEXT_ALIGNMENTS.LEFT,
|
|
509
|
+
style: "height:32px"
|
|
510
|
+
}
|
|
511
|
+
}]
|
|
512
|
+
}, {
|
|
513
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.COLUMN,
|
|
514
|
+
attrs: {
|
|
515
|
+
width: null,
|
|
516
|
+
verticalAlign: "bottom"
|
|
517
|
+
},
|
|
518
|
+
content: [{
|
|
519
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.HEADING,
|
|
520
|
+
attrs: {
|
|
521
|
+
level: 3,
|
|
522
|
+
style: "text-align:right"
|
|
523
|
+
},
|
|
524
|
+
content: [{
|
|
525
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.TEXT,
|
|
526
|
+
marks: [{ type: _maily_to_shared.MAILY_MARK_TYPES.BOLD }],
|
|
527
|
+
text: "Weekly Newsletter"
|
|
528
|
+
}]
|
|
529
|
+
}]
|
|
530
|
+
}]
|
|
531
|
+
}).run();
|
|
532
|
+
}
|
|
533
|
+
};
|
|
534
|
+
const headerLogoWithTextVertical = {
|
|
535
|
+
title: "Logo with Text (Vertical)",
|
|
536
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LogoWithTextVerticalIcon, {}),
|
|
537
|
+
description: "Logo and a text vertically",
|
|
538
|
+
searchTerms: ["logo", "text"],
|
|
539
|
+
command: ({ editor, range }) => {
|
|
540
|
+
editor.chain().focus().deleteRange(range).insertContent([
|
|
541
|
+
{
|
|
542
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.IMAGE,
|
|
543
|
+
attrs: {
|
|
544
|
+
src: "https://maily.to/brand/logo.png",
|
|
545
|
+
width: "48px",
|
|
546
|
+
align: _maily_to_shared.TEXT_ALIGNMENTS.CENTER,
|
|
547
|
+
style: "height:48px"
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.SPACER,
|
|
552
|
+
attrs: { height: 8 }
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.HEADING,
|
|
556
|
+
attrs: {
|
|
557
|
+
level: 2,
|
|
558
|
+
style: "text-align:center"
|
|
559
|
+
},
|
|
560
|
+
content: [{
|
|
561
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.TEXT,
|
|
562
|
+
text: "Maily"
|
|
563
|
+
}]
|
|
564
|
+
}
|
|
565
|
+
]).run();
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
const headerLogoWithCoverImage = {
|
|
569
|
+
title: "Logo with Cover Image",
|
|
570
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LogoWithCoverImageIcon, {}),
|
|
571
|
+
description: "Logo and a cover image",
|
|
572
|
+
searchTerms: [
|
|
573
|
+
"logo",
|
|
574
|
+
"cover",
|
|
575
|
+
"image"
|
|
576
|
+
],
|
|
577
|
+
command: ({ editor, range }) => {
|
|
578
|
+
const todayFormatted = (/* @__PURE__ */ new Date()).toLocaleDateString("en-US", {
|
|
579
|
+
year: "numeric",
|
|
580
|
+
month: "short",
|
|
581
|
+
day: "numeric"
|
|
582
|
+
});
|
|
583
|
+
editor.chain().focus().deleteRange(range).insertContent([{
|
|
584
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.IMAGE,
|
|
585
|
+
attrs: {
|
|
586
|
+
src: "https://maily.to/og-image.png",
|
|
587
|
+
width: "600px",
|
|
588
|
+
align: _maily_to_shared.TEXT_ALIGNMENTS.CENTER,
|
|
589
|
+
style: "height:314px"
|
|
590
|
+
}
|
|
591
|
+
}, {
|
|
592
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.COLUMNS,
|
|
593
|
+
content: [{
|
|
594
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.COLUMN,
|
|
595
|
+
attrs: {
|
|
596
|
+
width: null,
|
|
597
|
+
verticalAlign: "middle"
|
|
598
|
+
},
|
|
599
|
+
content: [{
|
|
600
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.IMAGE,
|
|
601
|
+
attrs: {
|
|
602
|
+
src: "https://maily.to/brand/logo.png",
|
|
603
|
+
width: "48px",
|
|
604
|
+
align: _maily_to_shared.TEXT_ALIGNMENTS.LEFT,
|
|
605
|
+
style: "height:48px"
|
|
606
|
+
}
|
|
607
|
+
}]
|
|
608
|
+
}, {
|
|
609
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.COLUMN,
|
|
610
|
+
attrs: {
|
|
611
|
+
width: null,
|
|
612
|
+
verticalAlign: "middle"
|
|
613
|
+
},
|
|
614
|
+
content: [{
|
|
615
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.PARAGRAPH,
|
|
616
|
+
attrs: { style: "text-align:right" },
|
|
617
|
+
content: [
|
|
618
|
+
{
|
|
619
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.TEXT,
|
|
620
|
+
marks: [{ type: _maily_to_shared.MAILY_MARK_TYPES.BOLD }],
|
|
621
|
+
text: "Weekly Newsletter"
|
|
622
|
+
},
|
|
623
|
+
{ type: _maily_to_shared.MAILY_NODE_TYPES.HARD_BREAK },
|
|
624
|
+
{
|
|
625
|
+
type: _maily_to_shared.MAILY_NODE_TYPES.TEXT,
|
|
626
|
+
marks: [{
|
|
627
|
+
type: _maily_to_shared.MAILY_MARK_TYPES.TEXT_STYLE,
|
|
628
|
+
attrs: { color: "#929292" }
|
|
629
|
+
}],
|
|
630
|
+
text: todayFormatted
|
|
631
|
+
}
|
|
632
|
+
]
|
|
633
|
+
}]
|
|
634
|
+
}]
|
|
635
|
+
}]).run();
|
|
636
|
+
}
|
|
637
|
+
};
|
|
638
|
+
//#endregion
|
|
639
|
+
//#region src/blocks/image.tsx
|
|
640
|
+
const image = {
|
|
641
|
+
title: "Image",
|
|
642
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ImageIcon, { size: 16 }),
|
|
643
|
+
description: "Add a full-width image.",
|
|
644
|
+
searchTerms: [
|
|
645
|
+
"image",
|
|
646
|
+
"picture",
|
|
647
|
+
"photo",
|
|
648
|
+
"media"
|
|
649
|
+
],
|
|
650
|
+
command: ({ editor, range }) => {
|
|
651
|
+
editor.chain().focus().deleteRange(range).setImage({ src: "" }).run();
|
|
652
|
+
}
|
|
653
|
+
};
|
|
654
|
+
const inlineImage = {
|
|
655
|
+
title: "Inline Image",
|
|
656
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.SmilePlusIcon, { size: 16 }),
|
|
657
|
+
description: "Add an image inside a line of text.",
|
|
658
|
+
searchTerms: [
|
|
659
|
+
"inline",
|
|
660
|
+
"image",
|
|
661
|
+
"icon",
|
|
662
|
+
"emoji"
|
|
663
|
+
],
|
|
664
|
+
command: ({ editor, range }) => {
|
|
665
|
+
editor.chain().focus().deleteRange(range).setInlineImage({ src: "" }).run();
|
|
666
|
+
}
|
|
667
|
+
};
|
|
668
|
+
//#endregion
|
|
669
|
+
//#region src/blocks/layout.tsx
|
|
670
|
+
const spacer = {
|
|
671
|
+
title: "Spacer",
|
|
672
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.MoveVerticalIcon, { size: 16 }),
|
|
673
|
+
description: "Add space between blocks.",
|
|
674
|
+
searchTerms: ["space", "gap"],
|
|
675
|
+
command: ({ editor, range }) => {
|
|
676
|
+
editor.chain().focus().deleteRange(range).setSpacer().run();
|
|
677
|
+
}
|
|
678
|
+
};
|
|
679
|
+
const divider = {
|
|
680
|
+
title: "Divider",
|
|
681
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.MinusIcon, { size: 16 }),
|
|
682
|
+
description: "Add a horizontal divider.",
|
|
683
|
+
searchTerms: [
|
|
684
|
+
"divider",
|
|
685
|
+
"line",
|
|
686
|
+
"rule"
|
|
687
|
+
],
|
|
688
|
+
command: ({ editor, range }) => {
|
|
689
|
+
editor.chain().focus().deleteRange(range).setHorizontalRule().run();
|
|
690
|
+
}
|
|
691
|
+
};
|
|
692
|
+
const section = {
|
|
693
|
+
title: "Section",
|
|
694
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.SquareIcon, { size: 16 }),
|
|
695
|
+
description: "Add a section container.",
|
|
696
|
+
searchTerms: [
|
|
697
|
+
"section",
|
|
698
|
+
"container",
|
|
699
|
+
"box",
|
|
700
|
+
"wrapper"
|
|
701
|
+
],
|
|
702
|
+
command: ({ editor, range }) => {
|
|
703
|
+
editor.chain().focus().deleteRange(range).setSection().run();
|
|
704
|
+
}
|
|
705
|
+
};
|
|
706
|
+
const columns = {
|
|
707
|
+
title: "Columns",
|
|
708
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ColumnsIcon, { size: 16 }),
|
|
709
|
+
description: "Add a multi-column layout.",
|
|
710
|
+
searchTerms: [
|
|
711
|
+
"columns",
|
|
712
|
+
"layout",
|
|
713
|
+
"grid",
|
|
714
|
+
"split"
|
|
715
|
+
],
|
|
716
|
+
command: ({ editor, range }) => {
|
|
717
|
+
editor.chain().focus().deleteRange(range).setColumns().run();
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
const table = {
|
|
721
|
+
title: "Table",
|
|
722
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.TableIcon, { size: 16 }),
|
|
723
|
+
description: "Add a table.",
|
|
724
|
+
searchTerms: [
|
|
725
|
+
"table",
|
|
726
|
+
"grid",
|
|
727
|
+
"rows"
|
|
728
|
+
],
|
|
729
|
+
command: ({ editor, range }) => {
|
|
730
|
+
editor.chain().focus().deleteRange(range).insertTable({
|
|
731
|
+
cols: 3,
|
|
732
|
+
rows: 3,
|
|
733
|
+
withHeaderRow: true
|
|
734
|
+
}).run();
|
|
735
|
+
}
|
|
736
|
+
};
|
|
737
|
+
const htmlCodeBlock = {
|
|
738
|
+
title: "Custom HTML",
|
|
739
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CodeXmlIcon, { size: 16 }),
|
|
740
|
+
description: "Insert a custom HTML block.",
|
|
741
|
+
searchTerms: [
|
|
742
|
+
"html",
|
|
743
|
+
"code",
|
|
744
|
+
"custom"
|
|
745
|
+
],
|
|
746
|
+
command: ({ editor, range }) => {
|
|
747
|
+
editor.chain().focus().deleteRange(range).setHtmlCodeBlock({ language: "html" }).run();
|
|
748
|
+
}
|
|
749
|
+
};
|
|
750
|
+
const repeat = {
|
|
751
|
+
title: "Repeat",
|
|
752
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Repeat2Icon, { size: 16 }),
|
|
753
|
+
description: "Render the content once for every item in a list.",
|
|
754
|
+
searchTerms: [
|
|
755
|
+
"repeat",
|
|
756
|
+
"loop",
|
|
757
|
+
"iterate",
|
|
758
|
+
"for",
|
|
759
|
+
"each",
|
|
760
|
+
"list",
|
|
761
|
+
"array"
|
|
762
|
+
],
|
|
763
|
+
command: ({ editor, range }) => {
|
|
764
|
+
editor.chain().focus().deleteRange(range).setRepeat().run();
|
|
765
|
+
}
|
|
766
|
+
};
|
|
767
|
+
//#endregion
|
|
768
|
+
//#region src/blocks/link-card.tsx
|
|
769
|
+
const linkCard = {
|
|
770
|
+
title: "Link Card",
|
|
771
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.SquareArrowOutUpRightIcon, { size: 16 }),
|
|
772
|
+
description: "Add a rich preview card with link.",
|
|
773
|
+
searchTerms: [
|
|
774
|
+
"link",
|
|
775
|
+
"card",
|
|
776
|
+
"button",
|
|
777
|
+
"image"
|
|
778
|
+
],
|
|
779
|
+
render: (editor) => {
|
|
780
|
+
return editor.extensionManager.extensions.some((extension) => extension.name === _maily_to_shared.MAILY_NODE_TYPES.LINK_CARD) ? true : null;
|
|
781
|
+
},
|
|
782
|
+
command: ({ editor, range }) => {
|
|
783
|
+
editor.chain().focus().deleteRange(range).setLinkCard().run();
|
|
784
|
+
}
|
|
785
|
+
};
|
|
786
|
+
//#endregion
|
|
787
|
+
//#region src/blocks/list.tsx
|
|
788
|
+
const bulletList = {
|
|
789
|
+
title: "Bullet List",
|
|
790
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ListIcon, { size: 16 }),
|
|
791
|
+
description: "Create a simple bullet list.",
|
|
792
|
+
searchTerms: [
|
|
793
|
+
"unordered",
|
|
794
|
+
"point",
|
|
795
|
+
"bullet"
|
|
796
|
+
],
|
|
797
|
+
command: ({ editor, range }) => {
|
|
798
|
+
editor.chain().focus().deleteRange(range).toggleBulletList().run();
|
|
799
|
+
}
|
|
800
|
+
};
|
|
801
|
+
const orderedList = {
|
|
802
|
+
title: "Numbered List",
|
|
803
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ListOrderedIcon, { size: 16 }),
|
|
804
|
+
description: "Create a list with numbering.",
|
|
805
|
+
searchTerms: ["ordered", "number"],
|
|
806
|
+
command: ({ editor, range }) => {
|
|
807
|
+
editor.chain().focus().deleteRange(range).toggleOrderedList().run();
|
|
808
|
+
}
|
|
809
|
+
};
|
|
810
|
+
//#endregion
|
|
811
|
+
//#region src/blocks/typography.tsx
|
|
812
|
+
const text = {
|
|
813
|
+
title: "Text",
|
|
814
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.TextIcon, { size: 16 }),
|
|
815
|
+
description: "Just start typing with plain text.",
|
|
816
|
+
searchTerms: [
|
|
817
|
+
"p",
|
|
818
|
+
"paragraph",
|
|
819
|
+
"text"
|
|
820
|
+
],
|
|
821
|
+
command: ({ editor, range }) => {
|
|
822
|
+
editor.chain().focus().deleteRange(range).setParagraph().run();
|
|
823
|
+
}
|
|
824
|
+
};
|
|
825
|
+
const heading1 = {
|
|
826
|
+
title: "Heading 1",
|
|
827
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Heading1Icon, { size: 16 }),
|
|
828
|
+
description: "Big heading.",
|
|
829
|
+
searchTerms: [
|
|
830
|
+
"h1",
|
|
831
|
+
"title",
|
|
832
|
+
"big",
|
|
833
|
+
"large"
|
|
834
|
+
],
|
|
835
|
+
command: ({ editor, range }) => {
|
|
836
|
+
editor.chain().focus().deleteRange(range).setNode("heading", { level: 1 }).run();
|
|
837
|
+
}
|
|
838
|
+
};
|
|
839
|
+
const heading2 = {
|
|
840
|
+
title: "Heading 2",
|
|
841
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Heading2Icon, { size: 16 }),
|
|
842
|
+
description: "Medium heading.",
|
|
843
|
+
searchTerms: [
|
|
844
|
+
"h2",
|
|
845
|
+
"subtitle",
|
|
846
|
+
"medium"
|
|
847
|
+
],
|
|
848
|
+
command: ({ editor, range }) => {
|
|
849
|
+
editor.chain().focus().deleteRange(range).setNode("heading", { level: 2 }).run();
|
|
850
|
+
}
|
|
851
|
+
};
|
|
852
|
+
const heading3 = {
|
|
853
|
+
title: "Heading 3",
|
|
854
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Heading3Icon, { size: 16 }),
|
|
855
|
+
description: "Small heading.",
|
|
856
|
+
searchTerms: [
|
|
857
|
+
"h3",
|
|
858
|
+
"subtitle",
|
|
859
|
+
"small"
|
|
860
|
+
],
|
|
861
|
+
command: ({ editor, range }) => {
|
|
862
|
+
editor.chain().focus().deleteRange(range).setNode("heading", { level: 3 }).run();
|
|
863
|
+
}
|
|
864
|
+
};
|
|
865
|
+
const hardBreak = {
|
|
866
|
+
title: "Hard Break",
|
|
867
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.DivideIcon, { size: 16 }),
|
|
868
|
+
description: "Add a break between lines.",
|
|
869
|
+
searchTerms: ["break", "line"],
|
|
870
|
+
command: ({ editor, range }) => {
|
|
871
|
+
editor.chain().focus().deleteRange(range).setHardBreak().run();
|
|
872
|
+
}
|
|
873
|
+
};
|
|
874
|
+
const blockquote = {
|
|
875
|
+
title: "Blockquote",
|
|
876
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.TextQuoteIcon, { size: 16 }),
|
|
877
|
+
description: "Add a blockquote.",
|
|
878
|
+
searchTerms: [
|
|
879
|
+
"quote",
|
|
880
|
+
"blockquote",
|
|
881
|
+
"citation"
|
|
882
|
+
],
|
|
883
|
+
command: ({ editor, range }) => {
|
|
884
|
+
editor.chain().focus().deleteRange(range).setBlockquote().run();
|
|
885
|
+
}
|
|
886
|
+
};
|
|
887
|
+
const footer = {
|
|
888
|
+
title: "Footer",
|
|
889
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.FootprintsIcon, { size: 16 }),
|
|
890
|
+
description: "Add a footer text.",
|
|
891
|
+
searchTerms: [
|
|
892
|
+
"footer",
|
|
893
|
+
"small",
|
|
894
|
+
"legal",
|
|
895
|
+
"unsubscribe"
|
|
896
|
+
],
|
|
897
|
+
command: ({ editor, range }) => {
|
|
898
|
+
editor.chain().focus().deleteRange(range).setFooter().run();
|
|
899
|
+
}
|
|
900
|
+
};
|
|
901
|
+
const clearLine = {
|
|
902
|
+
title: "Clear Line",
|
|
903
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.EraserIcon, { size: 16 }),
|
|
904
|
+
description: "Clear the current line.",
|
|
905
|
+
searchTerms: ["clear", "line"],
|
|
906
|
+
command: ({ editor }) => {
|
|
907
|
+
editor.chain().focus().selectParentNode().deleteSelection().run();
|
|
908
|
+
}
|
|
909
|
+
};
|
|
910
|
+
//#endregion
|
|
911
|
+
Object.defineProperty(exports, "blockquote", {
|
|
912
|
+
enumerable: true,
|
|
913
|
+
get: function() {
|
|
914
|
+
return blockquote;
|
|
915
|
+
}
|
|
916
|
+
});
|
|
917
|
+
Object.defineProperty(exports, "bulletList", {
|
|
918
|
+
enumerable: true,
|
|
919
|
+
get: function() {
|
|
920
|
+
return bulletList;
|
|
921
|
+
}
|
|
922
|
+
});
|
|
923
|
+
Object.defineProperty(exports, "button", {
|
|
924
|
+
enumerable: true,
|
|
925
|
+
get: function() {
|
|
926
|
+
return button;
|
|
927
|
+
}
|
|
928
|
+
});
|
|
929
|
+
Object.defineProperty(exports, "clearLine", {
|
|
930
|
+
enumerable: true,
|
|
931
|
+
get: function() {
|
|
932
|
+
return clearLine;
|
|
933
|
+
}
|
|
934
|
+
});
|
|
935
|
+
Object.defineProperty(exports, "columns", {
|
|
936
|
+
enumerable: true,
|
|
937
|
+
get: function() {
|
|
938
|
+
return columns;
|
|
939
|
+
}
|
|
940
|
+
});
|
|
941
|
+
Object.defineProperty(exports, "divider", {
|
|
942
|
+
enumerable: true,
|
|
943
|
+
get: function() {
|
|
944
|
+
return divider;
|
|
945
|
+
}
|
|
946
|
+
});
|
|
947
|
+
Object.defineProperty(exports, "footer", {
|
|
948
|
+
enumerable: true,
|
|
949
|
+
get: function() {
|
|
950
|
+
return footer;
|
|
951
|
+
}
|
|
952
|
+
});
|
|
953
|
+
Object.defineProperty(exports, "footerCommunityFeedbackCta", {
|
|
954
|
+
enumerable: true,
|
|
955
|
+
get: function() {
|
|
956
|
+
return footerCommunityFeedbackCta;
|
|
957
|
+
}
|
|
958
|
+
});
|
|
959
|
+
Object.defineProperty(exports, "footerCompanySignature", {
|
|
960
|
+
enumerable: true,
|
|
961
|
+
get: function() {
|
|
962
|
+
return footerCompanySignature;
|
|
963
|
+
}
|
|
964
|
+
});
|
|
965
|
+
Object.defineProperty(exports, "footerCopyrightText", {
|
|
966
|
+
enumerable: true,
|
|
967
|
+
get: function() {
|
|
968
|
+
return footerCopyrightText;
|
|
969
|
+
}
|
|
970
|
+
});
|
|
971
|
+
Object.defineProperty(exports, "hardBreak", {
|
|
972
|
+
enumerable: true,
|
|
973
|
+
get: function() {
|
|
974
|
+
return hardBreak;
|
|
975
|
+
}
|
|
976
|
+
});
|
|
977
|
+
Object.defineProperty(exports, "headerLogoWithCoverImage", {
|
|
978
|
+
enumerable: true,
|
|
979
|
+
get: function() {
|
|
980
|
+
return headerLogoWithCoverImage;
|
|
981
|
+
}
|
|
982
|
+
});
|
|
983
|
+
Object.defineProperty(exports, "headerLogoWithTextHorizontal", {
|
|
984
|
+
enumerable: true,
|
|
985
|
+
get: function() {
|
|
986
|
+
return headerLogoWithTextHorizontal;
|
|
987
|
+
}
|
|
988
|
+
});
|
|
989
|
+
Object.defineProperty(exports, "headerLogoWithTextVertical", {
|
|
990
|
+
enumerable: true,
|
|
991
|
+
get: function() {
|
|
992
|
+
return headerLogoWithTextVertical;
|
|
993
|
+
}
|
|
994
|
+
});
|
|
995
|
+
Object.defineProperty(exports, "heading1", {
|
|
996
|
+
enumerable: true,
|
|
997
|
+
get: function() {
|
|
998
|
+
return heading1;
|
|
999
|
+
}
|
|
1000
|
+
});
|
|
1001
|
+
Object.defineProperty(exports, "heading2", {
|
|
1002
|
+
enumerable: true,
|
|
1003
|
+
get: function() {
|
|
1004
|
+
return heading2;
|
|
1005
|
+
}
|
|
1006
|
+
});
|
|
1007
|
+
Object.defineProperty(exports, "heading3", {
|
|
1008
|
+
enumerable: true,
|
|
1009
|
+
get: function() {
|
|
1010
|
+
return heading3;
|
|
1011
|
+
}
|
|
1012
|
+
});
|
|
1013
|
+
Object.defineProperty(exports, "htmlCodeBlock", {
|
|
1014
|
+
enumerable: true,
|
|
1015
|
+
get: function() {
|
|
1016
|
+
return htmlCodeBlock;
|
|
1017
|
+
}
|
|
1018
|
+
});
|
|
1019
|
+
Object.defineProperty(exports, "image", {
|
|
1020
|
+
enumerable: true,
|
|
1021
|
+
get: function() {
|
|
1022
|
+
return image;
|
|
1023
|
+
}
|
|
1024
|
+
});
|
|
1025
|
+
Object.defineProperty(exports, "inlineImage", {
|
|
1026
|
+
enumerable: true,
|
|
1027
|
+
get: function() {
|
|
1028
|
+
return inlineImage;
|
|
1029
|
+
}
|
|
1030
|
+
});
|
|
1031
|
+
Object.defineProperty(exports, "linkCard", {
|
|
1032
|
+
enumerable: true,
|
|
1033
|
+
get: function() {
|
|
1034
|
+
return linkCard;
|
|
1035
|
+
}
|
|
1036
|
+
});
|
|
1037
|
+
Object.defineProperty(exports, "orderedList", {
|
|
1038
|
+
enumerable: true,
|
|
1039
|
+
get: function() {
|
|
1040
|
+
return orderedList;
|
|
1041
|
+
}
|
|
1042
|
+
});
|
|
1043
|
+
Object.defineProperty(exports, "repeat", {
|
|
1044
|
+
enumerable: true,
|
|
1045
|
+
get: function() {
|
|
1046
|
+
return repeat;
|
|
1047
|
+
}
|
|
1048
|
+
});
|
|
1049
|
+
Object.defineProperty(exports, "section", {
|
|
1050
|
+
enumerable: true,
|
|
1051
|
+
get: function() {
|
|
1052
|
+
return section;
|
|
1053
|
+
}
|
|
1054
|
+
});
|
|
1055
|
+
Object.defineProperty(exports, "spacer", {
|
|
1056
|
+
enumerable: true,
|
|
1057
|
+
get: function() {
|
|
1058
|
+
return spacer;
|
|
1059
|
+
}
|
|
1060
|
+
});
|
|
1061
|
+
Object.defineProperty(exports, "table", {
|
|
1062
|
+
enumerable: true,
|
|
1063
|
+
get: function() {
|
|
1064
|
+
return table;
|
|
1065
|
+
}
|
|
1066
|
+
});
|
|
1067
|
+
Object.defineProperty(exports, "text", {
|
|
1068
|
+
enumerable: true,
|
|
1069
|
+
get: function() {
|
|
1070
|
+
return text;
|
|
1071
|
+
}
|
|
1072
|
+
});
|