@maily-to/core 2.0.0-beta.6 → 2.0.0-beta.8

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 (48) hide show
  1. package/dist/blocks/index.cjs +8 -1
  2. package/dist/blocks/index.d.cts +1 -38
  3. package/dist/blocks/index.d.mts +14 -6
  4. package/dist/blocks/index.d.mts.map +1 -1
  5. package/dist/blocks/index.mjs +2 -2
  6. package/dist/extensions/index.cjs +252 -303
  7. package/dist/extensions/index.d.cts +1 -379
  8. package/dist/extensions/index.d.mts +127 -224
  9. package/dist/extensions/index.d.mts.map +1 -1
  10. package/dist/extensions/index.mjs +238 -271
  11. package/dist/index.cjs +4426 -12591
  12. package/dist/index.d.cts +1 -107
  13. package/dist/index.d.mts +711 -73
  14. package/dist/index.d.mts.map +1 -1
  15. package/dist/index.mjs +8397 -11474
  16. package/dist/{slash-command-BmWRVPbv.d.mts → slash-command-BrwA1bHs.d.mts} +10 -11
  17. package/dist/slash-command-BrwA1bHs.d.mts.map +1 -0
  18. package/dist/theme-D1CI7_8s.d.mts +70 -0
  19. package/dist/theme-D1CI7_8s.d.mts.map +1 -0
  20. package/dist/typography-BdOKvXfQ.mjs +911 -0
  21. package/dist/typography-D-VnwOSw.cjs +970 -0
  22. package/dist/typography-DW7VApAR.cjs +1072 -0
  23. package/dist/use-maily-editor-BP6Mt8Nn.cjs +3991 -0
  24. package/dist/use-maily-editor-DFuhg38t.cjs +4939 -0
  25. package/dist/use-maily-editor-xVILP7H8.mjs +4488 -0
  26. package/package.json +96 -73
  27. package/readme.md +177 -133
  28. package/src/styles/index.css +2537 -0
  29. package/dist/blocks/index.d.cts.map +0 -1
  30. package/dist/chunk-CfYAbeIz.mjs +0 -13
  31. package/dist/extensions/index.d.cts.map +0 -1
  32. package/dist/extensions/index.mjs.map +0 -1
  33. package/dist/index.css +0 -2312
  34. package/dist/index.d.cts.map +0 -1
  35. package/dist/index.mjs.map +0 -1
  36. package/dist/slash-command-BmWRVPbv.d.mts.map +0 -1
  37. package/dist/slash-command-CK0-1FwR.d.cts +0 -39
  38. package/dist/slash-command-CK0-1FwR.d.cts.map +0 -1
  39. package/dist/spacer-DBtsr3hu.cjs +0 -5768
  40. package/dist/spacer-DzZWX-wB.mjs +0 -5456
  41. package/dist/spacer-DzZWX-wB.mjs.map +0 -1
  42. package/dist/typography-CWL13acR.cjs +0 -400
  43. package/dist/typography-DhrUe809.mjs +0 -282
  44. package/dist/typography-DhrUe809.mjs.map +0 -1
  45. package/dist/variable-C9S9ZoHv.d.cts +0 -108
  46. package/dist/variable-C9S9ZoHv.d.cts.map +0 -1
  47. package/dist/variable-DVwGrg2a.d.mts +0 -108
  48. package/dist/variable-DVwGrg2a.d.mts.map +0 -1
