@react-email/editor 0.0.0-experimental.15 → 0.0.0-experimental.17
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/index.cjs +1222 -419
- package/dist/index.d.cts +334 -160
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +335 -161
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1202 -424
- package/dist/index.mjs.map +1 -1
- package/package.json +17 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,42 +1,27 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import * as
|
|
5
|
-
import {
|
|
6
|
-
import * as _tiptap_extension_placeholder0 from "@tiptap/extension-placeholder";
|
|
1
|
+
import * as react_jsx_runtime22 from "react/jsx-runtime";
|
|
2
|
+
import * as _tiptap_core6 from "@tiptap/core";
|
|
3
|
+
import { Content, Editor, Extendable, Extension, Extensions, JSONContent, Mark, MarkConfig, MarkType, Node, NodeConfig as NodeConfig$1, NodeType as NodeType$1, ParentConfig, Range } from "@tiptap/core";
|
|
4
|
+
import * as _tiptap_extensions1 from "@tiptap/extensions";
|
|
5
|
+
import { UseEditorOptions } from "@tiptap/react";
|
|
7
6
|
import * as React$1 from "react";
|
|
8
|
-
import { ComponentType, Ref } from "react";
|
|
7
|
+
import { ComponentType, ReactNode, Ref } from "react";
|
|
8
|
+
import { StarterKitOptions as StarterKitOptions$1 } from "@tiptap/starter-kit";
|
|
9
|
+
import * as _tiptap_extension_blockquote0 from "@tiptap/extension-blockquote";
|
|
10
|
+
import * as _tiptap_extension_bullet_list0 from "@tiptap/extension-bullet-list";
|
|
11
|
+
import * as _tiptap_extension_code0 from "@tiptap/extension-code";
|
|
12
|
+
import { CodeBlockOptions } from "@tiptap/extension-code-block";
|
|
13
|
+
import { EditorView } from "@tiptap/pm/view";
|
|
14
|
+
import * as _tiptap_extension_horizontal_rule0 from "@tiptap/extension-horizontal-rule";
|
|
15
|
+
import * as _tiptap_extension_hard_break0 from "@tiptap/extension-hard-break";
|
|
16
|
+
import * as _tiptap_extension_heading0 from "@tiptap/extension-heading";
|
|
17
|
+
import * as _tiptap_extension_italic0 from "@tiptap/extension-italic";
|
|
18
|
+
import * as _tiptap_extension_link0 from "@tiptap/extension-link";
|
|
19
|
+
import * as _tiptap_extension_list_item0 from "@tiptap/extension-list-item";
|
|
20
|
+
import * as _tiptap_extension_ordered_list0 from "@tiptap/extension-ordered-list";
|
|
21
|
+
import * as _tiptap_extension_paragraph0 from "@tiptap/extension-paragraph";
|
|
22
|
+
import * as _tiptap_extension_strike0 from "@tiptap/extension-strike";
|
|
9
23
|
import { Node as Node$1 } from "@tiptap/pm/model";
|
|
10
24
|
|
|
11
|
-
//#region src/core/email-node.d.ts
|
|
12
|
-
type RendererComponent = (props: {
|
|
13
|
-
node: JSONContent;
|
|
14
|
-
style: React.CSSProperties;
|
|
15
|
-
children?: React.ReactNode;
|
|
16
|
-
}) => React.ReactNode;
|
|
17
|
-
interface EmailNodeConfig<Options, Storage> extends NodeConfig$1<Options, Storage> {
|
|
18
|
-
renderToReactEmail: RendererComponent;
|
|
19
|
-
}
|
|
20
|
-
type ConfigParameter<Options, Storage> = Partial<Omit<EmailNodeConfig<Options, Storage>, 'renderToReactEmail'>> & Pick<EmailNodeConfig<Options, Storage>, 'renderToReactEmail'>;
|
|
21
|
-
declare class EmailNode<Options = Record<string, never>, Storage = Record<string, never>> extends Node<Options, Storage> {
|
|
22
|
-
config: EmailNodeConfig<Options, Storage>;
|
|
23
|
-
constructor(config: ConfigParameter<Options, Storage>);
|
|
24
|
-
/**
|
|
25
|
-
* Create a new Node instance
|
|
26
|
-
* @param config - Node configuration object or a function that returns a configuration object
|
|
27
|
-
*/
|
|
28
|
-
static create<O = Record<string, never>, S = Record<string, never>>(config: ConfigParameter<O, S> | (() => ConfigParameter<O, S>)): EmailNode<O, S>;
|
|
29
|
-
static from<O, S>(node: Node<O, S>, renderToReactEmail: RendererComponent): EmailNode<O, S>;
|
|
30
|
-
configure(options?: Partial<Options>): EmailNode<Options, Storage>;
|
|
31
|
-
extend<ExtendedOptions = Options, ExtendedStorage = Storage, ExtendedConfig extends NodeConfig$1<ExtendedOptions, ExtendedStorage> = EmailNodeConfig<ExtendedOptions, ExtendedStorage>>(extendedConfig?: (() => Partial<ExtendedConfig>) | (Partial<ExtendedConfig> & ThisType<{
|
|
32
|
-
name: string;
|
|
33
|
-
options: ExtendedOptions;
|
|
34
|
-
storage: ExtendedStorage;
|
|
35
|
-
editor: Editor;
|
|
36
|
-
type: NodeType$1;
|
|
37
|
-
}>)): EmailNode<ExtendedOptions, ExtendedStorage>;
|
|
38
|
-
}
|
|
39
|
-
//#endregion
|
|
40
25
|
//#region src/core/event-bus.d.ts
|
|
41
26
|
/**
|
|
42
27
|
* Base event map interface for the editor event bus.
|
|
@@ -69,6 +54,48 @@ declare class EditorEventBus {
|
|
|
69
54
|
}
|
|
70
55
|
declare const editorEventBus: EditorEventBus;
|
|
71
56
|
//#endregion
|
|
57
|
+
//#region src/core/serializer/compose-react-email.d.ts
|
|
58
|
+
interface ComposeReactEmailResult {
|
|
59
|
+
html: string;
|
|
60
|
+
text: string;
|
|
61
|
+
}
|
|
62
|
+
declare const composeReactEmail: ({
|
|
63
|
+
editor,
|
|
64
|
+
preview
|
|
65
|
+
}: {
|
|
66
|
+
editor: Editor;
|
|
67
|
+
preview: string | null;
|
|
68
|
+
}) => Promise<ComposeReactEmailResult>;
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region src/core/serializer/email-node.d.ts
|
|
71
|
+
type RendererComponent = (props: {
|
|
72
|
+
node: JSONContent;
|
|
73
|
+
style: React.CSSProperties;
|
|
74
|
+
children?: React.ReactNode;
|
|
75
|
+
}) => React.ReactNode;
|
|
76
|
+
interface EmailNodeConfig<Options$1, Storage> extends NodeConfig$1<Options$1, Storage> {
|
|
77
|
+
renderToReactEmail: RendererComponent;
|
|
78
|
+
}
|
|
79
|
+
type ConfigParameter$1<Options$1, Storage> = Partial<Omit<EmailNodeConfig<Options$1, Storage>, 'renderToReactEmail'>> & Pick<EmailNodeConfig<Options$1, Storage>, 'renderToReactEmail'>;
|
|
80
|
+
declare class EmailNode<Options$1 = Record<string, never>, Storage = Record<string, never>> extends Node<Options$1, Storage> {
|
|
81
|
+
config: EmailNodeConfig<Options$1, Storage>;
|
|
82
|
+
constructor(config: ConfigParameter$1<Options$1, Storage>);
|
|
83
|
+
/**
|
|
84
|
+
* Create a new Node instance
|
|
85
|
+
* @param config - Node configuration object or a function that returns a configuration object
|
|
86
|
+
*/
|
|
87
|
+
static create<O = Record<string, never>, S = Record<string, never>>(config: ConfigParameter$1<O, S> | (() => ConfigParameter$1<O, S>)): EmailNode<O, S>;
|
|
88
|
+
static from<O, S>(node: Node<O, S>, renderToReactEmail: RendererComponent): EmailNode<O, S>;
|
|
89
|
+
configure(options?: Partial<Options$1>): EmailNode<Options$1, Storage>;
|
|
90
|
+
extend<ExtendedOptions = Options$1, ExtendedStorage = Storage, ExtendedConfig extends NodeConfig$1<ExtendedOptions, ExtendedStorage> = EmailNodeConfig<ExtendedOptions, ExtendedStorage>>(extendedConfig?: (() => Partial<ExtendedConfig>) | (Partial<ExtendedConfig> & ThisType<{
|
|
91
|
+
name: string;
|
|
92
|
+
options: ExtendedOptions;
|
|
93
|
+
storage: ExtendedStorage;
|
|
94
|
+
editor: Editor;
|
|
95
|
+
type: NodeType$1;
|
|
96
|
+
}>)): EmailNode<ExtendedOptions, ExtendedStorage>;
|
|
97
|
+
}
|
|
98
|
+
//#endregion
|
|
72
99
|
//#region src/extensions/code-block.d.ts
|
|
73
100
|
interface CodeBlockPrismOptions extends CodeBlockOptions {
|
|
74
101
|
defaultLanguage: string;
|
|
@@ -76,6 +103,37 @@ interface CodeBlockPrismOptions extends CodeBlockOptions {
|
|
|
76
103
|
}
|
|
77
104
|
declare const CodeBlockPrism: EmailNode<CodeBlockPrismOptions, any>;
|
|
78
105
|
//#endregion
|
|
106
|
+
//#region src/core/serializer/email-mark.d.ts
|
|
107
|
+
type SerializedMark = NonNullable<JSONContent['marks']>[number];
|
|
108
|
+
type RendererComponent$1 = (props: {
|
|
109
|
+
mark: SerializedMark;
|
|
110
|
+
node: JSONContent;
|
|
111
|
+
style: React.CSSProperties;
|
|
112
|
+
children?: React.ReactNode;
|
|
113
|
+
}) => React.ReactNode;
|
|
114
|
+
interface EmailMarkConfig<Options$1, Storage> extends MarkConfig<Options$1, Storage> {
|
|
115
|
+
renderToReactEmail: RendererComponent$1;
|
|
116
|
+
}
|
|
117
|
+
type ConfigParameter<Options$1, Storage> = Partial<Omit<EmailMarkConfig<Options$1, Storage>, 'renderToReactEmail'>> & Pick<EmailMarkConfig<Options$1, Storage>, 'renderToReactEmail'>;
|
|
118
|
+
declare class EmailMark<Options$1 = Record<string, never>, Storage = Record<string, never>> extends Mark<Options$1, Storage> {
|
|
119
|
+
config: EmailMarkConfig<Options$1, Storage>;
|
|
120
|
+
constructor(config: ConfigParameter<Options$1, Storage>);
|
|
121
|
+
/**
|
|
122
|
+
* Create a new Mark instance
|
|
123
|
+
* @param config - Mark configuration object or a function that returns a configuration object
|
|
124
|
+
*/
|
|
125
|
+
static create<O = Record<string, never>, S = Record<string, never>>(config: ConfigParameter<O, S> | (() => ConfigParameter<O, S>)): EmailMark<O, S>;
|
|
126
|
+
static from<O, S>(mark: Mark<O, S>, renderToReactEmail: RendererComponent$1): EmailMark<O, S>;
|
|
127
|
+
configure(options?: Partial<Options$1>): EmailMark<Options$1, Storage>;
|
|
128
|
+
extend<ExtendedOptions = Options$1, ExtendedStorage = Storage, ExtendedConfig extends MarkConfig<ExtendedOptions, ExtendedStorage> = EmailMarkConfig<ExtendedOptions, ExtendedStorage>>(extendedConfig?: (() => Partial<ExtendedConfig>) | (Partial<ExtendedConfig> & ThisType<{
|
|
129
|
+
name: string;
|
|
130
|
+
options: ExtendedOptions;
|
|
131
|
+
storage: ExtendedStorage;
|
|
132
|
+
editor: Editor;
|
|
133
|
+
type: MarkType;
|
|
134
|
+
}>)): EmailMark<ExtendedOptions, ExtendedStorage>;
|
|
135
|
+
}
|
|
136
|
+
//#endregion
|
|
79
137
|
//#region src/extensions/preview-text.d.ts
|
|
80
138
|
interface PreviewTextOptions {
|
|
81
139
|
HTMLAttributes: Record<string, unknown>;
|
|
@@ -113,11 +171,59 @@ declare module '@tiptap/core' {
|
|
|
113
171
|
* This extension allows you to mark text as bold.
|
|
114
172
|
* @see https://tiptap.dev/api/marks/bold
|
|
115
173
|
*/
|
|
116
|
-
declare const Bold:
|
|
174
|
+
declare const Bold: EmailMark<BoldOptions, Record<string, never>>;
|
|
175
|
+
//#endregion
|
|
176
|
+
//#region src/extensions/sup.d.ts
|
|
177
|
+
interface SupOptions {
|
|
178
|
+
/**
|
|
179
|
+
* HTML attributes to add to the sup element.
|
|
180
|
+
* @default {}
|
|
181
|
+
* @example { class: 'foo' }
|
|
182
|
+
*/
|
|
183
|
+
HTMLAttributes: Record<string, unknown>;
|
|
184
|
+
}
|
|
185
|
+
declare module '@tiptap/core' {
|
|
186
|
+
interface Commands<ReturnType> {
|
|
187
|
+
sup: {
|
|
188
|
+
/**
|
|
189
|
+
* Set a superscript mark
|
|
190
|
+
*/
|
|
191
|
+
setSup: () => ReturnType;
|
|
192
|
+
/**
|
|
193
|
+
* Toggle a superscript mark
|
|
194
|
+
*/
|
|
195
|
+
toggleSup: () => ReturnType;
|
|
196
|
+
/**
|
|
197
|
+
* Unset a superscript mark
|
|
198
|
+
*/
|
|
199
|
+
unsetSup: () => ReturnType;
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* This extension allows you to mark text as superscript.
|
|
205
|
+
* @see https://tiptap.dev/api/marks/superscript
|
|
206
|
+
*/
|
|
207
|
+
declare const Sup: EmailMark<SupOptions, Record<string, never>>;
|
|
208
|
+
//#endregion
|
|
209
|
+
//#region src/extensions/uppercase.d.ts
|
|
210
|
+
interface UppercaseOptions {
|
|
211
|
+
HTMLAttributes: Record<string, unknown>;
|
|
212
|
+
}
|
|
213
|
+
declare module '@tiptap/core' {
|
|
214
|
+
interface Commands<ReturnType> {
|
|
215
|
+
uppercase: {
|
|
216
|
+
setUppercase: () => ReturnType;
|
|
217
|
+
toggleUppercase: () => ReturnType;
|
|
218
|
+
unsetUppercase: () => ReturnType;
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
declare const Uppercase: EmailMark<UppercaseOptions, Record<string, never>>;
|
|
117
223
|
//#endregion
|
|
118
224
|
//#region src/extensions/table.d.ts
|
|
119
225
|
declare module '@tiptap/core' {
|
|
120
|
-
interface NodeConfig<Options, Storage> {
|
|
226
|
+
interface NodeConfig<Options$1, Storage> {
|
|
121
227
|
/**
|
|
122
228
|
* A string or function to determine the role of the table.
|
|
123
229
|
* @default 'table'
|
|
@@ -125,9 +231,9 @@ declare module '@tiptap/core' {
|
|
|
125
231
|
*/
|
|
126
232
|
tableRole?: string | ((this: {
|
|
127
233
|
name: string;
|
|
128
|
-
options: Options;
|
|
234
|
+
options: Options$1;
|
|
129
235
|
storage: Storage;
|
|
130
|
-
parent: ParentConfig<NodeConfig<Options>>['tableRole'];
|
|
236
|
+
parent: ParentConfig<NodeConfig<Options$1>>['tableRole'];
|
|
131
237
|
}) => string);
|
|
132
238
|
}
|
|
133
239
|
}
|
|
@@ -145,6 +251,18 @@ interface TableCellOptions extends Record<string, unknown> {
|
|
|
145
251
|
declare const TableCell: EmailNode<TableCellOptions, Record<string, never>>;
|
|
146
252
|
declare const TableHeader: Node<any, any>;
|
|
147
253
|
//#endregion
|
|
254
|
+
//#region src/extensions/body.d.ts
|
|
255
|
+
interface BodyOptions {
|
|
256
|
+
HTMLAttributes: Record<string, unknown>;
|
|
257
|
+
}
|
|
258
|
+
declare const Body: EmailNode<BodyOptions, Record<string, never>>;
|
|
259
|
+
//#endregion
|
|
260
|
+
//#region src/extensions/div.d.ts
|
|
261
|
+
interface DivOptions {
|
|
262
|
+
HTMLAttributes: Record<string, unknown>;
|
|
263
|
+
}
|
|
264
|
+
declare const Div: EmailNode<DivOptions, Record<string, never>>;
|
|
265
|
+
//#endregion
|
|
148
266
|
//#region src/extensions/button.d.ts
|
|
149
267
|
interface EditorButtonOptions {
|
|
150
268
|
HTMLAttributes: Record<string, unknown>;
|
|
@@ -160,6 +278,36 @@ declare module '@tiptap/core' {
|
|
|
160
278
|
}
|
|
161
279
|
declare const Button: EmailNode<EditorButtonOptions, Record<string, never>>;
|
|
162
280
|
//#endregion
|
|
281
|
+
//#region src/extensions/section.d.ts
|
|
282
|
+
interface SectionOptions {
|
|
283
|
+
HTMLAttributes: Record<string, unknown>;
|
|
284
|
+
[key: string]: unknown;
|
|
285
|
+
}
|
|
286
|
+
declare module '@tiptap/core' {
|
|
287
|
+
interface Commands<ReturnType> {
|
|
288
|
+
section: {
|
|
289
|
+
insertSection: () => ReturnType;
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
declare const Section: EmailNode<SectionOptions, Record<string, never>>;
|
|
294
|
+
//#endregion
|
|
295
|
+
//#region src/extensions/global-content.d.ts
|
|
296
|
+
interface GlobalContentOptions {
|
|
297
|
+
key: string;
|
|
298
|
+
data: Record<string, unknown>;
|
|
299
|
+
}
|
|
300
|
+
declare module '@tiptap/core' {
|
|
301
|
+
interface GlobalContent<ReturnType> {
|
|
302
|
+
setGlobalContent: (key: string, value: unknown) => ReturnType;
|
|
303
|
+
}
|
|
304
|
+
interface Commands<ReturnType> {
|
|
305
|
+
globalContent: GlobalContent<ReturnType>;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
declare function getGlobalContent(key: string, editor: Editor): unknown | null;
|
|
309
|
+
declare const GlobalContent: Node<GlobalContentOptions, any>;
|
|
310
|
+
//#endregion
|
|
163
311
|
//#region src/extensions/alignment-attribute.d.ts
|
|
164
312
|
interface AlignmentOptions {
|
|
165
313
|
types: string[];
|
|
@@ -226,11 +374,14 @@ interface MaxNestingOptions {
|
|
|
226
374
|
}
|
|
227
375
|
declare const MaxNesting: Extension<MaxNestingOptions, any>;
|
|
228
376
|
//#endregion
|
|
229
|
-
//#region src/extensions/
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
declare const
|
|
377
|
+
//#region src/extensions/blockquote.d.ts
|
|
378
|
+
declare const Blockquote: EmailNode<_tiptap_extension_blockquote0.BlockquoteOptions, any>;
|
|
379
|
+
//#endregion
|
|
380
|
+
//#region src/extensions/bullet-list.d.ts
|
|
381
|
+
declare const BulletList: EmailNode<_tiptap_extension_bullet_list0.BulletListOptions, any>;
|
|
382
|
+
//#endregion
|
|
383
|
+
//#region src/extensions/code.d.ts
|
|
384
|
+
declare const Code: EmailMark<_tiptap_extension_code0.CodeOptions, any>;
|
|
234
385
|
//#endregion
|
|
235
386
|
//#region src/extensions/columns.d.ts
|
|
236
387
|
declare module '@tiptap/core' {
|
|
@@ -248,11 +399,20 @@ declare const ThreeColumns: EmailNode<Record<string, never>, Record<string, neve
|
|
|
248
399
|
declare const FourColumns: EmailNode<Record<string, never>, Record<string, never>>;
|
|
249
400
|
declare const ColumnsColumn: EmailNode<Record<string, never>, Record<string, never>>;
|
|
250
401
|
//#endregion
|
|
251
|
-
//#region src/extensions/
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
declare const
|
|
402
|
+
//#region src/extensions/hard-break.d.ts
|
|
403
|
+
declare const HardBreak: EmailNode<_tiptap_extension_hard_break0.HardBreakOptions, any>;
|
|
404
|
+
//#endregion
|
|
405
|
+
//#region src/extensions/italic.d.ts
|
|
406
|
+
declare const Italic: EmailMark<_tiptap_extension_italic0.ItalicOptions, any>;
|
|
407
|
+
//#endregion
|
|
408
|
+
//#region src/extensions/list-item.d.ts
|
|
409
|
+
declare const ListItem: EmailNode<_tiptap_extension_list_item0.ListItemOptions, any>;
|
|
410
|
+
//#endregion
|
|
411
|
+
//#region src/extensions/ordered-list.d.ts
|
|
412
|
+
declare const OrderedList: EmailNode<_tiptap_extension_ordered_list0.OrderedListOptions, any>;
|
|
413
|
+
//#endregion
|
|
414
|
+
//#region src/extensions/paragraph.d.ts
|
|
415
|
+
declare const Paragraph: EmailNode<_tiptap_extension_paragraph0.ParagraphOptions, any>;
|
|
256
416
|
//#endregion
|
|
257
417
|
//#region src/extensions/placeholder.d.ts
|
|
258
418
|
interface PlaceholderOptions {
|
|
@@ -261,10 +421,10 @@ interface PlaceholderOptions {
|
|
|
261
421
|
}) => string);
|
|
262
422
|
includeChildren?: boolean;
|
|
263
423
|
}
|
|
264
|
-
declare const Placeholder:
|
|
424
|
+
declare const Placeholder: _tiptap_core6.Extension<_tiptap_extensions1.PlaceholderOptions, any>;
|
|
265
425
|
//#endregion
|
|
266
426
|
//#region src/extensions/preserved-style.d.ts
|
|
267
|
-
declare const PreservedStyle:
|
|
427
|
+
declare const PreservedStyle: EmailMark<Record<string, never>, Record<string, never>>;
|
|
268
428
|
/**
|
|
269
429
|
* Processes styles when unlinking:
|
|
270
430
|
* - Has background (button-like): preserve all styles
|
|
@@ -272,70 +432,86 @@ declare const PreservedStyle: Mark<any, any>;
|
|
|
272
432
|
*/
|
|
273
433
|
declare function processStylesForUnlink(styleString: string | null | undefined): string | null;
|
|
274
434
|
//#endregion
|
|
275
|
-
//#region src/extensions/
|
|
276
|
-
|
|
277
|
-
HTMLAttributes: Record<string, unknown>;
|
|
278
|
-
[key: string]: unknown;
|
|
279
|
-
}
|
|
280
|
-
declare module '@tiptap/core' {
|
|
281
|
-
interface Commands<ReturnType> {
|
|
282
|
-
section: {
|
|
283
|
-
insertSection: () => ReturnType;
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
declare const Section: EmailNode<SectionOptions, Record<string, never>>;
|
|
288
|
-
//#endregion
|
|
289
|
-
//#region src/extensions/sup.d.ts
|
|
290
|
-
interface SupOptions {
|
|
291
|
-
/**
|
|
292
|
-
* HTML attributes to add to the sup element.
|
|
293
|
-
* @default {}
|
|
294
|
-
* @example { class: 'foo' }
|
|
295
|
-
*/
|
|
296
|
-
HTMLAttributes: Record<string, unknown>;
|
|
297
|
-
}
|
|
298
|
-
declare module '@tiptap/core' {
|
|
299
|
-
interface Commands<ReturnType> {
|
|
300
|
-
sup: {
|
|
301
|
-
/**
|
|
302
|
-
* Set a superscript mark
|
|
303
|
-
*/
|
|
304
|
-
setSup: () => ReturnType;
|
|
305
|
-
/**
|
|
306
|
-
* Toggle a superscript mark
|
|
307
|
-
*/
|
|
308
|
-
toggleSup: () => ReturnType;
|
|
309
|
-
/**
|
|
310
|
-
* Unset a superscript mark
|
|
311
|
-
*/
|
|
312
|
-
unsetSup: () => ReturnType;
|
|
313
|
-
};
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
/**
|
|
317
|
-
* This extension allows you to mark text as superscript.
|
|
318
|
-
* @see https://tiptap.dev/api/marks/superscript
|
|
319
|
-
*/
|
|
320
|
-
declare const Sup: Mark<SupOptions, any>;
|
|
321
|
-
//#endregion
|
|
322
|
-
//#region src/extensions/uppercase.d.ts
|
|
323
|
-
interface UppercaseOptions {
|
|
324
|
-
HTMLAttributes: Record<string, unknown>;
|
|
325
|
-
}
|
|
326
|
-
declare module '@tiptap/core' {
|
|
327
|
-
interface Commands<ReturnType> {
|
|
328
|
-
uppercase: {
|
|
329
|
-
setUppercase: () => ReturnType;
|
|
330
|
-
toggleUppercase: () => ReturnType;
|
|
331
|
-
unsetUppercase: () => ReturnType;
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
declare const Uppercase: Mark<UppercaseOptions, any>;
|
|
435
|
+
//#region src/extensions/strike.d.ts
|
|
436
|
+
declare const Strike: EmailMark<_tiptap_extension_strike0.StrikeOptions, any>;
|
|
336
437
|
//#endregion
|
|
337
438
|
//#region src/extensions/index.d.ts
|
|
338
|
-
|
|
439
|
+
type StarterKitExtensionMap = typeof starterKitExtensions;
|
|
440
|
+
declare const starterKitExtensions: {
|
|
441
|
+
CodeBlockPrism: EmailNode<CodeBlockPrismOptions, any>;
|
|
442
|
+
Code: EmailMark<_tiptap_extension_code0.CodeOptions, any>;
|
|
443
|
+
Paragraph: EmailNode<_tiptap_extension_paragraph0.ParagraphOptions, any>;
|
|
444
|
+
BulletList: EmailNode<_tiptap_extension_bullet_list0.BulletListOptions, any>;
|
|
445
|
+
OrderedList: EmailNode<_tiptap_extension_ordered_list0.OrderedListOptions, any>;
|
|
446
|
+
Blockquote: EmailNode<_tiptap_extension_blockquote0.BlockquoteOptions, any>;
|
|
447
|
+
ListItem: EmailNode<_tiptap_extension_list_item0.ListItemOptions, any>;
|
|
448
|
+
HardBreak: EmailNode<_tiptap_extension_hard_break0.HardBreakOptions, any>;
|
|
449
|
+
Italic: EmailMark<_tiptap_extension_italic0.ItalicOptions, any>;
|
|
450
|
+
Placeholder: Extension<_tiptap_extensions1.PlaceholderOptions, any>;
|
|
451
|
+
PreviewText: _tiptap_core6.Node<PreviewTextOptions, any>;
|
|
452
|
+
Bold: EmailMark<BoldOptions, Record<string, never>>;
|
|
453
|
+
Strike: EmailMark<_tiptap_extension_strike0.StrikeOptions, any>;
|
|
454
|
+
Heading: EmailNode<_tiptap_extension_heading0.HeadingOptions, any>;
|
|
455
|
+
Divider: EmailNode<_tiptap_extension_horizontal_rule0.HorizontalRuleOptions, any>;
|
|
456
|
+
Link: EmailMark<_tiptap_extension_link0.LinkOptions, any>;
|
|
457
|
+
Sup: EmailMark<SupOptions, Record<string, never>>;
|
|
458
|
+
Uppercase: EmailMark<UppercaseOptions, Record<string, never>>;
|
|
459
|
+
PreservedStyle: EmailMark<Record<string, never>, Record<string, never>>;
|
|
460
|
+
Table: EmailNode<TableOptions, Record<string, never>>;
|
|
461
|
+
TableRow: EmailNode<TableRowOptions, Record<string, never>>;
|
|
462
|
+
TableCell: EmailNode<TableCellOptions, Record<string, never>>;
|
|
463
|
+
TableHeader: _tiptap_core6.Node<any, any>;
|
|
464
|
+
Body: EmailNode<BodyOptions, Record<string, never>>;
|
|
465
|
+
Div: EmailNode<DivOptions, Record<string, never>>;
|
|
466
|
+
Button: EmailNode<EditorButtonOptions, Record<string, never>>;
|
|
467
|
+
Section: EmailNode<SectionOptions, Record<string, never>>;
|
|
468
|
+
GlobalContent: _tiptap_core6.Node<GlobalContentOptions, any>;
|
|
469
|
+
AlignmentAttribute: Extension<AlignmentOptions, any>;
|
|
470
|
+
StyleAttribute: Extension<StyleAttributeOptions, any>;
|
|
471
|
+
ClassAttribute: Extension<ClassAttributeOptions, any>;
|
|
472
|
+
MaxNesting: Extension<MaxNestingOptions, any>;
|
|
473
|
+
};
|
|
474
|
+
type StarterKitOptions = { [Key in keyof StarterKitExtensionMap]: StarterKitExtensionMap[Key] extends Extendable<infer Options> ? Partial<Options> | false : never } & {
|
|
475
|
+
TiptapStarterKit: Partial<StarterKitOptions$1> | false;
|
|
476
|
+
};
|
|
477
|
+
declare const StarterKit: Extension<StarterKitOptions, any>;
|
|
478
|
+
//#endregion
|
|
479
|
+
//#region src/core/create-paste-handler.d.ts
|
|
480
|
+
type PasteHandler = (payload: string | File, view: EditorView) => boolean;
|
|
481
|
+
type UploadImageHandler = (file: File, view: EditorView, pos: number, preserveAttributes?: {
|
|
482
|
+
width?: string;
|
|
483
|
+
height?: string;
|
|
484
|
+
alignment?: string;
|
|
485
|
+
href?: string;
|
|
486
|
+
}) => void | Promise<void>;
|
|
487
|
+
//#endregion
|
|
488
|
+
//#region src/core/use-editor.d.ts
|
|
489
|
+
declare function useEditor({
|
|
490
|
+
content,
|
|
491
|
+
extensions,
|
|
492
|
+
onUpdate,
|
|
493
|
+
onPaste,
|
|
494
|
+
onUploadImage,
|
|
495
|
+
onReady,
|
|
496
|
+
editable,
|
|
497
|
+
...rest
|
|
498
|
+
}: {
|
|
499
|
+
content: Content;
|
|
500
|
+
extensions?: Extensions;
|
|
501
|
+
onUpdate?: (editor: Editor, transaction: {
|
|
502
|
+
getMeta: (key: string) => unknown;
|
|
503
|
+
}) => void;
|
|
504
|
+
onPaste?: PasteHandler;
|
|
505
|
+
onUploadImage?: UploadImageHandler;
|
|
506
|
+
onReady?: (editor: Editor | null) => void;
|
|
507
|
+
editable?: boolean;
|
|
508
|
+
} & UseEditorOptions): {
|
|
509
|
+
editor: Editor;
|
|
510
|
+
isEditorEmpty: boolean;
|
|
511
|
+
extensions: (_tiptap_core6.AnyExtension | _tiptap_core6.Extension<StarterKitOptions, any> | _tiptap_core6.Extension<_tiptap_extensions1.UndoRedoOptions, any>)[];
|
|
512
|
+
contentError: Error | null;
|
|
513
|
+
isCollaborative: boolean;
|
|
514
|
+
};
|
|
339
515
|
//#endregion
|
|
340
516
|
//#region src/ui/bubble-menu/create-mark-bubble-item.d.ts
|
|
341
517
|
interface PreWiredItemProps {
|
|
@@ -348,19 +524,19 @@ interface PreWiredItemProps {
|
|
|
348
524
|
declare function BubbleMenuAlignCenter({
|
|
349
525
|
className,
|
|
350
526
|
children
|
|
351
|
-
}: PreWiredItemProps):
|
|
527
|
+
}: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
|
|
352
528
|
//#endregion
|
|
353
529
|
//#region src/ui/bubble-menu/align-left.d.ts
|
|
354
530
|
declare function BubbleMenuAlignLeft({
|
|
355
531
|
className,
|
|
356
532
|
children
|
|
357
|
-
}: PreWiredItemProps):
|
|
533
|
+
}: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
|
|
358
534
|
//#endregion
|
|
359
535
|
//#region src/ui/bubble-menu/align-right.d.ts
|
|
360
536
|
declare function BubbleMenuAlignRight({
|
|
361
537
|
className,
|
|
362
538
|
children
|
|
363
|
-
}: PreWiredItemProps):
|
|
539
|
+
}: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
|
|
364
540
|
//#endregion
|
|
365
541
|
//#region src/ui/bubble-menu/default.d.ts
|
|
366
542
|
type ExcludableItem$3 = 'bold' | 'italic' | 'underline' | 'strike' | 'code' | 'uppercase' | 'align-left' | 'align-center' | 'align-right' | 'node-selector' | 'link-selector';
|
|
@@ -385,7 +561,7 @@ declare function BubbleMenuDefault({
|
|
|
385
561
|
offset,
|
|
386
562
|
onHide,
|
|
387
563
|
className
|
|
388
|
-
}: BubbleMenuDefaultProps):
|
|
564
|
+
}: BubbleMenuDefaultProps): react_jsx_runtime22.JSX.Element;
|
|
389
565
|
//#endregion
|
|
390
566
|
//#region src/ui/bubble-menu/group.d.ts
|
|
391
567
|
interface BubbleMenuItemGroupProps {
|
|
@@ -395,7 +571,7 @@ interface BubbleMenuItemGroupProps {
|
|
|
395
571
|
declare function BubbleMenuItemGroup({
|
|
396
572
|
className,
|
|
397
573
|
children
|
|
398
|
-
}: BubbleMenuItemGroupProps):
|
|
574
|
+
}: BubbleMenuItemGroupProps): react_jsx_runtime22.JSX.Element;
|
|
399
575
|
//#endregion
|
|
400
576
|
//#region src/ui/bubble-menu/item.d.ts
|
|
401
577
|
interface BubbleMenuItemProps extends React$1.ComponentProps<'button'> {
|
|
@@ -413,7 +589,7 @@ declare function BubbleMenuItem({
|
|
|
413
589
|
className,
|
|
414
590
|
children,
|
|
415
591
|
...rest
|
|
416
|
-
}: BubbleMenuItemProps):
|
|
592
|
+
}: BubbleMenuItemProps): react_jsx_runtime22.JSX.Element;
|
|
417
593
|
//#endregion
|
|
418
594
|
//#region src/ui/bubble-menu/link-selector.d.ts
|
|
419
595
|
interface BubbleMenuLinkSelectorProps {
|
|
@@ -442,7 +618,7 @@ declare function BubbleMenuLinkSelector({
|
|
|
442
618
|
children,
|
|
443
619
|
open: controlledOpen,
|
|
444
620
|
onOpenChange
|
|
445
|
-
}: BubbleMenuLinkSelectorProps):
|
|
621
|
+
}: BubbleMenuLinkSelectorProps): react_jsx_runtime22.JSX.Element | null;
|
|
446
622
|
//#endregion
|
|
447
623
|
//#region src/ui/bubble-menu/node-selector.d.ts
|
|
448
624
|
type NodeType = 'Text' | 'Title' | 'Subtitle' | 'Heading' | 'Bullet List' | 'Numbered List' | 'Quote' | 'Code';
|
|
@@ -468,7 +644,7 @@ declare function NodeSelectorRoot({
|
|
|
468
644
|
onOpenChange,
|
|
469
645
|
className,
|
|
470
646
|
children
|
|
471
|
-
}: NodeSelectorRootProps):
|
|
647
|
+
}: NodeSelectorRootProps): react_jsx_runtime22.JSX.Element | null;
|
|
472
648
|
interface NodeSelectorTriggerProps {
|
|
473
649
|
className?: string;
|
|
474
650
|
children?: React$1.ReactNode;
|
|
@@ -476,7 +652,7 @@ interface NodeSelectorTriggerProps {
|
|
|
476
652
|
declare function NodeSelectorTrigger({
|
|
477
653
|
className,
|
|
478
654
|
children
|
|
479
|
-
}: NodeSelectorTriggerProps):
|
|
655
|
+
}: NodeSelectorTriggerProps): react_jsx_runtime22.JSX.Element;
|
|
480
656
|
interface NodeSelectorContentProps {
|
|
481
657
|
className?: string;
|
|
482
658
|
/** Popover alignment (default: "start") */
|
|
@@ -489,7 +665,7 @@ declare function NodeSelectorContent({
|
|
|
489
665
|
className,
|
|
490
666
|
align,
|
|
491
667
|
children
|
|
492
|
-
}: NodeSelectorContentProps):
|
|
668
|
+
}: NodeSelectorContentProps): react_jsx_runtime22.JSX.Element;
|
|
493
669
|
interface BubbleMenuNodeSelectorProps {
|
|
494
670
|
/** Block types to exclude */
|
|
495
671
|
omit?: string[];
|
|
@@ -507,7 +683,7 @@ declare function BubbleMenuNodeSelector({
|
|
|
507
683
|
triggerContent,
|
|
508
684
|
open,
|
|
509
685
|
onOpenChange
|
|
510
|
-
}: BubbleMenuNodeSelectorProps):
|
|
686
|
+
}: BubbleMenuNodeSelectorProps): react_jsx_runtime22.JSX.Element;
|
|
511
687
|
//#endregion
|
|
512
688
|
//#region src/ui/bubble-menu/root.d.ts
|
|
513
689
|
interface BubbleMenuRootProps {
|
|
@@ -530,7 +706,7 @@ declare function BubbleMenuRoot({
|
|
|
530
706
|
onHide,
|
|
531
707
|
className,
|
|
532
708
|
children
|
|
533
|
-
}: BubbleMenuRootProps):
|
|
709
|
+
}: BubbleMenuRootProps): react_jsx_runtime22.JSX.Element | null;
|
|
534
710
|
//#endregion
|
|
535
711
|
//#region src/ui/bubble-menu/separator.d.ts
|
|
536
712
|
interface BubbleMenuSeparatorProps {
|
|
@@ -538,14 +714,14 @@ interface BubbleMenuSeparatorProps {
|
|
|
538
714
|
}
|
|
539
715
|
declare function BubbleMenuSeparator({
|
|
540
716
|
className
|
|
541
|
-
}: BubbleMenuSeparatorProps):
|
|
717
|
+
}: BubbleMenuSeparatorProps): react_jsx_runtime22.JSX.Element;
|
|
542
718
|
//#endregion
|
|
543
719
|
//#region src/ui/bubble-menu/bold.d.ts
|
|
544
720
|
declare const BubbleMenuBold: {
|
|
545
721
|
({
|
|
546
722
|
className,
|
|
547
723
|
children
|
|
548
|
-
}: PreWiredItemProps):
|
|
724
|
+
}: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
|
|
549
725
|
displayName: string;
|
|
550
726
|
};
|
|
551
727
|
//#endregion
|
|
@@ -554,7 +730,7 @@ declare const BubbleMenuCode: {
|
|
|
554
730
|
({
|
|
555
731
|
className,
|
|
556
732
|
children
|
|
557
|
-
}: PreWiredItemProps):
|
|
733
|
+
}: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
|
|
558
734
|
displayName: string;
|
|
559
735
|
};
|
|
560
736
|
//#endregion
|
|
@@ -563,7 +739,7 @@ declare const BubbleMenuItalic: {
|
|
|
563
739
|
({
|
|
564
740
|
className,
|
|
565
741
|
children
|
|
566
|
-
}: PreWiredItemProps):
|
|
742
|
+
}: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
|
|
567
743
|
displayName: string;
|
|
568
744
|
};
|
|
569
745
|
//#endregion
|
|
@@ -572,7 +748,7 @@ declare const BubbleMenuStrike: {
|
|
|
572
748
|
({
|
|
573
749
|
className,
|
|
574
750
|
children
|
|
575
|
-
}: PreWiredItemProps):
|
|
751
|
+
}: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
|
|
576
752
|
displayName: string;
|
|
577
753
|
};
|
|
578
754
|
//#endregion
|
|
@@ -581,7 +757,7 @@ declare const BubbleMenuUnderline: {
|
|
|
581
757
|
({
|
|
582
758
|
className,
|
|
583
759
|
children
|
|
584
|
-
}: PreWiredItemProps):
|
|
760
|
+
}: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
|
|
585
761
|
displayName: string;
|
|
586
762
|
};
|
|
587
763
|
//#endregion
|
|
@@ -590,7 +766,7 @@ declare const BubbleMenuUppercase: {
|
|
|
590
766
|
({
|
|
591
767
|
className,
|
|
592
768
|
children
|
|
593
|
-
}: PreWiredItemProps):
|
|
769
|
+
}: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
|
|
594
770
|
displayName: string;
|
|
595
771
|
};
|
|
596
772
|
//#endregion
|
|
@@ -604,42 +780,42 @@ declare const BubbleMenu: {
|
|
|
604
780
|
({
|
|
605
781
|
className,
|
|
606
782
|
children
|
|
607
|
-
}: PreWiredItemProps):
|
|
783
|
+
}: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
|
|
608
784
|
displayName: string;
|
|
609
785
|
};
|
|
610
786
|
readonly Italic: {
|
|
611
787
|
({
|
|
612
788
|
className,
|
|
613
789
|
children
|
|
614
|
-
}: PreWiredItemProps):
|
|
790
|
+
}: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
|
|
615
791
|
displayName: string;
|
|
616
792
|
};
|
|
617
793
|
readonly Underline: {
|
|
618
794
|
({
|
|
619
795
|
className,
|
|
620
796
|
children
|
|
621
|
-
}: PreWiredItemProps):
|
|
797
|
+
}: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
|
|
622
798
|
displayName: string;
|
|
623
799
|
};
|
|
624
800
|
readonly Strike: {
|
|
625
801
|
({
|
|
626
802
|
className,
|
|
627
803
|
children
|
|
628
|
-
}: PreWiredItemProps):
|
|
804
|
+
}: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
|
|
629
805
|
displayName: string;
|
|
630
806
|
};
|
|
631
807
|
readonly Code: {
|
|
632
808
|
({
|
|
633
809
|
className,
|
|
634
810
|
children
|
|
635
|
-
}: PreWiredItemProps):
|
|
811
|
+
}: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
|
|
636
812
|
displayName: string;
|
|
637
813
|
};
|
|
638
814
|
readonly Uppercase: {
|
|
639
815
|
({
|
|
640
816
|
className,
|
|
641
817
|
children
|
|
642
|
-
}: PreWiredItemProps):
|
|
818
|
+
}: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
|
|
643
819
|
displayName: string;
|
|
644
820
|
};
|
|
645
821
|
readonly AlignLeft: typeof BubbleMenuAlignLeft;
|
|
@@ -669,7 +845,7 @@ declare function ButtonBubbleMenuDefault({
|
|
|
669
845
|
offset,
|
|
670
846
|
onHide,
|
|
671
847
|
className
|
|
672
|
-
}: ButtonBubbleMenuDefaultProps):
|
|
848
|
+
}: ButtonBubbleMenuDefaultProps): react_jsx_runtime22.JSX.Element;
|
|
673
849
|
//#endregion
|
|
674
850
|
//#region src/ui/button-bubble-menu/edit-link.d.ts
|
|
675
851
|
interface ButtonBubbleMenuEditLinkProps extends Omit<React$1.ComponentProps<'button'>, 'type'> {}
|
|
@@ -679,7 +855,7 @@ declare function ButtonBubbleMenuEditLink({
|
|
|
679
855
|
onClick,
|
|
680
856
|
onMouseDown,
|
|
681
857
|
...rest
|
|
682
|
-
}: ButtonBubbleMenuEditLinkProps):
|
|
858
|
+
}: ButtonBubbleMenuEditLinkProps): react_jsx_runtime22.JSX.Element;
|
|
683
859
|
//#endregion
|
|
684
860
|
//#region src/ui/button-bubble-menu/root.d.ts
|
|
685
861
|
interface ButtonBubbleMenuRootProps {
|
|
@@ -699,14 +875,14 @@ declare function ButtonBubbleMenuRoot({
|
|
|
699
875
|
offset,
|
|
700
876
|
className,
|
|
701
877
|
children
|
|
702
|
-
}: ButtonBubbleMenuRootProps):
|
|
878
|
+
}: ButtonBubbleMenuRootProps): react_jsx_runtime22.JSX.Element | null;
|
|
703
879
|
//#endregion
|
|
704
880
|
//#region src/ui/button-bubble-menu/toolbar.d.ts
|
|
705
881
|
interface ButtonBubbleMenuToolbarProps extends React$1.ComponentProps<'div'> {}
|
|
706
882
|
declare function ButtonBubbleMenuToolbar({
|
|
707
883
|
children,
|
|
708
884
|
...rest
|
|
709
|
-
}: ButtonBubbleMenuToolbarProps):
|
|
885
|
+
}: ButtonBubbleMenuToolbarProps): react_jsx_runtime22.JSX.Element | null;
|
|
710
886
|
//#endregion
|
|
711
887
|
//#region src/ui/button-bubble-menu/context.d.ts
|
|
712
888
|
interface ButtonBubbleMenuContextValue {
|
|
@@ -739,7 +915,7 @@ declare function ImageBubbleMenuDefault({
|
|
|
739
915
|
offset,
|
|
740
916
|
onHide,
|
|
741
917
|
className
|
|
742
|
-
}: ImageBubbleMenuDefaultProps):
|
|
918
|
+
}: ImageBubbleMenuDefaultProps): react_jsx_runtime22.JSX.Element;
|
|
743
919
|
//#endregion
|
|
744
920
|
//#region src/ui/image-bubble-menu/edit-link.d.ts
|
|
745
921
|
interface ImageBubbleMenuEditLinkProps extends Omit<React$1.ComponentProps<'button'>, 'type'> {}
|
|
@@ -749,7 +925,7 @@ declare function ImageBubbleMenuEditLink({
|
|
|
749
925
|
onClick,
|
|
750
926
|
onMouseDown,
|
|
751
927
|
...rest
|
|
752
|
-
}: ImageBubbleMenuEditLinkProps):
|
|
928
|
+
}: ImageBubbleMenuEditLinkProps): react_jsx_runtime22.JSX.Element;
|
|
753
929
|
//#endregion
|
|
754
930
|
//#region src/ui/image-bubble-menu/root.d.ts
|
|
755
931
|
interface ImageBubbleMenuRootProps {
|
|
@@ -769,14 +945,14 @@ declare function ImageBubbleMenuRoot({
|
|
|
769
945
|
offset,
|
|
770
946
|
className,
|
|
771
947
|
children
|
|
772
|
-
}: ImageBubbleMenuRootProps):
|
|
948
|
+
}: ImageBubbleMenuRootProps): react_jsx_runtime22.JSX.Element | null;
|
|
773
949
|
//#endregion
|
|
774
950
|
//#region src/ui/image-bubble-menu/toolbar.d.ts
|
|
775
951
|
interface ImageBubbleMenuToolbarProps extends React$1.ComponentProps<'div'> {}
|
|
776
952
|
declare function ImageBubbleMenuToolbar({
|
|
777
953
|
children,
|
|
778
954
|
...rest
|
|
779
|
-
}: ImageBubbleMenuToolbarProps):
|
|
955
|
+
}: ImageBubbleMenuToolbarProps): react_jsx_runtime22.JSX.Element | null;
|
|
780
956
|
//#endregion
|
|
781
957
|
//#region src/ui/image-bubble-menu/context.d.ts
|
|
782
958
|
interface ImageBubbleMenuContextValue {
|
|
@@ -815,7 +991,7 @@ declare function LinkBubbleMenuDefault({
|
|
|
815
991
|
validateUrl,
|
|
816
992
|
onLinkApply,
|
|
817
993
|
onLinkRemove
|
|
818
|
-
}: LinkBubbleMenuDefaultProps):
|
|
994
|
+
}: LinkBubbleMenuDefaultProps): react_jsx_runtime22.JSX.Element;
|
|
819
995
|
//#endregion
|
|
820
996
|
//#region src/ui/link-bubble-menu/edit-link.d.ts
|
|
821
997
|
interface LinkBubbleMenuEditLinkProps extends Omit<React$1.ComponentProps<'button'>, 'type'> {}
|
|
@@ -825,7 +1001,7 @@ declare function LinkBubbleMenuEditLink({
|
|
|
825
1001
|
onClick,
|
|
826
1002
|
onMouseDown,
|
|
827
1003
|
...rest
|
|
828
|
-
}: LinkBubbleMenuEditLinkProps):
|
|
1004
|
+
}: LinkBubbleMenuEditLinkProps): react_jsx_runtime22.JSX.Element;
|
|
829
1005
|
//#endregion
|
|
830
1006
|
//#region src/ui/link-bubble-menu/form.d.ts
|
|
831
1007
|
interface LinkBubbleMenuFormProps {
|
|
@@ -845,7 +1021,7 @@ declare function LinkBubbleMenuForm({
|
|
|
845
1021
|
onLinkApply,
|
|
846
1022
|
onLinkRemove,
|
|
847
1023
|
children
|
|
848
|
-
}: LinkBubbleMenuFormProps):
|
|
1024
|
+
}: LinkBubbleMenuFormProps): react_jsx_runtime22.JSX.Element | null;
|
|
849
1025
|
//#endregion
|
|
850
1026
|
//#region src/ui/link-bubble-menu/open-link.d.ts
|
|
851
1027
|
interface LinkBubbleMenuOpenLinkProps extends Omit<React$1.ComponentProps<'a'>, 'href' | 'target' | 'rel'> {}
|
|
@@ -853,7 +1029,7 @@ declare function LinkBubbleMenuOpenLink({
|
|
|
853
1029
|
className,
|
|
854
1030
|
children,
|
|
855
1031
|
...rest
|
|
856
|
-
}: LinkBubbleMenuOpenLinkProps):
|
|
1032
|
+
}: LinkBubbleMenuOpenLinkProps): react_jsx_runtime22.JSX.Element;
|
|
857
1033
|
//#endregion
|
|
858
1034
|
//#region src/ui/link-bubble-menu/root.d.ts
|
|
859
1035
|
interface LinkBubbleMenuRootProps {
|
|
@@ -873,14 +1049,14 @@ declare function LinkBubbleMenuRoot({
|
|
|
873
1049
|
offset,
|
|
874
1050
|
className,
|
|
875
1051
|
children
|
|
876
|
-
}: LinkBubbleMenuRootProps):
|
|
1052
|
+
}: LinkBubbleMenuRootProps): react_jsx_runtime22.JSX.Element | null;
|
|
877
1053
|
//#endregion
|
|
878
1054
|
//#region src/ui/link-bubble-menu/toolbar.d.ts
|
|
879
1055
|
interface LinkBubbleMenuToolbarProps extends React$1.ComponentProps<'div'> {}
|
|
880
1056
|
declare function LinkBubbleMenuToolbar({
|
|
881
1057
|
children,
|
|
882
1058
|
...rest
|
|
883
|
-
}: LinkBubbleMenuToolbarProps):
|
|
1059
|
+
}: LinkBubbleMenuToolbarProps): react_jsx_runtime22.JSX.Element | null;
|
|
884
1060
|
//#endregion
|
|
885
1061
|
//#region src/ui/link-bubble-menu/unlink.d.ts
|
|
886
1062
|
interface LinkBubbleMenuUnlinkProps extends Omit<React$1.ComponentProps<'button'>, 'type'> {}
|
|
@@ -890,7 +1066,7 @@ declare function LinkBubbleMenuUnlink({
|
|
|
890
1066
|
onClick,
|
|
891
1067
|
onMouseDown,
|
|
892
1068
|
...rest
|
|
893
|
-
}: LinkBubbleMenuUnlinkProps):
|
|
1069
|
+
}: LinkBubbleMenuUnlinkProps): react_jsx_runtime22.JSX.Element;
|
|
894
1070
|
//#endregion
|
|
895
1071
|
//#region src/ui/link-bubble-menu/context.d.ts
|
|
896
1072
|
interface LinkBubbleMenuContextValue {
|
|
@@ -920,9 +1096,7 @@ interface SearchableItem {
|
|
|
920
1096
|
searchTerms?: string[];
|
|
921
1097
|
}
|
|
922
1098
|
interface SlashCommandItem extends SearchableItem {
|
|
923
|
-
icon:
|
|
924
|
-
size?: number;
|
|
925
|
-
}>;
|
|
1099
|
+
icon: ReactNode;
|
|
926
1100
|
category: SlashCommandCategory;
|
|
927
1101
|
command: (props: SlashCommandProps) => void;
|
|
928
1102
|
}
|
|
@@ -951,7 +1125,7 @@ declare function CommandList({
|
|
|
951
1125
|
command,
|
|
952
1126
|
query,
|
|
953
1127
|
ref
|
|
954
|
-
}: CommandListProps):
|
|
1128
|
+
}: CommandListProps): react_jsx_runtime22.JSX.Element;
|
|
955
1129
|
//#endregion
|
|
956
1130
|
//#region src/ui/slash-command/commands.d.ts
|
|
957
1131
|
declare const TEXT: SlashCommandItem;
|
|
@@ -975,7 +1149,7 @@ declare function createSlashCommand(options?: {
|
|
|
975
1149
|
items?: SlashCommandItem[];
|
|
976
1150
|
filterItems?: (items: SlashCommandItem[], query: string, editor: Editor) => SlashCommandItem[];
|
|
977
1151
|
component?: CommandListComponent;
|
|
978
|
-
}):
|
|
1152
|
+
}): _tiptap_core6.Extension<any, any>;
|
|
979
1153
|
//#endregion
|
|
980
1154
|
//#region src/ui/slash-command/search.d.ts
|
|
981
1155
|
declare function scoreItem(item: SearchableItem, query: string): number;
|
|
@@ -986,10 +1160,10 @@ declare function isInsideNode(editor: Editor, type: string): boolean;
|
|
|
986
1160
|
declare function isAtMaxColumnsDepth(editor: Editor): boolean;
|
|
987
1161
|
//#endregion
|
|
988
1162
|
//#region src/ui/slash-command/index.d.ts
|
|
989
|
-
declare const SlashCommand:
|
|
1163
|
+
declare const SlashCommand: _tiptap_core6.Extension<any, any>;
|
|
990
1164
|
//#endregion
|
|
991
1165
|
//#region src/utils/set-text-alignment.d.ts
|
|
992
1166
|
declare function setTextAlignment(editor: Editor, alignment: string): void;
|
|
993
1167
|
//#endregion
|
|
994
|
-
export { AlignmentAttribute, AlignmentOptions, BULLET_LIST, BUTTON, Body, BodyOptions, Bold, BoldOptions, BubbleMenu, BubbleMenuAlignCenter, BubbleMenuAlignLeft, BubbleMenuAlignRight, BubbleMenuBold, BubbleMenuCode, BubbleMenuDefault, type BubbleMenuDefaultProps, BubbleMenuItalic, BubbleMenuItem, BubbleMenuItemGroup, type BubbleMenuItemGroupProps, type BubbleMenuItemProps, BubbleMenuLinkSelector, type BubbleMenuLinkSelectorProps, BubbleMenuNodeSelector, type BubbleMenuNodeSelectorProps, BubbleMenuRoot, type BubbleMenuRootProps, BubbleMenuSeparator, type BubbleMenuSeparatorProps, BubbleMenuStrike, BubbleMenuUnderline, BubbleMenuUppercase, Button, ButtonBubbleMenu, ButtonBubbleMenuDefault, type ButtonBubbleMenuDefaultProps, ButtonBubbleMenuEditLink, type ButtonBubbleMenuEditLinkProps, ButtonBubbleMenuRoot, type ButtonBubbleMenuRootProps, ButtonBubbleMenuToolbar, type ButtonBubbleMenuToolbarProps, CODE, COLUMN_PARENT_TYPES, ClassAttribute, ClassAttributeOptions, CodeBlockPrism, CodeBlockPrismOptions, ColumnsColumn, CommandList, type CommandListComponent, type CommandListProps, type CommandListRef, DIVIDER, Div, DivOptions, EditorButtonOptions, EditorEventHandler, EditorEventMap, EditorEventName, EditorEventSubscription, EmailNode, EmailNodeConfig, FOUR_COLUMNS, FourColumns, H1, H2, H3, ImageBubbleMenu, ImageBubbleMenuDefault, type ImageBubbleMenuDefaultProps, ImageBubbleMenuEditLink, type ImageBubbleMenuEditLinkProps, ImageBubbleMenuRoot, type ImageBubbleMenuRootProps, ImageBubbleMenuToolbar, type ImageBubbleMenuToolbarProps, LinkBubbleMenu, LinkBubbleMenuDefault, type LinkBubbleMenuDefaultProps, LinkBubbleMenuEditLink, type LinkBubbleMenuEditLinkProps, LinkBubbleMenuForm, type LinkBubbleMenuFormProps, LinkBubbleMenuOpenLink, type LinkBubbleMenuOpenLinkProps, LinkBubbleMenuRoot, type LinkBubbleMenuRootProps, LinkBubbleMenuToolbar, type LinkBubbleMenuToolbarProps, LinkBubbleMenuUnlink, type LinkBubbleMenuUnlinkProps, MAX_COLUMNS_DEPTH, MaxNesting, MaxNestingOptions, NUMBERED_LIST, NodeSelectorContent, type NodeSelectorContentProps, type NodeSelectorItem, NodeSelectorRoot, type NodeSelectorRootProps, NodeSelectorTrigger, type NodeSelectorTriggerProps, type NodeType, Placeholder, PlaceholderOptions, type PreWiredItemProps, PreservedStyle, PreviewText, PreviewTextOptions, QUOTE, RendererComponent, SECTION, type SearchableItem, Section, SlashCommand, type SlashCommandItem, type SlashCommandProps, StyleAttribute, StyleAttributeOptions, Sup, SupOptions, TEXT, THREE_COLUMNS, TWO_COLUMNS, Table, TableCell, TableCellOptions, TableHeader, TableOptions, TableRow, TableRowOptions, ThreeColumns, TwoColumns, Uppercase, UppercaseOptions,
|
|
1168
|
+
export { AlignmentAttribute, AlignmentOptions, BULLET_LIST, BUTTON, Blockquote, Body, BodyOptions, Bold, BoldOptions, BubbleMenu, BubbleMenuAlignCenter, BubbleMenuAlignLeft, BubbleMenuAlignRight, BubbleMenuBold, BubbleMenuCode, BubbleMenuDefault, type BubbleMenuDefaultProps, BubbleMenuItalic, BubbleMenuItem, BubbleMenuItemGroup, type BubbleMenuItemGroupProps, type BubbleMenuItemProps, BubbleMenuLinkSelector, type BubbleMenuLinkSelectorProps, BubbleMenuNodeSelector, type BubbleMenuNodeSelectorProps, BubbleMenuRoot, type BubbleMenuRootProps, BubbleMenuSeparator, type BubbleMenuSeparatorProps, BubbleMenuStrike, BubbleMenuUnderline, BubbleMenuUppercase, BulletList, Button, ButtonBubbleMenu, ButtonBubbleMenuDefault, type ButtonBubbleMenuDefaultProps, ButtonBubbleMenuEditLink, type ButtonBubbleMenuEditLinkProps, ButtonBubbleMenuRoot, type ButtonBubbleMenuRootProps, ButtonBubbleMenuToolbar, type ButtonBubbleMenuToolbarProps, CODE, COLUMN_PARENT_TYPES, ClassAttribute, ClassAttributeOptions, Code, CodeBlockPrism, CodeBlockPrismOptions, ColumnsColumn, CommandList, type CommandListComponent, type CommandListProps, type CommandListRef, DIVIDER, Div, DivOptions, EditorButtonOptions, EditorEventHandler, EditorEventMap, EditorEventName, EditorEventSubscription, EmailNode, EmailNodeConfig, FOUR_COLUMNS, FourColumns, GlobalContent, GlobalContentOptions, H1, H2, H3, HardBreak, ImageBubbleMenu, ImageBubbleMenuDefault, type ImageBubbleMenuDefaultProps, ImageBubbleMenuEditLink, type ImageBubbleMenuEditLinkProps, ImageBubbleMenuRoot, type ImageBubbleMenuRootProps, ImageBubbleMenuToolbar, type ImageBubbleMenuToolbarProps, Italic, LinkBubbleMenu, LinkBubbleMenuDefault, type LinkBubbleMenuDefaultProps, LinkBubbleMenuEditLink, type LinkBubbleMenuEditLinkProps, LinkBubbleMenuForm, type LinkBubbleMenuFormProps, LinkBubbleMenuOpenLink, type LinkBubbleMenuOpenLinkProps, LinkBubbleMenuRoot, type LinkBubbleMenuRootProps, LinkBubbleMenuToolbar, type LinkBubbleMenuToolbarProps, LinkBubbleMenuUnlink, type LinkBubbleMenuUnlinkProps, ListItem, MAX_COLUMNS_DEPTH, MaxNesting, MaxNestingOptions, NUMBERED_LIST, NodeSelectorContent, type NodeSelectorContentProps, type NodeSelectorItem, NodeSelectorRoot, type NodeSelectorRootProps, NodeSelectorTrigger, type NodeSelectorTriggerProps, type NodeType, OrderedList, Paragraph, Placeholder, PlaceholderOptions, type PreWiredItemProps, PreservedStyle, PreviewText, PreviewTextOptions, QUOTE, RendererComponent, SECTION, type SearchableItem, Section, SectionOptions, SlashCommand, type SlashCommandItem, type SlashCommandProps, StarterKit, StarterKitOptions, Strike, StyleAttribute, StyleAttributeOptions, Sup, SupOptions, TEXT, THREE_COLUMNS, TWO_COLUMNS, Table, TableCell, TableCellOptions, TableHeader, TableOptions, TableRow, TableRowOptions, ThreeColumns, TwoColumns, Uppercase, UppercaseOptions, composeReactEmail, createSlashCommand, defaultSlashCommands, editorEventBus, filterAndRankItems, getColumnsDepth, getGlobalContent, isAtMaxColumnsDepth, isInsideNode, processStylesForUnlink, scoreItem, setTextAlignment, useButtonBubbleMenuContext, useEditor, useImageBubbleMenuContext, useLinkBubbleMenuContext };
|
|
995
1169
|
//# sourceMappingURL=index.d.mts.map
|