@daisychainapp/maily-to-core 0.1.2 → 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.js +304 -155
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/index.mjs +3938 -2982
- 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.js +63 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5631 -4880
- package/dist/index.mjs.map +1 -1
- package/package.json +128 -50
- package/readme.md +91 -33
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
import * as _tiptap_core from '@tiptap/core';
|
|
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';
|
|
6
|
+
import * as _tiptap_extension_link from '@tiptap/extension-link';
|
|
7
|
+
import { LinkOptions } from '@tiptap/extension-link';
|
|
8
|
+
import * as _tiptap_extension_placeholder from '@tiptap/extension-placeholder';
|
|
9
|
+
import { SuggestionOptions } from '@tiptap/suggestion';
|
|
10
|
+
import * as _tiptap_react from '@tiptap/react';
|
|
11
|
+
import * as _tiptap_extension_image from '@tiptap/extension-image';
|
|
12
|
+
import { Node as Node$1 } from '@tiptap/pm/model';
|
|
13
|
+
import * as react from 'react';
|
|
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;
|
|
48
|
+
|
|
49
|
+
declare module '@tiptap/core' {
|
|
50
|
+
interface Commands<ReturnType> {
|
|
51
|
+
linkCard: {
|
|
52
|
+
setLinkCard: () => ReturnType;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
type LinkCardOptions = {};
|
|
57
|
+
|
|
58
|
+
type MailyKitOptions = {
|
|
59
|
+
linkCard?: Partial<LinkCardOptions> | false;
|
|
60
|
+
repeat?: Partial<{}> | false;
|
|
61
|
+
section?: Partial<{}> | false;
|
|
62
|
+
columns?: Partial<{}> | false;
|
|
63
|
+
column?: Partial<{}> | false;
|
|
64
|
+
button?: Partial<{}> | false;
|
|
65
|
+
spacer?: Partial<{}> | false;
|
|
66
|
+
logo?: Partial<{}> | false;
|
|
67
|
+
image?: Partial<{}> | false;
|
|
68
|
+
link?: Partial<LinkOptions> | false;
|
|
69
|
+
};
|
|
70
|
+
declare const MailyKit: Extension<MailyKitOptions, any>;
|
|
71
|
+
|
|
72
|
+
declare const PlaceholderExtension: _tiptap_core.Extension<_tiptap_extension_placeholder.PlaceholderOptions, any>;
|
|
73
|
+
|
|
74
|
+
type SlashCommandOptions = {
|
|
75
|
+
suggestion: Omit<SuggestionOptions, 'editor'>;
|
|
76
|
+
};
|
|
77
|
+
declare const SlashCommandExtension: Extension<SlashCommandOptions, any>;
|
|
78
|
+
|
|
79
|
+
interface CommandProps {
|
|
80
|
+
editor: Editor;
|
|
81
|
+
range: Range;
|
|
82
|
+
}
|
|
83
|
+
type BlockItem = {
|
|
84
|
+
title: string;
|
|
85
|
+
description?: string;
|
|
86
|
+
searchTerms: string[];
|
|
87
|
+
icon?: JSX.Element;
|
|
88
|
+
render?: (editor: Editor) => JSX.Element | null | true;
|
|
89
|
+
preview?: string | ((editor: Editor) => JSX.Element | null);
|
|
90
|
+
} & ({
|
|
91
|
+
command: (options: CommandProps) => void;
|
|
92
|
+
id?: never;
|
|
93
|
+
commands?: never;
|
|
94
|
+
} | {
|
|
95
|
+
/**
|
|
96
|
+
* id to be used for the slash command query
|
|
97
|
+
* `headers.` will go inside the header subcommand
|
|
98
|
+
*/
|
|
99
|
+
id: string;
|
|
100
|
+
command?: never;
|
|
101
|
+
commands: BlockItem[];
|
|
102
|
+
});
|
|
103
|
+
type BlockGroupItem = {
|
|
104
|
+
title: string;
|
|
105
|
+
commands: BlockItem[];
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
declare function getSlashCommandSuggestions(groups?: BlockGroupItem[]): Omit<SuggestionOptions, 'editor'>;
|
|
109
|
+
|
|
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;
|
|
120
|
+
}
|
|
121
|
+
interface LogoAttributes {
|
|
122
|
+
src?: string;
|
|
123
|
+
size?: AllowedLogoSize;
|
|
124
|
+
alignment?: AllowedLogoAlignment;
|
|
125
|
+
showIfKey: string;
|
|
126
|
+
isSrcVariable?: boolean;
|
|
127
|
+
}
|
|
128
|
+
declare module '@tiptap/core' {
|
|
129
|
+
interface Commands<ReturnType> {
|
|
130
|
+
logo: {
|
|
131
|
+
setLogoImage: (options: LogoOptions) => ReturnType;
|
|
132
|
+
setLogoAttributes: (attributes: Partial<LogoAttributes>) => ReturnType;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
}
|
|
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>;
|
|
139
|
+
|
|
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;
|
|
163
|
+
showIfKey: string;
|
|
164
|
+
paddingTop: number;
|
|
165
|
+
paddingRight: number;
|
|
166
|
+
paddingBottom: number;
|
|
167
|
+
paddingLeft: number;
|
|
168
|
+
};
|
|
169
|
+
declare module '@tiptap/core' {
|
|
170
|
+
interface Commands<ReturnType> {
|
|
171
|
+
button: {
|
|
172
|
+
setButton: () => ReturnType;
|
|
173
|
+
updateButton: (attrs: Partial<ButtonAttributes>) => ReturnType;
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
declare const ButtonExtension: Node<any, any>;
|
|
178
|
+
|
|
179
|
+
declare const DEFAULT_COLUMN_WIDTH = "auto";
|
|
180
|
+
type AllowedColumnVerticalAlign = 'top' | 'middle' | 'bottom';
|
|
181
|
+
declare const DEFAULT_COLUMN_VERTICAL_ALIGN: AllowedColumnVerticalAlign;
|
|
182
|
+
interface ColumnAttributes {
|
|
183
|
+
verticalAlign: AllowedColumnVerticalAlign;
|
|
184
|
+
backgroundColor: string;
|
|
185
|
+
borderRadius: number;
|
|
186
|
+
align: string;
|
|
187
|
+
borderWidth: number;
|
|
188
|
+
borderColor: string;
|
|
189
|
+
paddingTop: number;
|
|
190
|
+
paddingRight: number;
|
|
191
|
+
paddingBottom: number;
|
|
192
|
+
paddingLeft: number;
|
|
193
|
+
showIfKey: string;
|
|
194
|
+
}
|
|
195
|
+
declare module '@tiptap/core' {
|
|
196
|
+
interface Commands<ReturnType> {
|
|
197
|
+
column: {
|
|
198
|
+
updateColumn: (attrs: Partial<ColumnAttributes>) => ReturnType;
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
declare const ColumnExtension: Node<any, any>;
|
|
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
|
+
|
|
257
|
+
declare const DEFAULT_SECTION_BACKGROUND_COLOR = "#f7f7f7";
|
|
258
|
+
declare const DEFAULT_SECTION_ALIGN = "left";
|
|
259
|
+
declare const DEFAULT_SECTION_BORDER_WIDTH = 2;
|
|
260
|
+
declare const DEFAULT_SECTION_BORDER_COLOR = "#e2e2e2";
|
|
261
|
+
declare const DEFAULT_SECTION_BORDER_RADIUS = 0;
|
|
262
|
+
declare const DEFAULT_SECTION_MARGIN_TOP = 0;
|
|
263
|
+
declare const DEFAULT_SECTION_MARGIN_RIGHT = 0;
|
|
264
|
+
declare const DEFAULT_SECTION_MARGIN_BOTTOM = 0;
|
|
265
|
+
declare const DEFAULT_SECTION_MARGIN_LEFT = 0;
|
|
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;
|
|
270
|
+
declare const DEFAULT_SECTION_SHOW_IF_KEY: null;
|
|
271
|
+
type SectionAttributes = {
|
|
272
|
+
borderRadius: number;
|
|
273
|
+
backgroundColor: string;
|
|
274
|
+
align: string;
|
|
275
|
+
borderWidth: number;
|
|
276
|
+
borderColor: string;
|
|
277
|
+
marginTop: number;
|
|
278
|
+
marginRight: number;
|
|
279
|
+
marginBottom: number;
|
|
280
|
+
marginLeft: number;
|
|
281
|
+
paddingTop: number;
|
|
282
|
+
paddingRight: number;
|
|
283
|
+
paddingBottom: number;
|
|
284
|
+
paddingLeft: number;
|
|
285
|
+
showIfKey: string | null;
|
|
286
|
+
};
|
|
287
|
+
declare module '@tiptap/core' {
|
|
288
|
+
interface Commands<ReturnType> {
|
|
289
|
+
section: {
|
|
290
|
+
setSection: () => ReturnType;
|
|
291
|
+
updateSection: (attrs: Partial<SectionAttributes>) => ReturnType;
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
declare const SectionExtension: Node<any, any>;
|
|
296
|
+
|
|
297
|
+
interface SpacerOptions {
|
|
298
|
+
height: number;
|
|
299
|
+
showIfKey: string;
|
|
300
|
+
HTMLAttributes: Record<string, any>;
|
|
301
|
+
}
|
|
302
|
+
declare module '@tiptap/core' {
|
|
303
|
+
interface Commands<ReturnType> {
|
|
304
|
+
spacer: {
|
|
305
|
+
setSpacer: (options: {
|
|
306
|
+
height: number;
|
|
307
|
+
}) => ReturnType;
|
|
308
|
+
setSpacerSize: (height: number) => ReturnType;
|
|
309
|
+
setSpacerShowIfKey: (showIfKey: string) => ReturnType;
|
|
310
|
+
unsetSpacer: () => ReturnType;
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
declare const DEFAULT_SPACER_HEIGHT = 8;
|
|
315
|
+
declare const Spacer: Node<SpacerOptions, any>;
|
|
316
|
+
|
|
317
|
+
type VariableSuggestionsPopoverProps = {
|
|
318
|
+
items: Variable[];
|
|
319
|
+
onSelectItem: (item: Variable) => void;
|
|
320
|
+
};
|
|
321
|
+
type VariableSuggestionsPopoverRef = {
|
|
322
|
+
moveUp: () => void;
|
|
323
|
+
moveDown: () => void;
|
|
324
|
+
select: () => void;
|
|
325
|
+
};
|
|
326
|
+
type VariableSuggestionsPopoverType = React.ForwardRefExoticComponent<VariableSuggestionsPopoverProps & React.RefAttributes<VariableSuggestionsPopoverRef>>;
|
|
327
|
+
|
|
328
|
+
type Variable = {
|
|
329
|
+
name: string;
|
|
330
|
+
required?: boolean;
|
|
331
|
+
valid?: boolean;
|
|
332
|
+
};
|
|
333
|
+
type VariableFunctionOptions = {
|
|
334
|
+
query: string;
|
|
335
|
+
from: 'content-variable' | 'bubble-variable' | 'repeat-variable';
|
|
336
|
+
editor: Editor;
|
|
337
|
+
};
|
|
338
|
+
type VariablesFunction = (opts: VariableFunctionOptions) => Array<Variable>;
|
|
339
|
+
type Variables = Array<Variable> | VariablesFunction;
|
|
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;
|
|
351
|
+
type VariableOptions = {
|
|
352
|
+
renderLabel: (props: {
|
|
353
|
+
options: VariableOptions;
|
|
354
|
+
node: Node$1;
|
|
355
|
+
}) => string;
|
|
356
|
+
suggestion: Omit<SuggestionOptions, 'editor'>;
|
|
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;
|
|
372
|
+
};
|
|
373
|
+
type VariableStorage = {
|
|
374
|
+
popover: boolean;
|
|
375
|
+
};
|
|
376
|
+
declare const VariablePluginKey: PluginKey<any>;
|
|
377
|
+
declare const VariableExtension: Node<VariableOptions, VariableStorage>;
|
|
378
|
+
|
|
379
|
+
type VariableListProps = {
|
|
380
|
+
command: (params: {
|
|
381
|
+
id: string;
|
|
382
|
+
required: boolean;
|
|
383
|
+
}) => void;
|
|
384
|
+
items: Variable[];
|
|
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'>;
|
|
394
|
+
|
|
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>;
|
|
424
|
+
|
|
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 };
|