@maily-to/core 0.3.7 → 2.0.0-beta.1

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 (46) hide show
  1. package/dist/blocks/index.cjs +22 -305
  2. package/dist/blocks/index.d.cts +38 -59
  3. package/dist/blocks/index.d.cts.map +1 -0
  4. package/dist/blocks/index.d.mts +38 -0
  5. package/dist/blocks/index.d.mts.map +1 -0
  6. package/dist/blocks/index.mjs +2 -273
  7. package/dist/chunk-CfYAbeIz.mjs +13 -0
  8. package/dist/extensions/index.cjs +375 -9101
  9. package/dist/extensions/index.d.cts +337 -406
  10. package/dist/extensions/index.d.cts.map +1 -0
  11. package/dist/extensions/index.d.mts +379 -0
  12. package/dist/extensions/index.d.mts.map +1 -0
  13. package/dist/extensions/index.mjs +353 -9050
  14. package/dist/extensions/index.mjs.map +1 -1
  15. package/dist/index.cjs +13117 -12141
  16. package/dist/index.css +1302 -1477
  17. package/dist/index.d.cts +103 -59
  18. package/dist/index.d.cts.map +1 -0
  19. package/dist/index.d.mts +105 -0
  20. package/dist/index.d.mts.map +1 -0
  21. package/dist/index.mjs +13098 -12191
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/slash-command-BmWRVPbv.d.mts +39 -0
  24. package/dist/slash-command-BmWRVPbv.d.mts.map +1 -0
  25. package/dist/slash-command-CK0-1FwR.d.cts +39 -0
  26. package/dist/slash-command-CK0-1FwR.d.cts.map +1 -0
  27. package/dist/spacer-DBtsr3hu.cjs +5768 -0
  28. package/dist/spacer-DzZWX-wB.mjs +5456 -0
  29. package/dist/spacer-DzZWX-wB.mjs.map +1 -0
  30. package/dist/typography-CWL13acR.cjs +400 -0
  31. package/dist/typography-DhrUe809.mjs +282 -0
  32. package/dist/typography-DhrUe809.mjs.map +1 -0
  33. package/dist/variable-C9S9ZoHv.d.cts +108 -0
  34. package/dist/variable-C9S9ZoHv.d.cts.map +1 -0
  35. package/dist/variable-DVwGrg2a.d.mts +108 -0
  36. package/dist/variable-DVwGrg2a.d.mts.map +1 -0
  37. package/package.json +95 -172
  38. package/readme.md +298 -181
  39. package/dist/blocks/index.cjs.map +0 -1
  40. package/dist/blocks/index.d.ts +0 -59
  41. package/dist/blocks/index.mjs.map +0 -1
  42. package/dist/extensions/index.cjs.map +0 -1
  43. package/dist/extensions/index.d.ts +0 -448
  44. package/dist/index.cjs.map +0 -1
  45. package/dist/index.css.map +0 -1
  46. package/dist/index.d.ts +0 -63
