@daisychainapp/maily-to-core 0.1.3 → 0.2.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.
- package/dist/blocks/index.cjs +305 -0
- package/dist/blocks/index.cjs.map +1 -0
- package/dist/blocks/index.d.cts +59 -0
- package/dist/blocks/index.d.ts +3 -1
- package/dist/blocks/index.mjs +40 -26
- package/dist/blocks/index.mjs.map +1 -1
- package/dist/extensions/index.cjs +6079 -0
- package/dist/extensions/index.cjs.map +1 -0
- package/dist/extensions/index.d.cts +425 -0
- package/dist/extensions/index.d.ts +237 -144
- package/dist/extensions/index.mjs +3912 -3105
- package/dist/extensions/index.mjs.map +1 -1
- package/dist/index.cjs +9057 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +2358 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.cts +61 -0
- package/dist/index.d.ts +1 -22
- package/dist/index.mjs +5575 -4864
- package/dist/index.mjs.map +1 -1
- package/package.json +128 -50
- package/readme.md +91 -33
|
@@ -1,17 +1,50 @@
|
|
|
1
1
|
import * as _tiptap_core from '@tiptap/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Editor, Extension, Range, Node } from '@tiptap/core';
|
|
3
|
+
import { ColorOptions } from '@tiptap/extension-color';
|
|
4
|
+
import * as _tiptap_extension_horizontal_rule from '@tiptap/extension-horizontal-rule';
|
|
5
|
+
import { Plugin, PluginKey } from '@tiptap/pm/state';
|
|
3
6
|
import * as _tiptap_extension_link from '@tiptap/extension-link';
|
|
4
7
|
import { LinkOptions } from '@tiptap/extension-link';
|
|
8
|
+
import * as _tiptap_extension_placeholder from '@tiptap/extension-placeholder';
|
|
5
9
|
import { SuggestionOptions } from '@tiptap/suggestion';
|
|
6
|
-
import { ColorOptions } from '@tiptap/extension-color';
|
|
7
|
-
import * as _tiptap_extension_horizontal_rule from '@tiptap/extension-horizontal-rule';
|
|
8
10
|
import * as _tiptap_react from '@tiptap/react';
|
|
9
11
|
import * as _tiptap_extension_image from '@tiptap/extension-image';
|
|
10
12
|
import { Node as Node$1 } from '@tiptap/pm/model';
|
|
11
|
-
import { PluginKey } from '@tiptap/pm/state';
|
|
12
13
|
import * as react from 'react';
|
|
13
|
-
import
|
|
14
|
-
|
|
14
|
+
import * as _tiptap_extension_code_block_lowlight from '@tiptap/extension-code-block-lowlight';
|
|
15
|
+
|
|
16
|
+
type ColorStorage = {
|
|
17
|
+
/**
|
|
18
|
+
* Last 5 used colors
|
|
19
|
+
*/
|
|
20
|
+
colors: Set<string>;
|
|
21
|
+
};
|
|
22
|
+
declare const Color: _tiptap_core.Extension<ColorOptions, ColorStorage>;
|
|
23
|
+
|
|
24
|
+
declare const HorizontalRule: _tiptap_core.Node<_tiptap_extension_horizontal_rule.HorizontalRuleOptions, any>;
|
|
25
|
+
|
|
26
|
+
type ImageUploadPluginOptions = {
|
|
27
|
+
editor: Editor;
|
|
28
|
+
/**
|
|
29
|
+
* Allows you to define a list of allowed mime types for dropped or pasted images.
|
|
30
|
+
* @default ['image/jpeg', 'image/png', 'image/gif', 'image/webp', 'image/svg+xml']
|
|
31
|
+
*/
|
|
32
|
+
allowedMimeTypes?: string[];
|
|
33
|
+
/**
|
|
34
|
+
* The onImageUpload callback that is called when an image is dropped or pasted.
|
|
35
|
+
* @param file the image file
|
|
36
|
+
* @returns Returns the image URL as a string.
|
|
37
|
+
*/
|
|
38
|
+
onImageUpload?: (file: Blob) => Promise<string>;
|
|
39
|
+
};
|
|
40
|
+
declare function ImageUploadPlugin(options: ImageUploadPluginOptions): Plugin<any>;
|
|
41
|
+
|
|
42
|
+
type ImageUploadOptions = Omit<ImageUploadPluginOptions, 'editor'> & {};
|
|
43
|
+
type ImageUploadStorage = {
|
|
44
|
+
placeholderImages: Set<string>;
|
|
45
|
+
};
|
|
46
|
+
declare const ImageUploadExtension: Extension<Omit<ImageUploadPluginOptions, "editor">, any>;
|
|
47
|
+
declare function useImageUploadOptions(editor: Editor): ImageUploadOptions;
|
|
15
48
|
|
|
16
49
|
declare module '@tiptap/core' {
|
|
17
50
|
interface Commands<ReturnType> {
|
|
@@ -36,6 +69,8 @@ type MailyKitOptions = {
|
|
|
36
69
|
};
|
|
37
70
|
declare const MailyKit: Extension<MailyKitOptions, any>;
|
|
38
71
|
|
|
72
|
+
declare const PlaceholderExtension: _tiptap_core.Extension<_tiptap_extension_placeholder.PlaceholderOptions, any>;
|
|
73
|
+
|
|
39
74
|
type SlashCommandOptions = {
|
|
40
75
|
suggestion: Omit<SuggestionOptions, 'editor'>;
|
|
41
76
|
};
|
|
@@ -72,62 +107,74 @@ type BlockGroupItem = {
|
|
|
72
107
|
|
|
73
108
|
declare function getSlashCommandSuggestions(groups?: BlockGroupItem[]): Omit<SuggestionOptions, 'editor'>;
|
|
74
109
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
interface FooterOptions {
|
|
86
|
-
HTMLAttributes: Record<string, any>;
|
|
87
|
-
}
|
|
88
|
-
declare module '@tiptap/core' {
|
|
89
|
-
interface Commands<ReturnType> {
|
|
90
|
-
footer: {
|
|
91
|
-
setFooter: () => ReturnType;
|
|
92
|
-
};
|
|
93
|
-
}
|
|
110
|
+
declare const allowedLogoSize: readonly ["sm", "md", "lg"];
|
|
111
|
+
type AllowedLogoSize = (typeof allowedLogoSize)[number];
|
|
112
|
+
declare const allowedLogoAlignment: readonly ["left", "center", "right"];
|
|
113
|
+
type AllowedLogoAlignment = (typeof allowedLogoAlignment)[number];
|
|
114
|
+
interface LogoOptions {
|
|
115
|
+
src: string;
|
|
116
|
+
alt?: string;
|
|
117
|
+
title?: string;
|
|
118
|
+
size?: AllowedLogoSize;
|
|
119
|
+
alignment?: AllowedLogoAlignment;
|
|
94
120
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
121
|
+
interface LogoAttributes {
|
|
122
|
+
src?: string;
|
|
123
|
+
size?: AllowedLogoSize;
|
|
124
|
+
alignment?: AllowedLogoAlignment;
|
|
99
125
|
showIfKey: string;
|
|
100
|
-
|
|
126
|
+
isSrcVariable?: boolean;
|
|
101
127
|
}
|
|
102
128
|
declare module '@tiptap/core' {
|
|
103
129
|
interface Commands<ReturnType> {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}) => ReturnType;
|
|
108
|
-
setSpacerSize: (height: number) => ReturnType;
|
|
109
|
-
setSpacerShowIfKey: (showIfKey: string) => ReturnType;
|
|
110
|
-
unsetSpacer: () => ReturnType;
|
|
130
|
+
logo: {
|
|
131
|
+
setLogoImage: (options: LogoOptions) => ReturnType;
|
|
132
|
+
setLogoAttributes: (attributes: Partial<LogoAttributes>) => ReturnType;
|
|
111
133
|
};
|
|
112
134
|
}
|
|
113
135
|
}
|
|
114
|
-
declare const
|
|
115
|
-
declare const
|
|
136
|
+
declare const DEFAULT_LOGO_SIZE: AllowedLogoSize;
|
|
137
|
+
declare const logoSizes: Record<AllowedLogoSize, string>;
|
|
138
|
+
declare const LogoExtension: _tiptap_react.Node<_tiptap_extension_image.ImageOptions, any>;
|
|
116
139
|
|
|
117
|
-
declare const
|
|
118
|
-
|
|
140
|
+
declare const DEFAULT_BUTTON_ALIGNMENT: AllowedLogoAlignment;
|
|
141
|
+
declare const DEFAULT_BUTTON_VARIANT: AllowedButtonVariant;
|
|
142
|
+
declare const DEFAULT_BUTTON_BORDER_RADIUS: AllowedButtonBorderRadius;
|
|
143
|
+
declare const DEFAULT_BUTTON_BACKGROUND_COLOR = "#000000";
|
|
144
|
+
declare const DEFAULT_BUTTON_TEXT_COLOR = "#ffffff";
|
|
145
|
+
declare const DEFAULT_BUTTON_PADDING_TOP = 10;
|
|
146
|
+
declare const DEFAULT_BUTTON_PADDING_RIGHT = 32;
|
|
147
|
+
declare const DEFAULT_BUTTON_PADDING_BOTTOM = 10;
|
|
148
|
+
declare const DEFAULT_BUTTON_PADDING_LEFT = 32;
|
|
149
|
+
declare const allowedButtonVariant: readonly ["filled", "outline"];
|
|
150
|
+
type AllowedButtonVariant = (typeof allowedButtonVariant)[number];
|
|
151
|
+
declare const allowedButtonBorderRadius: readonly ["sharp", "smooth", "round"];
|
|
152
|
+
type AllowedButtonBorderRadius = (typeof allowedButtonBorderRadius)[number];
|
|
153
|
+
type ButtonAttributes = {
|
|
154
|
+
text: string;
|
|
155
|
+
isTextVariable: boolean;
|
|
156
|
+
url: string;
|
|
157
|
+
isUrlVariable: boolean;
|
|
158
|
+
alignment: AllowedLogoAlignment;
|
|
159
|
+
variant: AllowedButtonVariant;
|
|
160
|
+
borderRadius: AllowedButtonBorderRadius;
|
|
161
|
+
buttonColor: string;
|
|
162
|
+
textColor: string;
|
|
119
163
|
showIfKey: string;
|
|
120
|
-
|
|
121
|
-
|
|
164
|
+
paddingTop: number;
|
|
165
|
+
paddingRight: number;
|
|
166
|
+
paddingBottom: number;
|
|
167
|
+
paddingLeft: number;
|
|
168
|
+
};
|
|
122
169
|
declare module '@tiptap/core' {
|
|
123
170
|
interface Commands<ReturnType> {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
171
|
+
button: {
|
|
172
|
+
setButton: () => ReturnType;
|
|
173
|
+
updateButton: (attrs: Partial<ButtonAttributes>) => ReturnType;
|
|
127
174
|
};
|
|
128
175
|
}
|
|
129
176
|
}
|
|
130
|
-
declare const
|
|
177
|
+
declare const ButtonExtension: Node<any, any>;
|
|
131
178
|
|
|
132
179
|
declare const DEFAULT_COLUMN_WIDTH = "auto";
|
|
133
180
|
type AllowedColumnVerticalAlign = 'top' | 'middle' | 'bottom';
|
|
@@ -154,6 +201,59 @@ declare module '@tiptap/core' {
|
|
|
154
201
|
}
|
|
155
202
|
declare const ColumnExtension: Node<any, any>;
|
|
156
203
|
|
|
204
|
+
declare const DEFAULT_COLUMNS_GAP = 8;
|
|
205
|
+
interface ColumnsAttributes {
|
|
206
|
+
showIfKey: string;
|
|
207
|
+
gap: number;
|
|
208
|
+
}
|
|
209
|
+
declare module '@tiptap/core' {
|
|
210
|
+
interface Commands<ReturnType> {
|
|
211
|
+
columns: {
|
|
212
|
+
setColumns: () => ReturnType;
|
|
213
|
+
updateColumns: (attrs: Partial<ColumnsAttributes>) => ReturnType;
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
declare const ColumnsExtension: Node<any, any>;
|
|
218
|
+
|
|
219
|
+
interface FooterOptions {
|
|
220
|
+
HTMLAttributes: Record<string, any>;
|
|
221
|
+
}
|
|
222
|
+
declare module '@tiptap/core' {
|
|
223
|
+
interface Commands<ReturnType> {
|
|
224
|
+
footer: {
|
|
225
|
+
setFooter: () => ReturnType;
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
declare const Footer: Node<FooterOptions, any>;
|
|
230
|
+
|
|
231
|
+
declare const ImageExtension: _tiptap_react.Node<_tiptap_extension_image.ImageOptions, any>;
|
|
232
|
+
|
|
233
|
+
declare module '@tiptap/core' {
|
|
234
|
+
interface Commands<ReturnType> {
|
|
235
|
+
customLink: {
|
|
236
|
+
setIsUrlVariable: (isUrlVariable: boolean) => ReturnType;
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
declare const LinkExtension: _tiptap_core.Mark<_tiptap_extension_link.LinkOptions, any>;
|
|
241
|
+
|
|
242
|
+
type RepeatAttributes = {
|
|
243
|
+
each: string;
|
|
244
|
+
isUpdatingKey: boolean;
|
|
245
|
+
showIfKey: string;
|
|
246
|
+
};
|
|
247
|
+
declare module '@tiptap/core' {
|
|
248
|
+
interface Commands<ReturnType> {
|
|
249
|
+
repeat: {
|
|
250
|
+
setRepeat: () => ReturnType;
|
|
251
|
+
updateRepeat: (attrs: Partial<RepeatAttributes>) => ReturnType;
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
declare const RepeatExtension: Node<any, any>;
|
|
256
|
+
|
|
157
257
|
declare const DEFAULT_SECTION_BACKGROUND_COLOR = "#f7f7f7";
|
|
158
258
|
declare const DEFAULT_SECTION_ALIGN = "left";
|
|
159
259
|
declare const DEFAULT_SECTION_BORDER_WIDTH = 2;
|
|
@@ -163,10 +263,10 @@ declare const DEFAULT_SECTION_MARGIN_TOP = 0;
|
|
|
163
263
|
declare const DEFAULT_SECTION_MARGIN_RIGHT = 0;
|
|
164
264
|
declare const DEFAULT_SECTION_MARGIN_BOTTOM = 0;
|
|
165
265
|
declare const DEFAULT_SECTION_MARGIN_LEFT = 0;
|
|
166
|
-
declare const DEFAULT_SECTION_PADDING_TOP =
|
|
167
|
-
declare const DEFAULT_SECTION_PADDING_RIGHT =
|
|
168
|
-
declare const DEFAULT_SECTION_PADDING_BOTTOM =
|
|
169
|
-
declare const DEFAULT_SECTION_PADDING_LEFT =
|
|
266
|
+
declare const DEFAULT_SECTION_PADDING_TOP = 0;
|
|
267
|
+
declare const DEFAULT_SECTION_PADDING_RIGHT = 0;
|
|
268
|
+
declare const DEFAULT_SECTION_PADDING_BOTTOM = 0;
|
|
269
|
+
declare const DEFAULT_SECTION_PADDING_LEFT = 0;
|
|
170
270
|
declare const DEFAULT_SECTION_SHOW_IF_KEY: null;
|
|
171
271
|
type SectionAttributes = {
|
|
172
272
|
borderRadius: number;
|
|
@@ -194,100 +294,36 @@ declare module '@tiptap/core' {
|
|
|
194
294
|
}
|
|
195
295
|
declare const SectionExtension: Node<any, any>;
|
|
196
296
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
isUpdatingKey: boolean;
|
|
200
|
-
showIfKey: string;
|
|
201
|
-
};
|
|
202
|
-
declare module '@tiptap/core' {
|
|
203
|
-
interface Commands<ReturnType> {
|
|
204
|
-
repeat: {
|
|
205
|
-
setRepeat: () => ReturnType;
|
|
206
|
-
updateRepeat: (attrs: Partial<RepeatAttributes>) => ReturnType;
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
declare const RepeatExtension: Node<any, any>;
|
|
211
|
-
|
|
212
|
-
declare const allowedLogoSize: readonly ["sm", "md", "lg"];
|
|
213
|
-
type AllowedLogoSize = (typeof allowedLogoSize)[number];
|
|
214
|
-
declare const allowedLogoAlignment: readonly ["left", "center", "right"];
|
|
215
|
-
type AllowedLogoAlignment = (typeof allowedLogoAlignment)[number];
|
|
216
|
-
interface LogoOptions {
|
|
217
|
-
src: string;
|
|
218
|
-
alt?: string;
|
|
219
|
-
title?: string;
|
|
220
|
-
size?: AllowedLogoSize;
|
|
221
|
-
alignment?: AllowedLogoAlignment;
|
|
222
|
-
}
|
|
223
|
-
interface LogoAttributes {
|
|
224
|
-
src?: string;
|
|
225
|
-
size?: AllowedLogoSize;
|
|
226
|
-
alignment?: AllowedLogoAlignment;
|
|
297
|
+
interface SpacerOptions {
|
|
298
|
+
height: number;
|
|
227
299
|
showIfKey: string;
|
|
228
|
-
|
|
300
|
+
HTMLAttributes: Record<string, any>;
|
|
229
301
|
}
|
|
230
302
|
declare module '@tiptap/core' {
|
|
231
303
|
interface Commands<ReturnType> {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
304
|
+
spacer: {
|
|
305
|
+
setSpacer: (options: {
|
|
306
|
+
height: number;
|
|
307
|
+
}) => ReturnType;
|
|
308
|
+
setSpacerSize: (height: number) => ReturnType;
|
|
309
|
+
setSpacerShowIfKey: (showIfKey: string) => ReturnType;
|
|
310
|
+
unsetSpacer: () => ReturnType;
|
|
235
311
|
};
|
|
236
312
|
}
|
|
237
313
|
}
|
|
238
|
-
declare const
|
|
239
|
-
declare const
|
|
240
|
-
declare const LogoExtension: _tiptap_react.Node<_tiptap_extension_image.ImageOptions, any>;
|
|
314
|
+
declare const DEFAULT_SPACER_HEIGHT = 8;
|
|
315
|
+
declare const Spacer: Node<SpacerOptions, any>;
|
|
241
316
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
declare const DEFAULT_BUTTON_BACKGROUND_COLOR = "#000000";
|
|
246
|
-
declare const DEFAULT_BUTTON_TEXT_COLOR = "#ffffff";
|
|
247
|
-
declare const DEFAULT_BUTTON_PADDING_TOP = 10;
|
|
248
|
-
declare const DEFAULT_BUTTON_PADDING_RIGHT = 32;
|
|
249
|
-
declare const DEFAULT_BUTTON_PADDING_BOTTOM = 10;
|
|
250
|
-
declare const DEFAULT_BUTTON_PADDING_LEFT = 32;
|
|
251
|
-
declare const allowedButtonVariant: readonly ["filled", "outline"];
|
|
252
|
-
type AllowedButtonVariant = (typeof allowedButtonVariant)[number];
|
|
253
|
-
declare const allowedButtonBorderRadius: readonly ["sharp", "smooth", "round"];
|
|
254
|
-
type AllowedButtonBorderRadius = (typeof allowedButtonBorderRadius)[number];
|
|
255
|
-
type ButtonAttributes = {
|
|
256
|
-
text: string;
|
|
257
|
-
isTextVariable: boolean;
|
|
258
|
-
url: string;
|
|
259
|
-
isUrlVariable: boolean;
|
|
260
|
-
alignment: AllowedLogoAlignment;
|
|
261
|
-
variant: AllowedButtonVariant;
|
|
262
|
-
borderRadius: AllowedButtonBorderRadius;
|
|
263
|
-
buttonColor: string;
|
|
264
|
-
textColor: string;
|
|
265
|
-
showIfKey: string;
|
|
266
|
-
paddingTop: number;
|
|
267
|
-
paddingRight: number;
|
|
268
|
-
paddingBottom: number;
|
|
269
|
-
paddingLeft: number;
|
|
317
|
+
type VariableSuggestionsPopoverProps = {
|
|
318
|
+
items: Variable[];
|
|
319
|
+
onSelectItem: (item: Variable) => void;
|
|
270
320
|
};
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
declare const ButtonExtension: Node<any, any>;
|
|
280
|
-
|
|
281
|
-
declare const ImageExtension: _tiptap_react.Node<_tiptap_extension_image.ImageOptions, any>;
|
|
282
|
-
|
|
283
|
-
declare module '@tiptap/core' {
|
|
284
|
-
interface Commands<ReturnType> {
|
|
285
|
-
customLink: {
|
|
286
|
-
setIsUrlVariable: (isUrlVariable: boolean) => ReturnType;
|
|
287
|
-
};
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
declare const LinkExtension: _tiptap_core.Mark<_tiptap_extension_link.LinkOptions, any>;
|
|
321
|
+
type VariableSuggestionsPopoverRef = {
|
|
322
|
+
moveUp: () => void;
|
|
323
|
+
moveDown: () => void;
|
|
324
|
+
select: () => void;
|
|
325
|
+
};
|
|
326
|
+
type VariableSuggestionsPopoverType = React.ForwardRefExoticComponent<VariableSuggestionsPopoverProps & React.RefAttributes<VariableSuggestionsPopoverRef>>;
|
|
291
327
|
|
|
292
328
|
type Variable = {
|
|
293
329
|
name: string;
|
|
@@ -301,15 +337,38 @@ type VariableFunctionOptions = {
|
|
|
301
337
|
};
|
|
302
338
|
type VariablesFunction = (opts: VariableFunctionOptions) => Array<Variable>;
|
|
303
339
|
type Variables = Array<Variable> | VariablesFunction;
|
|
304
|
-
|
|
340
|
+
declare const DEFAULT_VARIABLE_TRIGGER_CHAR = "@";
|
|
341
|
+
declare const DEFAULT_VARIABLES: Variables;
|
|
342
|
+
declare const DEFAULT_RENDER_VARIABLE_FUNCTION: RenderVariableFunction;
|
|
343
|
+
declare const DEFAULT_VARIABLE_SUGGESTION_POPOVER: VariableSuggestionsPopoverType;
|
|
344
|
+
type RenderVariableOptions = {
|
|
345
|
+
variable: Variable;
|
|
346
|
+
fallback?: string;
|
|
347
|
+
editor: Editor;
|
|
348
|
+
from: 'content-variable' | 'bubble-variable' | 'button-variable';
|
|
349
|
+
};
|
|
350
|
+
type RenderVariableFunction = (opts: RenderVariableOptions) => JSX.Element | null;
|
|
305
351
|
type VariableOptions = {
|
|
306
352
|
renderLabel: (props: {
|
|
307
353
|
options: VariableOptions;
|
|
308
354
|
node: Node$1;
|
|
309
355
|
}) => string;
|
|
310
356
|
suggestion: Omit<SuggestionOptions, 'editor'>;
|
|
311
|
-
|
|
312
|
-
|
|
357
|
+
/**
|
|
358
|
+
* Variables is the array of variables that will be used to render the variable pill.
|
|
359
|
+
*/
|
|
360
|
+
variables: Variables;
|
|
361
|
+
/**
|
|
362
|
+
* Render variable is the function that will be used to render the variable pill.
|
|
363
|
+
* @default DefaultRenderVariable
|
|
364
|
+
*/
|
|
365
|
+
renderVariable: RenderVariableFunction;
|
|
366
|
+
/**
|
|
367
|
+
* Variable suggestion popover is the component that will be used to render
|
|
368
|
+
* the variable suggestions for the content, bubble menu variables
|
|
369
|
+
* @default VariableSuggestionPopover
|
|
370
|
+
*/
|
|
371
|
+
variableSuggestionsPopover: VariableSuggestionsPopoverType;
|
|
313
372
|
};
|
|
314
373
|
type VariableStorage = {
|
|
315
374
|
popover: boolean;
|
|
@@ -323,10 +382,44 @@ type VariableListProps = {
|
|
|
323
382
|
required: boolean;
|
|
324
383
|
}) => void;
|
|
325
384
|
items: Variable[];
|
|
326
|
-
};
|
|
327
|
-
declare const VariableList: react.ForwardRefExoticComponent<
|
|
328
|
-
|
|
385
|
+
} & SuggestionOptions;
|
|
386
|
+
declare const VariableList: react.ForwardRefExoticComponent<{
|
|
387
|
+
command: (params: {
|
|
388
|
+
id: string;
|
|
389
|
+
required: boolean;
|
|
390
|
+
}) => void;
|
|
391
|
+
items: Variable[];
|
|
392
|
+
} & SuggestionOptions<any, any> & react.RefAttributes<unknown>>;
|
|
393
|
+
declare function getVariableSuggestions(char?: string): Omit<SuggestionOptions, 'editor'>;
|
|
329
394
|
|
|
330
|
-
|
|
395
|
+
type HtmlCodeBlockAttributes = {
|
|
396
|
+
activeTab: string;
|
|
397
|
+
showIfKey: string;
|
|
398
|
+
language: string;
|
|
399
|
+
};
|
|
400
|
+
declare module '@tiptap/core' {
|
|
401
|
+
interface Commands<ReturnType> {
|
|
402
|
+
htmlCodeBlock: {
|
|
403
|
+
/**
|
|
404
|
+
* Set a code block
|
|
405
|
+
* @param attributes Code block attributes
|
|
406
|
+
* @example editor.commands.setCodeBlock({ language: 'javascript' })
|
|
407
|
+
*/
|
|
408
|
+
setHtmlCodeBlock: (attributes?: {
|
|
409
|
+
language: string;
|
|
410
|
+
}) => ReturnType;
|
|
411
|
+
/**
|
|
412
|
+
* Toggle a code block
|
|
413
|
+
* @param attributes Code block attributes
|
|
414
|
+
* @example editor.commands.toggleCodeBlock({ language: 'javascript' })
|
|
415
|
+
*/
|
|
416
|
+
toggleHtmlCodeBlock: (attributes?: {
|
|
417
|
+
language: string;
|
|
418
|
+
}) => ReturnType;
|
|
419
|
+
updateHtmlCodeBlock: (attrs: Partial<HtmlCodeBlockAttributes>) => ReturnType;
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
declare const HTMLCodeBlockExtension: _tiptap_react.Node<_tiptap_extension_code_block_lowlight.CodeBlockLowlightOptions, any>;
|
|
331
424
|
|
|
332
|
-
export { type AllowedButtonBorderRadius, type AllowedButtonVariant, type AllowedColumnVerticalAlign, type AllowedLogoAlignment, type AllowedLogoSize, type ButtonAttributes, ButtonExtension, Color, ColumnExtension, ColumnsExtension, DEFAULT_BUTTON_ALIGNMENT, DEFAULT_BUTTON_BACKGROUND_COLOR, DEFAULT_BUTTON_BORDER_RADIUS, DEFAULT_BUTTON_PADDING_BOTTOM, DEFAULT_BUTTON_PADDING_LEFT, DEFAULT_BUTTON_PADDING_RIGHT, DEFAULT_BUTTON_PADDING_TOP, DEFAULT_BUTTON_TEXT_COLOR, DEFAULT_BUTTON_VARIANT, DEFAULT_COLUMNS_GAP, DEFAULT_COLUMN_VERTICAL_ALIGN, DEFAULT_COLUMN_WIDTH, DEFAULT_LOGO_SIZE, DEFAULT_SECTION_ALIGN, DEFAULT_SECTION_BACKGROUND_COLOR, DEFAULT_SECTION_BORDER_COLOR, DEFAULT_SECTION_BORDER_RADIUS, DEFAULT_SECTION_BORDER_WIDTH, DEFAULT_SECTION_MARGIN_BOTTOM, DEFAULT_SECTION_MARGIN_LEFT, DEFAULT_SECTION_MARGIN_RIGHT, DEFAULT_SECTION_MARGIN_TOP, DEFAULT_SECTION_PADDING_BOTTOM, DEFAULT_SECTION_PADDING_LEFT, DEFAULT_SECTION_PADDING_RIGHT, DEFAULT_SECTION_PADDING_TOP, DEFAULT_SECTION_SHOW_IF_KEY, DEFAULT_SPACER_HEIGHT, Footer, type FooterOptions, HorizontalRule, ImageExtension, LinkExtension, type LogoAttributes, LogoExtension, MailyKit, type MailyKitOptions, PlaceholderExtension, RepeatExtension, SectionExtension, SlashCommandExtension, type SlashCommandOptions, Spacer, type SpacerOptions, VariableExtension, VariableList, type VariableListProps, type VariableOptions, VariablePluginKey, type VariableStorage, allowedButtonBorderRadius, allowedButtonVariant, allowedLogoAlignment, allowedLogoSize, getSlashCommandSuggestions, getVariableSuggestions, logoSizes };
|
|
425
|
+
export { type AllowedButtonBorderRadius, type AllowedButtonVariant, type AllowedColumnVerticalAlign, type AllowedLogoAlignment, type AllowedLogoSize, type ButtonAttributes, ButtonExtension, Color, ColumnExtension, ColumnsExtension, DEFAULT_BUTTON_ALIGNMENT, DEFAULT_BUTTON_BACKGROUND_COLOR, DEFAULT_BUTTON_BORDER_RADIUS, DEFAULT_BUTTON_PADDING_BOTTOM, DEFAULT_BUTTON_PADDING_LEFT, DEFAULT_BUTTON_PADDING_RIGHT, DEFAULT_BUTTON_PADDING_TOP, DEFAULT_BUTTON_TEXT_COLOR, DEFAULT_BUTTON_VARIANT, DEFAULT_COLUMNS_GAP, DEFAULT_COLUMN_VERTICAL_ALIGN, DEFAULT_COLUMN_WIDTH, DEFAULT_LOGO_SIZE, DEFAULT_RENDER_VARIABLE_FUNCTION, DEFAULT_SECTION_ALIGN, DEFAULT_SECTION_BACKGROUND_COLOR, DEFAULT_SECTION_BORDER_COLOR, DEFAULT_SECTION_BORDER_RADIUS, DEFAULT_SECTION_BORDER_WIDTH, DEFAULT_SECTION_MARGIN_BOTTOM, DEFAULT_SECTION_MARGIN_LEFT, DEFAULT_SECTION_MARGIN_RIGHT, DEFAULT_SECTION_MARGIN_TOP, DEFAULT_SECTION_PADDING_BOTTOM, DEFAULT_SECTION_PADDING_LEFT, DEFAULT_SECTION_PADDING_RIGHT, DEFAULT_SECTION_PADDING_TOP, DEFAULT_SECTION_SHOW_IF_KEY, DEFAULT_SPACER_HEIGHT, DEFAULT_VARIABLES, DEFAULT_VARIABLE_SUGGESTION_POPOVER, DEFAULT_VARIABLE_TRIGGER_CHAR, Footer, type FooterOptions, HTMLCodeBlockExtension, HorizontalRule, type HtmlCodeBlockAttributes, ImageExtension, ImageUploadExtension, type ImageUploadOptions, ImageUploadPlugin, type ImageUploadPluginOptions, type ImageUploadStorage, LinkExtension, type LogoAttributes, LogoExtension, MailyKit, type MailyKitOptions, PlaceholderExtension, type RenderVariableFunction, type RenderVariableOptions, RepeatExtension, SectionExtension, SlashCommandExtension, type SlashCommandOptions, Spacer, type SpacerOptions, type Variable, VariableExtension, type VariableFunctionOptions, VariableList, type VariableListProps, type VariableOptions, VariablePluginKey, type VariableStorage, type Variables, type VariablesFunction, allowedButtonBorderRadius, allowedButtonVariant, allowedLogoAlignment, allowedLogoSize, getSlashCommandSuggestions, getVariableSuggestions, logoSizes, useImageUploadOptions };
|