@@ -1,400 +0,0 @@
1
- require("./spacer-DBtsr3hu.cjs");
2
- let _maily_to_shared = require("@maily-to/shared");
3
- let react_jsx_runtime = require("react/jsx-runtime");
4
- let lucide_react = require("lucide-react");
5
- //#region src/blocks/button.tsx
6
- const button = {
7
- title: "Button",
8
- description: "Add a call to action button to email.",
9
- searchTerms: [
10
- "link",
11
- "button",
12
- "cta"
13
- ],
14
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.MousePointerIcon, { className: "mly:h-4 mly:w-4" }),
15
- command: ({ editor, range }) => {
16
- const { fontSize, lineHeight, fontWeight } = (0, _maily_to_shared.getNodeFontStyleDefaults)(_maily_to_shared.MAILY_NODE_TYPES.BUTTON);
17
- return editor.chain().focus().deleteRange(range).setButton({
18
- fontSize,
19
- lineHeight,
20
- fontWeight
21
- }).run();
22
- }
23
- };
24
- //#endregion
25
- //#region src/blocks/image.tsx
26
- const image = {
27
- title: "Image",
28
- description: "Insert an image",
29
- searchTerms: [
30
- "image",
31
- "picture",
32
- "logo"
33
- ],
34
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ImageIcon, { className: "mly:h-4 mly:w-4" }),
35
- command: ({ editor, range }) => {
36
- return editor.chain().focus().deleteRange(range).setImage({ src: "" }).run();
37
- }
38
- };
39
- //#endregion
40
- //#region src/blocks/inline-image.tsx
41
- const inlineImage = {
42
- title: "Inline Image",
43
- description: "Insert an icon, emoji, etc.",
44
- searchTerms: [
45
- "inline",
46
- "icon",
47
- "emoji",
48
- "social",
49
- "inline-image"
50
- ],
51
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.SmilePlusIcon, { className: "mly:h-4 mly:w-4" }),
52
- command: ({ editor, range }) => {
53
- editor.chain().focus().deleteRange(range).setInlineImage({ src: "" }).run();
54
- const { from } = editor.state.selection;
55
- editor.commands.setNodeSelection(from - 1);
56
- }
57
- };
58
- //#endregion
59
- //#region src/blocks/layout.tsx
60
- const spacer = {
61
- title: "Spacer",
62
- description: "Add space between blocks.",
63
- searchTerms: [
64
- "space",
65
- "gap",
66
- "divider"
67
- ],
68
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.MoveVerticalIcon, { className: "mly:h-4 mly:w-4" }),
69
- command: ({ editor, range }) => {
70
- return editor.chain().focus().deleteRange(range).setSpacer().run();
71
- }
72
- };
73
- const divider = {
74
- title: "Divider",
75
- description: "Add a horizontal divider.",
76
- searchTerms: ["divider", "line"],
77
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.MinusIcon, { className: "mly:h-4 mly:w-4" }),
78
- command: ({ editor, range }) => {
79
- return editor.chain().focus().deleteRange(range).setHorizontalRule().run();
80
- }
81
- };
82
- const section = {
83
- title: "Section",
84
- description: "Add a section container.",
85
- searchTerms: [
86
- "section",
87
- "container",
88
- "box",
89
- "wrapper"
90
- ],
91
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.SquareIcon, { className: "mly:h-4 mly:w-4" }),
92
- command: ({ editor, range }) => {
93
- return editor.chain().focus().deleteRange(range).setSection().run();
94
- }
95
- };
96
- const columns = {
97
- title: "Columns",
98
- description: "Add a multi-column layout.",
99
- searchTerms: [
100
- "columns",
101
- "layout",
102
- "grid",
103
- "two",
104
- "split"
105
- ],
106
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ColumnsIcon, { className: "mly:h-4 mly:w-4" }),
107
- command: ({ editor, range }) => {
108
- return editor.chain().focus().deleteRange(range).setColumns(2).run();
109
- }
110
- };
111
- const repeat = {
112
- title: "Repeat",
113
- description: "Repeat content for each item in a list.",
114
- searchTerms: [
115
- "repeat",
116
- "loop",
117
- "iterate",
118
- "for",
119
- "each",
120
- "array"
121
- ],
122
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Repeat2Icon, { className: "mly:h-4 mly:w-4" }),
123
- command: ({ editor, range }) => {
124
- return editor.chain().focus().deleteRange(range).setRepeat().run();
125
- }
126
- };
127
- const htmlCodeBlock = {
128
- title: "Custom HTML",
129
- description: "Insert a custom HTML block.",
130
- searchTerms: [
131
- "html",
132
- "code",
133
- "custom"
134
- ],
135
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CodeXmlIcon, { className: "mly:h-4 mly:w-4" }),
136
- command: ({ editor, range }) => {
137
- return editor.chain().focus().deleteRange(range).setHtmlCodeBlock({ language: "html" }).run();
138
- }
139
- };
140
- //#endregion
141
- //#region src/blocks/link-card.tsx
142
- const linkCard = {
143
- title: "Link Card",
144
- description: "Add a rich preview card with link.",
145
- searchTerms: [
146
- "link",
147
- "card",
148
- "button",
149
- "image"
150
- ],
151
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.SquareArrowOutUpRightIcon, { className: "mly:h-4 mly:w-4" }),
152
- render: (editor) => {
153
- return editor.extensionManager.extensions.some((ext) => ext.name === _maily_to_shared.MAILY_NODE_TYPES.LINK_CARD) ? true : null;
154
- },
155
- command: ({ editor, range }) => {
156
- return editor.chain().focus().deleteRange(range).setLinkCard().run();
157
- }
158
- };
159
- //#endregion
160
- //#region src/blocks/list.tsx
161
- const bulletList = {
162
- title: "Bullet List",
163
- description: "Create a simple bullet list.",
164
- searchTerms: ["unordered", "point"],
165
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ListIcon, { className: "mly:h-4 mly:w-4" }),
166
- command: ({ editor, range }) => {
167
- return editor.chain().focus().deleteRange(range).toggleBulletList().run();
168
- }
169
- };
170
- const orderedList = {
171
- title: "Numbered List",
172
- description: "Create a list with numbering.",
173
- searchTerms: ["ordered"],
174
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ListOrderedIcon, { className: "mly:h-4 mly:w-4" }),
175
- command: ({ editor, range }) => {
176
- return editor.chain().focus().deleteRange(range).toggleOrderedList().run();
177
- }
178
- };
179
- //#endregion
180
- //#region src/blocks/typography.tsx
181
- const text = {
182
- title: "Text",
183
- description: "Just start typing with plain text.",
184
- searchTerms: ["p", "paragraph"],
185
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.TextIcon, { className: "mly:h-4 mly:w-4" }),
186
- command: ({ editor, range }) => {
187
- editor.chain().focus().deleteRange(range).toggleNode("paragraph", "paragraph", (0, _maily_to_shared.getNodeFontStyleDefaults)(_maily_to_shared.MAILY_NODE_TYPES.PARAGRAPH)).run();
188
- }
189
- };
190
- const heading1 = {
191
- title: "Heading 1",
192
- description: "Big heading.",
193
- searchTerms: [
194
- "h1",
195
- "title",
196
- "big",
197
- "large"
198
- ],
199
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Heading1Icon, { className: "mly:h-4 mly:w-4" }),
200
- command: ({ editor, range }) => {
201
- editor.chain().focus().deleteRange(range).setNode("heading", {
202
- level: 1,
203
- ...(0, _maily_to_shared.getNodeFontStyleDefaults)(_maily_to_shared.MAILY_NODE_TYPES.HEADING, 1)
204
- }).run();
205
- }
206
- };
207
- const heading2 = {
208
- title: "Heading 2",
209
- description: "Medium heading.",
210
- searchTerms: [
211
- "h2",
212
- "subtitle",
213
- "medium"
214
- ],
215
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Heading2Icon, { className: "mly:h-4 mly:w-4" }),
216
- command: ({ editor, range }) => {
217
- editor.chain().focus().deleteRange(range).setNode("heading", {
218
- level: 2,
219
- ...(0, _maily_to_shared.getNodeFontStyleDefaults)(_maily_to_shared.MAILY_NODE_TYPES.HEADING, 2)
220
- }).run();
221
- }
222
- };
223
- const heading3 = {
224
- title: "Heading 3",
225
- description: "Small heading.",
226
- searchTerms: [
227
- "h3",
228
- "subtitle",
229
- "small"
230
- ],
231
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Heading3Icon, { className: "mly:h-4 mly:w-4" }),
232
- command: ({ editor, range }) => {
233
- editor.chain().focus().deleteRange(range).setNode("heading", {
234
- level: 3,
235
- ...(0, _maily_to_shared.getNodeFontStyleDefaults)(_maily_to_shared.MAILY_NODE_TYPES.HEADING, 3)
236
- }).run();
237
- }
238
- };
239
- const hardBreak = {
240
- title: "Hard Break",
241
- description: "Add a break between lines.",
242
- searchTerms: ["break", "line"],
243
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.DivideIcon, { className: "mly:h-4 mly:w-4" }),
244
- command: ({ editor, range }) => {
245
- return editor.chain().focus().deleteRange(range).setHardBreak().run();
246
- }
247
- };
248
- const blockquote = {
249
- title: "Blockquote",
250
- description: "Add a blockquote.",
251
- searchTerms: ["quote", "blockquote"],
252
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.TextQuoteIcon, { className: "mly:h-4 mly:w-4" }),
253
- command: ({ editor, range }) => {
254
- return editor.chain().focus().deleteRange(range).toggleBlockquote().run();
255
- }
256
- };
257
- const footer = {
258
- title: "Footer",
259
- description: "Add a footer text.",
260
- searchTerms: [
261
- "footer",
262
- "muted",
263
- "small",
264
- "copyright"
265
- ],
266
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.FootprintsIcon, { className: "mly:h-4 mly:w-4" }),
267
- command: ({ editor, range }) => {
268
- editor.chain().focus().deleteRange(range).setFooter().run();
269
- }
270
- };
271
- const clearLine = {
272
- title: "Clear Line",
273
- description: "Clear the current line.",
274
- searchTerms: ["clear", "line"],
275
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.EraserIcon, { className: "mly:h-4 mly:w-4" }),
276
- command: ({ editor, range: _range }) => {
277
- return editor.chain().focus().selectParentNode().deleteSelection().run();
278
- }
279
- };
280
- //#endregion
281
- Object.defineProperty(exports, "blockquote", {
282
- enumerable: true,
283
- get: function() {
284
- return blockquote;
285
- }
286
- });
287
- Object.defineProperty(exports, "bulletList", {
288
- enumerable: true,
289
- get: function() {
290
- return bulletList;
291
- }
292
- });
293
- Object.defineProperty(exports, "button", {
294
- enumerable: true,
295
- get: function() {
296
- return button;
297
- }
298
- });
299
- Object.defineProperty(exports, "clearLine", {
300
- enumerable: true,
301
- get: function() {
302
- return clearLine;
303
- }
304
- });
305
- Object.defineProperty(exports, "columns", {
306
- enumerable: true,
307
- get: function() {
308
- return columns;
309
- }
310
- });
311
- Object.defineProperty(exports, "divider", {
312
- enumerable: true,
313
- get: function() {
314
- return divider;
315
- }
316
- });
317
- Object.defineProperty(exports, "footer", {
318
- enumerable: true,
319
- get: function() {
320
- return footer;
321
- }
322
- });
323
- Object.defineProperty(exports, "hardBreak", {
324
- enumerable: true,
325
- get: function() {
326
- return hardBreak;
327
- }
328
- });
329
- Object.defineProperty(exports, "heading1", {
330
- enumerable: true,
331
- get: function() {
332
- return heading1;
333
- }
334
- });
335
- Object.defineProperty(exports, "heading2", {
336
- enumerable: true,
337
- get: function() {
338
- return heading2;
339
- }
340
- });
341
- Object.defineProperty(exports, "heading3", {
342
- enumerable: true,
343
- get: function() {
344
- return heading3;
345
- }
346
- });
347
- Object.defineProperty(exports, "htmlCodeBlock", {
348
- enumerable: true,
349
- get: function() {
350
- return htmlCodeBlock;
351
- }
352
- });
353
- Object.defineProperty(exports, "image", {
354
- enumerable: true,
355
- get: function() {
356
- return image;
357
- }
358
- });
359
- Object.defineProperty(exports, "inlineImage", {
360
- enumerable: true,
361
- get: function() {
362
- return inlineImage;
363
- }
364
- });
365
- Object.defineProperty(exports, "linkCard", {
366
- enumerable: true,
367
- get: function() {
368
- return linkCard;
369
- }
370
- });
371
- Object.defineProperty(exports, "orderedList", {
372
- enumerable: true,
373
- get: function() {
374
- return orderedList;
375
- }
376
- });
377
- Object.defineProperty(exports, "repeat", {
378
- enumerable: true,
379
- get: function() {
380
- return repeat;
381
- }
382
- });
383
- Object.defineProperty(exports, "section", {
384
- enumerable: true,
385
- get: function() {
386
- return section;
387
- }
388
- });
389
- Object.defineProperty(exports, "spacer", {
390
- enumerable: true,
391
- get: function() {
392
- return spacer;
393
- }
394
- });
395
- Object.defineProperty(exports, "text", {
396
- enumerable: true,
397
- get: function() {
398
- return text;
399
- }
400
- });
@@ -1,282 +0,0 @@
1
- import { MAILY_NODE_TYPES, getNodeFontStyleDefaults } from "@maily-to/shared";
2
- import { jsx } from "react/jsx-runtime";
3
- import { CodeXmlIcon, ColumnsIcon, DivideIcon, EraserIcon, FootprintsIcon, Heading1Icon, Heading2Icon, Heading3Icon, ImageIcon, ListIcon, ListOrderedIcon, MinusIcon, MousePointerIcon, MoveVerticalIcon, Repeat2Icon, SmilePlusIcon, SquareArrowOutUpRightIcon, SquareIcon, TextIcon, TextQuoteIcon } from "lucide-react";
4
- //#region src/blocks/button.tsx
5
- const button = {
6
- title: "Button",
7
- description: "Add a call to action button to email.",
8
- searchTerms: [
9
- "link",
10
- "button",
11
- "cta"
12
- ],
13
- icon: /* @__PURE__ */ jsx(MousePointerIcon, { className: "mly:h-4 mly:w-4" }),
14
- command: ({ editor, range }) => {
15
- const { fontSize, lineHeight, fontWeight } = getNodeFontStyleDefaults(MAILY_NODE_TYPES.BUTTON);
16
- return editor.chain().focus().deleteRange(range).setButton({
17
- fontSize,
18
- lineHeight,
19
- fontWeight
20
- }).run();
21
- }
22
- };
23
- //#endregion
24
- //#region src/blocks/image.tsx
25
- const image = {
26
- title: "Image",
27
- description: "Insert an image",
28
- searchTerms: [
29
- "image",
30
- "picture",
31
- "logo"
32
- ],
33
- icon: /* @__PURE__ */ jsx(ImageIcon, { className: "mly:h-4 mly:w-4" }),
34
- command: ({ editor, range }) => {
35
- return editor.chain().focus().deleteRange(range).setImage({ src: "" }).run();
36
- }
37
- };
38
- //#endregion
39
- //#region src/blocks/inline-image.tsx
40
- const inlineImage = {
41
- title: "Inline Image",
42
- description: "Insert an icon, emoji, etc.",
43
- searchTerms: [
44
- "inline",
45
- "icon",
46
- "emoji",
47
- "social",
48
- "inline-image"
49
- ],
50
- icon: /* @__PURE__ */ jsx(SmilePlusIcon, { className: "mly:h-4 mly:w-4" }),
51
- command: ({ editor, range }) => {
52
- editor.chain().focus().deleteRange(range).setInlineImage({ src: "" }).run();
53
- const { from } = editor.state.selection;
54
- editor.commands.setNodeSelection(from - 1);
55
- }
56
- };
57
- //#endregion
58
- //#region src/blocks/layout.tsx
59
- const spacer = {
60
- title: "Spacer",
61
- description: "Add space between blocks.",
62
- searchTerms: [
63
- "space",
64
- "gap",
65
- "divider"
66
- ],
67
- icon: /* @__PURE__ */ jsx(MoveVerticalIcon, { className: "mly:h-4 mly:w-4" }),
68
- command: ({ editor, range }) => {
69
- return editor.chain().focus().deleteRange(range).setSpacer().run();
70
- }
71
- };
72
- const divider = {
73
- title: "Divider",
74
- description: "Add a horizontal divider.",
75
- searchTerms: ["divider", "line"],
76
- icon: /* @__PURE__ */ jsx(MinusIcon, { className: "mly:h-4 mly:w-4" }),
77
- command: ({ editor, range }) => {
78
- return editor.chain().focus().deleteRange(range).setHorizontalRule().run();
79
- }
80
- };
81
- const section = {
82
- title: "Section",
83
- description: "Add a section container.",
84
- searchTerms: [
85
- "section",
86
- "container",
87
- "box",
88
- "wrapper"
89
- ],
90
- icon: /* @__PURE__ */ jsx(SquareIcon, { className: "mly:h-4 mly:w-4" }),
91
- command: ({ editor, range }) => {
92
- return editor.chain().focus().deleteRange(range).setSection().run();
93
- }
94
- };
95
- const columns = {
96
- title: "Columns",
97
- description: "Add a multi-column layout.",
98
- searchTerms: [
99
- "columns",
100
- "layout",
101
- "grid",
102
- "two",
103
- "split"
104
- ],
105
- icon: /* @__PURE__ */ jsx(ColumnsIcon, { className: "mly:h-4 mly:w-4" }),
106
- command: ({ editor, range }) => {
107
- return editor.chain().focus().deleteRange(range).setColumns(2).run();
108
- }
109
- };
110
- const repeat = {
111
- title: "Repeat",
112
- description: "Repeat content for each item in a list.",
113
- searchTerms: [
114
- "repeat",
115
- "loop",
116
- "iterate",
117
- "for",
118
- "each",
119
- "array"
120
- ],
121
- icon: /* @__PURE__ */ jsx(Repeat2Icon, { className: "mly:h-4 mly:w-4" }),
122
- command: ({ editor, range }) => {
123
- return editor.chain().focus().deleteRange(range).setRepeat().run();
124
- }
125
- };
126
- const htmlCodeBlock = {
127
- title: "Custom HTML",
128
- description: "Insert a custom HTML block.",
129
- searchTerms: [
130
- "html",
131
- "code",
132
- "custom"
133
- ],
134
- icon: /* @__PURE__ */ jsx(CodeXmlIcon, { className: "mly:h-4 mly:w-4" }),
135
- command: ({ editor, range }) => {
136
- return editor.chain().focus().deleteRange(range).setHtmlCodeBlock({ language: "html" }).run();
137
- }
138
- };
139
- //#endregion
140
- //#region src/blocks/link-card.tsx
141
- const linkCard = {
142
- title: "Link Card",
143
- description: "Add a rich preview card with link.",
144
- searchTerms: [
145
- "link",
146
- "card",
147
- "button",
148
- "image"
149
- ],
150
- icon: /* @__PURE__ */ jsx(SquareArrowOutUpRightIcon, { className: "mly:h-4 mly:w-4" }),
151
- render: (editor) => {
152
- return editor.extensionManager.extensions.some((ext) => ext.name === MAILY_NODE_TYPES.LINK_CARD) ? true : null;
153
- },
154
- command: ({ editor, range }) => {
155
- return editor.chain().focus().deleteRange(range).setLinkCard().run();
156
- }
157
- };
158
- //#endregion
159
- //#region src/blocks/list.tsx
160
- const bulletList = {
161
- title: "Bullet List",
162
- description: "Create a simple bullet list.",
163
- searchTerms: ["unordered", "point"],
164
- icon: /* @__PURE__ */ jsx(ListIcon, { className: "mly:h-4 mly:w-4" }),
165
- command: ({ editor, range }) => {
166
- return editor.chain().focus().deleteRange(range).toggleBulletList().run();
167
- }
168
- };
169
- const orderedList = {
170
- title: "Numbered List",
171
- description: "Create a list with numbering.",
172
- searchTerms: ["ordered"],
173
- icon: /* @__PURE__ */ jsx(ListOrderedIcon, { className: "mly:h-4 mly:w-4" }),
174
- command: ({ editor, range }) => {
175
- return editor.chain().focus().deleteRange(range).toggleOrderedList().run();
176
- }
177
- };
178
- //#endregion
179
- //#region src/blocks/typography.tsx
180
- const text = {
181
- title: "Text",
182
- description: "Just start typing with plain text.",
183
- searchTerms: ["p", "paragraph"],
184
- icon: /* @__PURE__ */ jsx(TextIcon, { className: "mly:h-4 mly:w-4" }),
185
- command: ({ editor, range }) => {
186
- editor.chain().focus().deleteRange(range).toggleNode("paragraph", "paragraph", getNodeFontStyleDefaults(MAILY_NODE_TYPES.PARAGRAPH)).run();
187
- }
188
- };
189
- const heading1 = {
190
- title: "Heading 1",
191
- description: "Big heading.",
192
- searchTerms: [
193
- "h1",
194
- "title",
195
- "big",
196
- "large"
197
- ],
198
- icon: /* @__PURE__ */ jsx(Heading1Icon, { className: "mly:h-4 mly:w-4" }),
199
- command: ({ editor, range }) => {
200
- editor.chain().focus().deleteRange(range).setNode("heading", {
201
- level: 1,
202
- ...getNodeFontStyleDefaults(MAILY_NODE_TYPES.HEADING, 1)
203
- }).run();
204
- }
205
- };
206
- const heading2 = {
207
- title: "Heading 2",
208
- description: "Medium heading.",
209
- searchTerms: [
210
- "h2",
211
- "subtitle",
212
- "medium"
213
- ],
214
- icon: /* @__PURE__ */ jsx(Heading2Icon, { className: "mly:h-4 mly:w-4" }),
215
- command: ({ editor, range }) => {
216
- editor.chain().focus().deleteRange(range).setNode("heading", {
217
- level: 2,
218
- ...getNodeFontStyleDefaults(MAILY_NODE_TYPES.HEADING, 2)
219
- }).run();
220
- }
221
- };
222
- const heading3 = {
223
- title: "Heading 3",
224
- description: "Small heading.",
225
- searchTerms: [
226
- "h3",
227
- "subtitle",
228
- "small"
229
- ],
230
- icon: /* @__PURE__ */ jsx(Heading3Icon, { className: "mly:h-4 mly:w-4" }),
231
- command: ({ editor, range }) => {
232
- editor.chain().focus().deleteRange(range).setNode("heading", {
233
- level: 3,
234
- ...getNodeFontStyleDefaults(MAILY_NODE_TYPES.HEADING, 3)
235
- }).run();
236
- }
237
- };
238
- const hardBreak = {
239
- title: "Hard Break",
240
- description: "Add a break between lines.",
241
- searchTerms: ["break", "line"],
242
- icon: /* @__PURE__ */ jsx(DivideIcon, { className: "mly:h-4 mly:w-4" }),
243
- command: ({ editor, range }) => {
244
- return editor.chain().focus().deleteRange(range).setHardBreak().run();
245
- }
246
- };
247
- const blockquote = {
248
- title: "Blockquote",
249
- description: "Add a blockquote.",
250
- searchTerms: ["quote", "blockquote"],
251
- icon: /* @__PURE__ */ jsx(TextQuoteIcon, { className: "mly:h-4 mly:w-4" }),
252
- command: ({ editor, range }) => {
253
- return editor.chain().focus().deleteRange(range).toggleBlockquote().run();
254
- }
255
- };
256
- const footer = {
257
- title: "Footer",
258
- description: "Add a footer text.",
259
- searchTerms: [
260
- "footer",
261
- "muted",
262
- "small",
263
- "copyright"
264
- ],
265
- icon: /* @__PURE__ */ jsx(FootprintsIcon, { className: "mly:h-4 mly:w-4" }),
266
- command: ({ editor, range }) => {
267
- editor.chain().focus().deleteRange(range).setFooter().run();
268
- }
269
- };
270
- const clearLine = {
271
- title: "Clear Line",
272
- description: "Clear the current line.",
273
- searchTerms: ["clear", "line"],
274
- icon: /* @__PURE__ */ jsx(EraserIcon, { className: "mly:h-4 mly:w-4" }),
275
- command: ({ editor, range: _range }) => {
276
- return editor.chain().focus().selectParentNode().deleteSelection().run();
277
- }
278
- };
279
- //#endregion
280
- export { spacer as _, heading1 as a, button as b, text as c, linkCard as d, columns as f, section as g, repeat as h, hardBreak as i, bulletList as l, htmlCodeBlock as m, clearLine as n, heading2 as o, divider as p, footer as r, heading3 as s, blockquote as t, orderedList as u, inlineImage as v, image as y };
281
-
282
- //# sourceMappingURL=typography-DhrUe809.mjs.map