package/readme.md CHANGED
@@ -1,17 +1,19 @@
1
- <h1 align="center"><img height="150" src="https://maily.to/brand/icon.svg" /><br> @maily-to/core</h1>
1
+ [![MAILY](../../_static/maily.jpg)](https://maily.to)
2
2
 
3
3
  <p align="center">
4
- <a href="https://github.com/arikchakma/maily.to/blob/main/license">
4
+ AI-powered powerful editor for creating beautiful,<br /> pre-designed with flexibility, mobile-ready emails.
5
+ </p>
6
+
7
+ <p align="center">
8
+ <a href="https://github.com/arikchakma/maily.to/blob/main/LICENSE">
5
9
  <img src="https://img.shields.io/badge/License-MIT-222222.svg" />
6
10
  </a>
7
11
  <a href="https://maily.to">
8
- <img src="https://img.shields.io/badge/%E2%9C%A8-Get%20Editor-0a0a0a.svg?style=flat&colorA=0a0a0a" alt="Get Maily Editor" />
12
+ <img src="https://img.shields.io/badge/%E2%9C%A8-Get%20Editor-0a0a0a.svg?style=flat&colorA=222222" alt="Get Maily Editor" />
9
13
  </a>
10
14
  </p>
11
15
 
12
- > Currently, this package is under development. You can follow the progress [here](https://github.com/arikchakma/maily.to).
13
-
14
- ## Installation
16
+ ### Installation
15
17
 
16
18
  ```bash
17
19
  pnpm add @maily-to/core
@@ -20,7 +22,9 @@ pnpm add @maily-to/core
20
22
  pnpm add -D @tiptap/core
21
23
  ```
22
24
 
23
- ## Usage
25
+ ### Quick Start
26
+
27
+ The editor uses a **compound component** pattern — compose `Editor.Root`, `Editor.Frame`, and `Editor.Content` to build your layout.
24
28
 
25
29
  ```tsx
26
30
  import '@maily-to/core/style.css';
@@ -29,80 +33,164 @@ import { useState } from 'react';
29
33
  import { Editor } from '@maily-to/core';
30
34
  import type { Editor as TiptapEditor, JSONContent } from '@tiptap/core';
31
35
 
32
- type AppProps = {
33
- contentJson: JSONContent;
34
- };
35
-
36
- function App(props: AppProps) {
37
- const { contentJson: defaultContentJson } = props;
36
+ function App() {
38
37
  const [editor, setEditor] = useState<TiptapEditor>();
39
38
 
40
39
  return (
41
- <Editor
42
- contentJson={defaultContentJson}
43
- onCreate={setEditor}
44
- onUpdate={setEditor}
45
- />
40
+ <Editor.Root
41
+ content={defaultContentJson}
42
+ onCreate={({ editor }) => setEditor(editor)}
43
+ onUpdate={({ editor }) => setEditor(editor)}
44
+ >
45
+ <Editor.Frame>
46
+ <Editor.Content />
47
+ </Editor.Frame>
48
+ </Editor.Root>
46
49
  );
47
50
  }
48
51
  ```
49
52
 
53
+ #### Editor Components
54
+
55
+ | Component | Description |
56
+ | ------------------ | ----------------------------------------------------------------------------- |
57
+ | `Editor.Root` | Top-level provider. Accepts content, extensions, theme, and editor callbacks. |
58
+ | `Editor.Body` | Applies theme CSS variables and body background/padding. |
59
+ | `Editor.Container` | Constrains content to the theme's max-width with padding. |
60
+ | `Editor.Content` | Renders the Tiptap editor and all bubble menus. |
61
+ | `Editor.Frame` | Convenience wrapper — renders `Body > Container` in one component. |
62
+
63
+ `Editor.Frame` is shorthand for nesting `Body` and `Container`. Use the individual pieces when you need more control:
64
+
65
+ ```tsx
66
+ <Editor.Root content={content}>
67
+ <Editor.Body>
68
+ <Editor.Container>
69
+ <Editor.Content />
70
+ </Editor.Container>
71
+ </Editor.Body>
72
+ </Editor.Root>
73
+ ```
74
+
75
+ #### Accessing the Editor Context
76
+
77
+ Use `useEditorRootContext` to access the theme and text direction from any child component:
78
+
79
+ ```tsx
80
+ import { useEditorRootContext } from '@maily-to/core';
81
+
82
+ function MyComponent() {
83
+ const { textDirection, setTextDirection, theme } = useEditorRootContext();
84
+ // ...
85
+ }
86
+ ```
87
+
88
+ ### Toolbar
89
+
90
+ A composable toolbar with pre-built action buttons:
91
+
92
+ ```tsx
93
+ import { Editor, Toolbar } from '@maily-to/core';
94
+
95
+ <Editor.Root content={content}>
96
+ <Toolbar.Root>
97
+ <Toolbar.CommonActions />
98
+ </Toolbar.Root>
99
+ <Editor.Frame>
100
+ <Editor.Content />
101
+ </Editor.Frame>
102
+ </Editor.Root>;
103
+ ```
104
+
105
+ Or pick individual buttons:
106
+
107
+ ```tsx
108
+ <Toolbar.Root>
109
+ <Toolbar.Group>
110
+ <Toolbar.Undo />
111
+ <Toolbar.Redo />
112
+ </Toolbar.Group>
113
+ <Toolbar.Group>
114
+ <Toolbar.Bold />
115
+ <Toolbar.Italic />
116
+ <Toolbar.Underline />
117
+ <Toolbar.Strikethrough />
118
+ <Toolbar.Code />
119
+ </Toolbar.Group>
120
+ <Toolbar.Align />
121
+ <Toolbar.Direction />
122
+ </Toolbar.Root>
123
+ ```
124
+
125
+ | Component | Description |
126
+ | ------------------------------------------------------------------ | ------------------------------------------------------- |
127
+ | `Toolbar.Root` | Toolbar container with tooltip provider |
128
+ | `Toolbar.Group` | Visual grouping for buttons |
129
+ | `Toolbar.CommonActions` | Pre-configured group with all common formatting actions |
130
+ | `Toolbar.Undo` / `Toolbar.Redo` | History actions |
131
+ | `Toolbar.Bold` / `Italic` / `Underline` / `Strikethrough` / `Code` | Mark toggles |
132
+ | `Toolbar.Align` | Text alignment popover (left, center, right) |
133
+ | `Toolbar.Direction` | Text direction popover (LTR, RTL) |
134
+
50
135
  ### Slash Commands
51
136
 
52
- Slash commands let you interact with the editor by typing `/` followed by a command name. Commands are now organized into groups. Each group is an object with a `title` and a `commands` array. Every command within that array is a `BlockItem` that can either be a single command or a grouped command (with commands).
137
+ Slash commands let you interact with the editor by typing `/` followed by a command name. Commands are organized into groups with a `title` and a `commands` array.
53
138
 
54
139
  #### Basic Example
55
140
 
56
- Suppose you have a couple of basic blocks, such as a text block or a heading block. You would organize them into a group like this:
57
-
58
141
  ```tsx
59
- // omitting imports
60
142
  import { text, heading1 } from '@maily-to/core/blocks';
143
+ import { SlashCommandExtension } from '@maily-to/core/extensions';
61
144
 
62
- <Editor
63
- blocks={[
64
- {
65
- title: 'Basic Blocks',
145
+ <Editor.Root
146
+ extensions={[
147
+ SlashCommandExtension.configure({
66
148
  commands: [text, heading1],
67
- },
149
+ }),
68
150
  ]}
69
- />
151
+ >
152
+ ...
153
+ </Editor.Root>;
70
154
  ```
71
155
 
72
- > **Note:** The order of the groups and the order of commands within each group determine how they are displayed in the editor.
156
+ > The order of the groups and commands determines how they are displayed in the editor.
157
+
158
+ #### Available Blocks
159
+
160
+ Import pre-built blocks from `@maily-to/core/blocks`:
161
+
162
+ **Typography:** `text`, `heading1`, `heading2`, `heading3`, `blockquote`, `footer`, `hardBreak`, `clearLine`
73
163
 
74
- #### Grouped Command Blocks with Subcommands
164
+ **Layout:** `spacer`, `divider`, `section`, `columns`, `repeat`, `htmlCodeBlock`
75
165
 
76
- Sometimes, you may want a single command to open a list of commands. For this, define a command with an `id` and a `commands` array. The `id` is used for the slash command query (for example, typing `/headers.` will show its subcommands).
166
+ **Content:** `button`, `image`, `inlineImage`, `linkCard`, `bulletList`, `orderedList`
167
+
168
+ #### Grouped Commands with Subcommands
169
+
170
+ Define a command with an `id` and a `commands` array to create nested menus. Typing `/headers.` will show the subcommands.
77
171
 
78
172
  ```tsx
79
- // omitting imports
80
- <Editor
173
+ <Editor.Root
81
174
  blocks={[
82
175
  {
83
176
  title: 'Formatting',
84
177
  commands: [
85
178
  {
86
179
  title: 'Headers',
87
- // The id is used to filter commands; e.g. `/headers.` shows these subcommands.
88
180
  id: 'headers',
89
181
  searchTerms: ['header', 'title'],
90
182
  commands: [
91
183
  {
92
184
  title: 'Heading 1',
93
- searchTerms: ['h1', 'heading1'],
185
+ searchTerms: ['h1'],
94
186
  command: ({ editor, range }) => {
95
- // Convert the current block to Heading 1.
187
+ editor
188
+ .chain()
189
+ .deleteRange(range)
190
+ .setHeading({ level: 1 })
191
+ .run();
96
192
  },
97
193
  },
98
- {
99
- title: 'Heading 2',
100
- searchTerms: ['h2', 'heading2'],
101
- command: ({ editor, range }) => {
102
- // Convert the current block to Heading 2.
103
- },
104
- },
105
- // Add more subcommands as needed.
106
194
  ],
107
195
  },
108
196
  ],
@@ -111,178 +199,207 @@ Sometimes, you may want a single command to open a list of commands. For this, d
111
199
  />
112
200
  ```
113
201
 
114
- In this setup, when the user types `/headers.`, the editor will display the available header subcommands.
115
-
116
- > **Note:** Currently it only supports one level of depth for subcommands.
202
+ > Currently supports one level of depth for subcommands.
117
203
 
118
204
  #### Custom Rendered Blocks
119
205
 
120
- To render a custom block, you can pass a `render` function to the block object. The `render` function will receive the editor instance as an argument. You can return `null` if you don't want to render anything based on the editor's state.
206
+ Pass a `render` function to return custom JSX. Return `null` to skip rendering based on editor state.
121
207
 
122
208
  ```tsx
123
- // omitting imports
124
- <Editor
125
- blocks={[
126
- {
127
- title: 'Custom Blocks',
128
- commands: [
129
- {
130
- title: 'Custom Block',
131
- searchTerms: ['custom'],
132
- render: (editor) => {
133
- return <div>Custom Block</div>;
134
- },
135
- },
136
- ],
137
- },
138
- ]}
139
- />
209
+ {
210
+ title: 'Custom Block',
211
+ searchTerms: ['custom'],
212
+ render: (editor) => {
213
+ return <div>Custom Block</div>;
214
+ },
215
+ }
140
216
  ```
141
217
 
142
218
  ### Variables
143
219
 
144
- By default, variables are required. You can make them optional by setting the `required` property to `false`. When a variable is optional and not provided, a placeholder will be displayed in its place.
145
-
146
- You can pass variables to the editor in two ways:
147
-
148
- 1. As an Array of Objects:
149
-
150
- For auto-suggestions of variables in the editor when you type `@`, pass the variables as an array of objects to the `variables` prop.
151
-
152
- ```tsx
153
- // (Omitted repeated imports)
154
- import { VariableExtension, getVariableSuggestions } from '@maily-to/core/extensions';
155
-
156
- <Editor
157
- extensions={[
158
- VariableExtension.configure({
159
- suggestion: getVariableSuggestions('@'),
160
- variables: [{
161
- name: 'currentTime',
162
- required: false,
163
- }],
164
- }),
165
- ]}
166
- />
167
- ```
168
-
169
- 2. As a Function:
170
-
171
- If the variables are dynamic and need to be generated based on the editor's state or other inputs, you can provide a function to the `variables` prop.
172
-
173
- ```tsx
174
- // (Omitted repeated imports)
175
- import { VariableExtension, getVariableSuggestions } from '@maily-to/core/extensions';
176
-
177
- <Editor
178
- extensions={[
179
- VariableExtension.configure({
180
- suggestion: getVariableSuggestions('@'),
181
- variables: ({ query, from, editor }) => {
182
- // magic goes here
183
- // query: the text after the trigger character
184
- // from: the context from where the variables are requested (repeat, variable)
185
- // editor: the editor instance
186
- if (from === 'repeat-variable') {
187
- // return variables for the Repeat block `each` key
188
- return [
189
- { name: 'notifications' },
190
- { name: 'comments' },
191
- ];
192
- }
193
-
194
- return [
195
- { name: 'currentDate' },
196
- { name: 'currentTime', required: false },
197
- {
198
- name: 'first_name',
199
- required: false,
200
- // if you want to hide the default value
201
- // input in the popover
202
- hideDefaultValue: true,
203
- },
204
- ];
205
- },
206
- }),
207
- ]}
208
- />
209
- ```
210
-
211
- > Keep it in mind that if you pass an array of variable object Maily will take care of the filtering based on the query. But if you pass a function you have to take care of the filtering.
212
-
213
- ### Extensions
220
+ Variables are dynamic placeholders (e.g. `{{name}}`) that get replaced at render time. Trigger the variable picker by typing the suggestion character (default `@`).
214
221
 
215
- Extensions are a way to extend the editor's functionality. You can add custom blocks, marks, or extend the editor's functionality using extensions.
222
+ #### Array of Variables
216
223
 
217
224
  ```tsx
218
- // (Omitted repeated imports)
219
- import { MailyKit, VariableExtension, getVariableSuggestions } from '@maily-to/core/extensions';
225
+ import { VariableExtension } from '@maily-to/core/extensions';
220
226
 
221
- <Editor
227
+ <Editor.Root
222
228
  extensions={[
223
- MailyKit.configure({
224
- // do disable the link card node
225
- linkCard: false,
226
- }),
227
- // it will extend the variable extension
228
- // and provide suggestions for variables
229
- VariableExtension.extend({
230
- addNodeView() {
231
- // now you can replace the default
232
- // VariableView with your custom view
233
- return ReactNodeViewRenderer(VariableView, {
234
- className: 'mly:relative mly:inline-block',
235
- as: 'div',
236
- });
237
- },
238
- }).configure({
239
- suggestion: getVariableSuggestions(variableTriggerCharacter),
229
+ VariableExtension.configure({
230
+ variables: [
231
+ { id: 'currentDate' },
232
+ { id: 'currentTime', required: false },
233
+ { id: 'first_name', required: false, hideDefaultValue: true },
234
+ ],
240
235
  }),
241
236
  ]}
242
- />
237
+ >
238
+ ...
239
+ </Editor.Root>;
243
240
  ```
244
241
 
245
- Or, you can add your own custom extensions, like shown below:
242
+ When passing an array, Maily handles query filtering automatically. A dynamic entry is appended when no exact match exists, allowing users to create variables on the fly.
246
243
 
247
- ```tsx
248
- // (Omitted repeated imports)
249
- import { CustomExtension } from './extensions/custom-extension';
244
+ #### Function-based Variables
250
245
 
251
- <Editor
252
- extensions={[
253
- CustomExtension.configure({
254
- // your configuration
255
- }),
256
- ]}
257
- />
246
+ For dynamic variables based on editor state, pass a function:
247
+
248
+ ```tsx
249
+ VariableExtension.configure({
250
+ variables: ({ query, editor }) => {
251
+ // You handle filtering yourself
252
+ return [{ id: 'notifications' }, { id: 'comments' }];
253
+ },
254
+ });
258
255
  ```
259
256
 
260
- ### Image Upload
257
+ ### Extensions
261
258
 
262
- To enable image upload, you need to pass the `ImageUploadExtension` extension to the editor. The `onImageUpload` function will be called when an image is being uploaded. You can use this function to upload the image to your server and return the URL.
259
+ Extensions extend the editor's functionality. All Maily extensions are included by default — use the `extensions` prop to add more or override existing ones.
263
260
 
264
261
  ```tsx
265
- // (Omitted repeated imports)
266
- import { ImageUploadExtension } from '@maily-to/core/extensions';
267
-
268
- <Editor
262
+ import {
263
+ VariableExtension,
264
+ ImageUploadExtension,
265
+ AIActions,
266
+ InlineSuggestion,
267
+ } from '@maily-to/core/extensions';
268
+
269
+ <Editor.Root
269
270
  extensions={[
271
+ VariableExtension.configure({ variables: [...] }),
270
272
  ImageUploadExtension.configure({
271
273
  onImageUpload: async (file) => {
272
- // upload the image to wherever you want
273
274
  const url = await uploadImage(file);
274
275
  return url;
275
276
  },
276
277
  }),
277
278
  ]}
278
- />
279
+ >
280
+ ...
281
+ </Editor.Root>
279
282
  ```
280
283
 
281
- See the [@maily-to/render](../render) package for more information on how to render the editor content to HTML.
284
+ #### Image Upload
282
285
 
283
- <br/>
286
+ Handle file drops and pastes with the `ImageUploadExtension`:
287
+
288
+ ```tsx
289
+ import { ImageUploadExtension } from '@maily-to/core/extensions';
290
+
291
+ ImageUploadExtension.configure({
292
+ onImageUpload: async (file, context) => {
293
+ // context.position — insertion position in the document
294
+ // context.removeImage() — call to remove the placeholder on failure
295
+ const url = await uploadImage(file);
296
+ return url;
297
+ },
298
+ onImageUploadError: (error, file, context) => {
299
+ console.error('Upload failed:', error);
300
+ context.removeImage();
301
+ },
302
+ });
303
+ ```
304
+
305
+ Supports `image/jpeg`, `image/png`, `image/gif`, `image/webp`, and `image/svg+xml`.
306
+
307
+ #### AI Actions
308
+
309
+ Add AI-powered content transformations (rewriting, summarizing, expanding):
310
+
311
+ ```tsx
312
+ import { AIActions } from '@maily-to/core/extensions';
313
+ import type {
314
+ AIActionsOptions,
315
+ AIActionsTransformParams,
316
+ } from '@maily-to/core/extensions';
317
+ ```
318
+
319
+ #### Inline Suggestions
320
+
321
+ Add ghost-text autocomplete suggestions (like AI code completion):
322
+
323
+ ```tsx
324
+ import { InlineSuggestion } from '@maily-to/core/extensions';
325
+ import type { InlineSuggestionOptions } from '@maily-to/core/extensions';
326
+ ```
327
+
328
+ ### Theming
329
+
330
+ Customize the editor appearance through the `theme` prop on `Editor.Root`. Theme values are applied as CSS custom variables.
331
+
332
+ ```tsx
333
+ <Editor.Root
334
+ theme={{
335
+ container: {
336
+ backgroundColor: '#f9fafb',
337
+ maxWidth: 640,
338
+ borderRadius: 8,
339
+ borderWidth: 1,
340
+ borderColor: '#e5e7eb',
341
+ paddingTop: 16,
342
+ paddingRight: 16,
343
+ paddingBottom: 16,
344
+ paddingLeft: 16,
345
+ },
346
+ body: {
347
+ backgroundColor: '#ffffff',
348
+ paddingTop: 24,
349
+ paddingRight: 24,
350
+ paddingBottom: 24,
351
+ paddingLeft: 24,
352
+ },
353
+ button: {
354
+ backgroundColor: '#4f46e5',
355
+ color: '#ffffff',
356
+ },
357
+ link: {
358
+ color: '#2563eb',
359
+ },
360
+ font: {
361
+ fontFamily: 'Inter',
362
+ fallbackFontFamily: 'sans-serif',
363
+ webFont: {
364
+ format: 'woff2',
365
+ url: 'https://cdn.usemaily.com/fonts/v0/inter.woff2',
366
+ },
367
+ },
368
+ }}
369
+ >
370
+ ...
371
+ </Editor.Root>
372
+ ```
373
+
374
+ ## Text Direction
375
+
376
+ The editor supports LTR and RTL text directions. Control it via props on `Editor.Root`:
377
+
378
+ ```tsx
379
+ // Uncontrolled (editor manages state)
380
+ <Editor.Root defaultTextDirection="ltr">
381
+
382
+ // Controlled
383
+ <Editor.Root
384
+ textDirection={direction}
385
+ onTextDirectionChange={setDirection}
386
+ >
387
+ ```
388
+
389
+ Use `Toolbar.Direction` to let users toggle direction from the toolbar.
390
+
391
+ ## Entry Points
392
+
393
+ | Import path | Contents |
394
+ | --------------------------- | ----------------------------------------------------------------------------------------------------------- |
395
+ | `@maily-to/core` | `Editor`, `Toolbar`, `useEditorRootContext`, `useEditorVariables`, `filterVariableSuggestions`, theme types |
396
+ | `@maily-to/core/blocks` | Pre-built slash command block items and types |
397
+ | `@maily-to/core/extensions` | All Tiptap extensions and their option/storage types |
398
+ | `@maily-to/core/style.css` | Required CSS stylesheet |
399
+
400
+ See the [@maily-to/render](../render) package for converting editor content to HTML email templates.
284
401
 
285
- ## Sponsors
402
+ ### Sponsors
286
403
 
287
404
  Sponsorship at any level is appreciated and encouraged. If you built a paid product using Maily, consider one of the [sponsorship tiers](https://github.com/sponsors/arikchakma).
288
405
 
@@ -309,6 +426,6 @@ Sponsorship at any level is appreciated and encouraged. If you built a paid prod
309
426
 
310
427
  <br/>
311
428
 
312
- ## License
429
+ ### License
313
430
 
314
- MIT &copy; [Arik Chakma](https://twitter.com/imarikchakma)
431
+ MIT &copy; [Arik Chakma](https://x.com/imarikchakma)
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/blocks.ts","../../src/blocks/button.tsx","../../src/blocks/code.tsx","../../src/blocks/image.tsx","../../src/blocks/layout.tsx","../../src/blocks/list.tsx","../../src/blocks/typography.tsx"],"sourcesContent":["export * from './blocks/button';\nexport * from './blocks/code';\nexport * from './blocks/image';\nexport * from './blocks/layout';\nexport * from './blocks/list';\nexport * from './blocks/types';\nexport * from './blocks/typography';\n","import type { BlockItem } from './types';\nimport { MousePointer, ArrowUpRightSquare } from 'lucide-react';\n\nexport const button: BlockItem = {\n title: 'Button',\n description: 'Add a call to action button to email.',\n searchTerms: ['link', 'button', 'cta'],\n icon: <MousePointer className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n // @ts-ignore\n editor.chain().focus().deleteRange(range).setButton().run();\n },\n};\n\nexport const linkCard: BlockItem = {\n title: 'Link Card',\n description: 'Add a link card to email.',\n searchTerms: ['link', 'button', 'image'],\n icon: <ArrowUpRightSquare className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n // @ts-ignore\n editor.chain().focus().deleteRange(range).setLinkCard().run();\n },\n render: (editor) => {\n return editor.extensionManager.extensions.findIndex(\n (ext) => ext.name === 'linkCard'\n ) === -1\n ? null\n : true;\n },\n};\n","import { CodeXmlIcon } from 'lucide-react';\nimport { BlockItem } from './types';\n\nexport const htmlCodeBlock: BlockItem = {\n title: 'Custom HTML',\n description: 'Insert a custom HTML block',\n searchTerms: ['html', 'code', 'custom'],\n icon: <CodeXmlIcon className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n // @ts-ignore\n editor\n .chain()\n .focus()\n .deleteRange(range)\n // @ts-ignore\n .setHtmlCodeBlock({ language: 'html' })\n .run();\n },\n};\n","import { NodeSelection, Selection, TextSelection } from '@tiptap/pm/state';\nimport type { BlockItem } from './types';\nimport { ImageIcon } from 'lucide-react';\n\nexport const image: BlockItem = {\n title: 'Image',\n description: 'Full width image',\n searchTerms: ['image'],\n icon: <ImageIcon className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n // @ts-ignore\n editor.chain().focus().deleteRange(range).setImage({ src: '' }).run();\n },\n};\n\nexport const logo: BlockItem = {\n title: 'Logo',\n description: 'Add your brand logo',\n searchTerms: ['image', 'logo'],\n icon: <ImageIcon className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n // @ts-ignore\n editor.chain().focus().deleteRange(range).setLogoImage({ src: '' }).run();\n },\n};\n\nexport const inlineImage: BlockItem = {\n title: 'Inline Image',\n description: 'Inline image',\n searchTerms: ['image', 'inline'],\n icon: <ImageIcon className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n // @ts-ignore\n editor\n .chain()\n .focus()\n .deleteRange(range)\n // @ts-ignore\n .setInlineImage({\n src: 'https://maily.to/brand/logo.png',\n })\n // @ts-ignore\n .command((props) => {\n const { tr, state, view, editor } = props;\n const { from } = range;\n\n const node = state.doc.nodeAt(from);\n if (!node) {\n return false;\n }\n\n const selection = TextSelection.create(\n tr.doc,\n from,\n from + node.nodeSize\n );\n tr.setSelection(selection);\n return true;\n })\n .run();\n },\n};\n","import type { BlockItem } from './types';\nimport {\n ColumnsIcon,\n Repeat2,\n MoveVertical,\n RectangleHorizontal,\n Minus,\n} from 'lucide-react';\n\nexport const columns: BlockItem = {\n title: 'Columns',\n description: 'Add columns to email.',\n searchTerms: ['layout', 'columns'],\n icon: <ColumnsIcon className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n // @ts-ignore\n editor\n .chain()\n .focus()\n .deleteRange(range)\n // @ts-ignore\n .setColumns()\n .focus(editor.state.selection.head - 2)\n .run();\n },\n};\n\nexport const section: BlockItem = {\n title: 'Section',\n description: 'Add a section to email.',\n searchTerms: ['layout', 'section'],\n icon: <RectangleHorizontal className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n // @ts-ignore\n editor.chain().focus().deleteRange(range).setSection().run();\n },\n};\n\nexport const repeat: BlockItem = {\n title: 'Repeat',\n description: 'Loop over an array of items.',\n searchTerms: ['repeat', 'for', 'loop'],\n icon: <Repeat2 className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n // @ts-ignore\n editor.chain().focus().deleteRange(range).setRepeat().run();\n },\n};\n\nexport const spacer: BlockItem = {\n title: 'Spacer',\n description: 'Add space between blocks.',\n searchTerms: ['space', 'gap', 'divider'],\n icon: <MoveVertical className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n // @ts-ignore\n editor.chain().focus().deleteRange(range).setSpacer({ height: 'sm' }).run();\n },\n};\n\nexport const divider: BlockItem = {\n title: 'Divider',\n description: 'Add a horizontal divider.',\n searchTerms: ['divider', 'line'],\n icon: <Minus className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n // @ts-ignore\n editor.chain().focus().deleteRange(range).setHorizontalRule().run();\n },\n};\n","import type { BlockItem } from './types';\nimport { List, ListOrdered } from 'lucide-react';\n\nexport const bulletList: BlockItem = {\n title: 'Bullet List',\n description: 'Create a simple bullet list.',\n searchTerms: ['unordered', 'point'],\n icon: <List className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n // @ts-ignore\n editor.chain().focus().deleteRange(range).toggleBulletList().run();\n },\n};\n\nexport const orderedList: BlockItem = {\n title: 'Numbered List',\n description: 'Create a list with numbering.',\n searchTerms: ['ordered'],\n icon: <ListOrdered className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n // @ts-ignore\n editor.chain().focus().deleteRange(range).toggleOrderedList().run();\n },\n};\n","import type { BlockItem } from './types';\nimport {\n Text,\n Heading1,\n Heading2,\n Heading3,\n DivideIcon,\n TextQuote,\n FootprintsIcon,\n EraserIcon,\n} from 'lucide-react';\n\nexport const text: BlockItem = {\n title: 'Text',\n description: 'Just start typing with plain text.',\n searchTerms: ['p', 'paragraph'],\n icon: <Text className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n editor\n .chain()\n .focus()\n .deleteRange(range)\n .toggleNode('paragraph', 'paragraph')\n .run();\n },\n};\n\nexport const heading1: BlockItem = {\n title: 'Heading 1',\n description: 'Big heading.',\n searchTerms: ['h1', 'title', 'big', 'large'],\n icon: <Heading1 className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n editor\n .chain()\n .focus()\n .deleteRange(range)\n .setNode('heading', { level: 1 })\n .run();\n },\n};\n\nexport const heading2: BlockItem = {\n title: 'Heading 2',\n description: 'Medium heading.',\n searchTerms: ['h2', 'subtitle', 'medium'],\n icon: <Heading2 className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n editor\n .chain()\n .focus()\n .deleteRange(range)\n .setNode('heading', { level: 2 })\n .run();\n },\n};\n\nexport const heading3: BlockItem = {\n title: 'Heading 3',\n description: 'Small heading.',\n searchTerms: ['h3', 'subtitle', 'small'],\n icon: <Heading3 className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n editor\n .chain()\n .focus()\n .deleteRange(range)\n .setNode('heading', { level: 3 })\n .run();\n },\n};\n\nexport const hardBreak: BlockItem = {\n title: 'Hard Break',\n description: 'Add a break between lines.',\n searchTerms: ['break', 'line'],\n icon: <DivideIcon className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n // @ts-ignore\n editor.chain().focus().deleteRange(range).setHardBreak().run();\n },\n};\n\nexport const blockquote: BlockItem = {\n title: 'Blockquote',\n description: 'Add blockquote.',\n searchTerms: ['quote', 'blockquote'],\n icon: <TextQuote className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n // @ts-ignore\n editor.chain().focus().deleteRange(range).toggleBlockquote().run();\n },\n};\n\nexport const footer: BlockItem = {\n title: 'Footer',\n description: 'Add a footer text to email.',\n searchTerms: ['footer', 'text'],\n icon: <FootprintsIcon className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n // @ts-ignore\n editor.chain().focus().deleteRange(range).setFooter().run();\n },\n};\n\nexport const clearLine: BlockItem = {\n title: 'Clear Line',\n description: 'Clear the current line.',\n searchTerms: ['clear', 'line'],\n icon: <EraserIcon className=\"mly:h-4 mly:w-4\" />,\n command: ({ editor, range }) => {\n // @ts-ignore\n editor.chain().focus().selectParentNode().deleteSelection().run();\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,0BAAiD;AAMzC;AAJD,IAAM,SAAoB;AAAA,EAC/B,OAAO;AAAA,EACP,aAAa;AAAA,EACb,aAAa,CAAC,QAAQ,UAAU,KAAK;AAAA,EACrC,MAAM,4CAAC,oCAAa,WAAU,mBAAkB;AAAA,EAChD,SAAS,CAAC,EAAE,QAAQ,MAAM,MAAM;AAE9B,WAAO,MAAM,EAAE,MAAM,EAAE,YAAY,KAAK,EAAE,UAAU,EAAE,IAAI;AAAA,EAC5D;AACF;AAEO,IAAM,WAAsB;AAAA,EACjC,OAAO;AAAA,EACP,aAAa;AAAA,EACb,aAAa,CAAC,QAAQ,UAAU,OAAO;AAAA,EACvC,MAAM,4CAAC,0CAAmB,WAAU,mBAAkB;AAAA,EACtD,SAAS,CAAC,EAAE,QAAQ,MAAM,MAAM;AAE9B,WAAO,MAAM,EAAE,MAAM,EAAE,YAAY,KAAK,EAAE,YAAY,EAAE,IAAI;AAAA,EAC9D;AAAA,EACA,QAAQ,CAAC,WAAW;AAClB,WAAO,OAAO,iBAAiB,WAAW;AAAA,MACxC,CAAC,QAAQ,IAAI,SAAS;AAAA,IACxB,MAAM,KACF,OACA;AAAA,EACN;AACF;;;AC9BA,IAAAA,uBAA4B;AAOpB,IAAAC,sBAAA;AA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import_lucide_react","import_jsx_runtime","import_lucide_react","import_jsx_runtime","import_lucide_react","import_jsx_runtime"]}