@prismicio/editor-fields 0.4.62-alpha.jp-table-render-default-layout.0 → 0.4.62
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/core/MediaLibrary/hooks/mediaLibraryData.d.ts +45 -45
- package/dist/core/MediaLibrary/hooks/useMediaLibraryUpload.d.ts +5 -5
- package/dist/core/MediaLibrary/hooks/useSelectedMedia.d.ts +5 -5
- package/dist/core/UnsplashLibrary/unsplashData.d.ts +18 -18
- package/dist/core/service/customType.d.ts +18 -18
- package/dist/core/service/document.d.ts +1323 -870
- package/dist/core/service/documentSearch.d.ts +15 -15
- package/dist/core/service/role.d.ts +0 -1
- package/dist/fields/ImageField/useImageField.d.ts +5 -5
- package/dist/fields/ImageField/useImageFieldImageUpload.d.ts +5 -5
- package/dist/fields/LinkField/Documents/DocumentCard.d.ts +2 -0
- package/dist/fields/LinkField/Documents/documentsData.d.ts +6 -6
- package/dist/fields/LinkField/LinkField.d.ts +1 -1
- package/dist/fields/LinkField/useLinkField.d.ts +1 -1
- package/dist/fields/RichTextField/BubbleMenu/BubbleMenu.d.ts +1 -0
- package/dist/fields/RichTextField/RichTextField.d.ts +4 -5
- package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +4 -4
- package/dist/fields/RichTextField/extensions/Image/useImageView.d.ts +7 -7
- package/dist/fields/RichTextField/extensions/extensions.d.ts +1 -1
- package/dist/fields/RichTextField/models/helpers/NodeUtils.d.ts +1 -1
- package/dist/fields/RichTextField/types.d.ts +9 -5
- package/dist/index.cjs.js +52 -52
- package/dist/index.es.js +14731 -14628
- package/dist/slices/utils.d.ts +94 -70
- package/package.json +5 -5
|
@@ -45,8 +45,8 @@ export declare function searchDocuments(args: SearchDocumentsArgs): Promise<{
|
|
|
45
45
|
} | {
|
|
46
46
|
status: "archived";
|
|
47
47
|
}) & {
|
|
48
|
-
tags: string[];
|
|
49
48
|
version_id: string;
|
|
49
|
+
tags: string[];
|
|
50
50
|
last_modified_date: Date;
|
|
51
51
|
custom_type_label: string;
|
|
52
52
|
author: {
|
|
@@ -77,13 +77,13 @@ export declare function searchDocuments(args: SearchDocumentsArgs): Promise<{
|
|
|
77
77
|
} | {
|
|
78
78
|
status: "archived";
|
|
79
79
|
}) & {
|
|
80
|
-
tags: string[];
|
|
81
80
|
version_id: string;
|
|
81
|
+
tags: string[];
|
|
82
82
|
last_modified_date: Date;
|
|
83
|
+
summary?: string | undefined;
|
|
83
84
|
preview_image?: string | undefined;
|
|
84
85
|
uid?: string | undefined;
|
|
85
86
|
custom_type_id?: string | undefined;
|
|
86
|
-
summary?: string | undefined;
|
|
87
87
|
author_ids?: string[] | undefined;
|
|
88
88
|
highlights?: {
|
|
89
89
|
uid?: string | undefined;
|
|
@@ -131,8 +131,8 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
|
|
|
131
131
|
} | {
|
|
132
132
|
status: "archived";
|
|
133
133
|
}) & {
|
|
134
|
-
tags: string[];
|
|
135
134
|
version_id: string;
|
|
135
|
+
tags: string[];
|
|
136
136
|
last_modified_date: Date;
|
|
137
137
|
custom_type_label: string;
|
|
138
138
|
author: {
|
|
@@ -163,13 +163,13 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
|
|
|
163
163
|
} | {
|
|
164
164
|
status: "archived";
|
|
165
165
|
}) & {
|
|
166
|
-
tags: string[];
|
|
167
166
|
version_id: string;
|
|
167
|
+
tags: string[];
|
|
168
168
|
last_modified_date: Date;
|
|
169
|
+
summary?: string | undefined;
|
|
169
170
|
preview_image?: string | undefined;
|
|
170
171
|
uid?: string | undefined;
|
|
171
172
|
custom_type_id?: string | undefined;
|
|
172
|
-
summary?: string | undefined;
|
|
173
173
|
author_ids?: string[] | undefined;
|
|
174
174
|
highlights?: {
|
|
175
175
|
uid?: string | undefined;
|
|
@@ -197,8 +197,8 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
|
|
|
197
197
|
} | {
|
|
198
198
|
status: "archived";
|
|
199
199
|
}) & {
|
|
200
|
-
tags: string[];
|
|
201
200
|
version_id: string;
|
|
201
|
+
tags: string[];
|
|
202
202
|
last_modified_date: Date;
|
|
203
203
|
custom_type_label: string;
|
|
204
204
|
author: {
|
|
@@ -229,13 +229,13 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
|
|
|
229
229
|
} | {
|
|
230
230
|
status: "archived";
|
|
231
231
|
}) & {
|
|
232
|
-
tags: string[];
|
|
233
232
|
version_id: string;
|
|
233
|
+
tags: string[];
|
|
234
234
|
last_modified_date: Date;
|
|
235
|
+
summary?: string | undefined;
|
|
235
236
|
preview_image?: string | undefined;
|
|
236
237
|
uid?: string | undefined;
|
|
237
238
|
custom_type_id?: string | undefined;
|
|
238
|
-
summary?: string | undefined;
|
|
239
239
|
author_ids?: string[] | undefined;
|
|
240
240
|
highlights?: {
|
|
241
241
|
uid?: string | undefined;
|
|
@@ -285,8 +285,8 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
|
|
|
285
285
|
} | {
|
|
286
286
|
status: "archived";
|
|
287
287
|
}) & {
|
|
288
|
-
tags: string[];
|
|
289
288
|
version_id: string;
|
|
289
|
+
tags: string[];
|
|
290
290
|
last_modified_date: Date;
|
|
291
291
|
custom_type_label: string;
|
|
292
292
|
author: {
|
|
@@ -317,13 +317,13 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
|
|
|
317
317
|
} | {
|
|
318
318
|
status: "archived";
|
|
319
319
|
}) & {
|
|
320
|
-
tags: string[];
|
|
321
320
|
version_id: string;
|
|
321
|
+
tags: string[];
|
|
322
322
|
last_modified_date: Date;
|
|
323
|
+
summary?: string | undefined;
|
|
323
324
|
preview_image?: string | undefined;
|
|
324
325
|
uid?: string | undefined;
|
|
325
326
|
custom_type_id?: string | undefined;
|
|
326
|
-
summary?: string | undefined;
|
|
327
327
|
author_ids?: string[] | undefined;
|
|
328
328
|
highlights?: {
|
|
329
329
|
uid?: string | undefined;
|
|
@@ -374,8 +374,8 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
|
|
|
374
374
|
} | {
|
|
375
375
|
status: "archived";
|
|
376
376
|
}) & {
|
|
377
|
-
tags: string[];
|
|
378
377
|
version_id: string;
|
|
378
|
+
tags: string[];
|
|
379
379
|
last_modified_date: Date;
|
|
380
380
|
custom_type_label: string;
|
|
381
381
|
author: {
|
|
@@ -406,13 +406,13 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
|
|
|
406
406
|
} | {
|
|
407
407
|
status: "archived";
|
|
408
408
|
}) & {
|
|
409
|
-
tags: string[];
|
|
410
409
|
version_id: string;
|
|
410
|
+
tags: string[];
|
|
411
411
|
last_modified_date: Date;
|
|
412
|
+
summary?: string | undefined;
|
|
412
413
|
preview_image?: string | undefined;
|
|
413
414
|
uid?: string | undefined;
|
|
414
415
|
custom_type_id?: string | undefined;
|
|
415
|
-
summary?: string | undefined;
|
|
416
416
|
author_ids?: string[] | undefined;
|
|
417
417
|
highlights?: {
|
|
418
418
|
uid?: string | undefined;
|
|
@@ -85,7 +85,6 @@ interface GetTeamSpacesArgs {
|
|
|
85
85
|
baseUrl: URL;
|
|
86
86
|
repository: string;
|
|
87
87
|
authStrategy: AuthStrategy;
|
|
88
|
-
fetchEnabled: boolean;
|
|
89
88
|
}
|
|
90
89
|
export declare function getTeamSpaces(args: GetTeamSpacesArgs): Promise<TeamSpacesResponse>;
|
|
91
90
|
export declare function getTeamSpacesOptions(args: GetTeamSpacesArgs): import("@tanstack/react-query/build/legacy/types").UseQueryOptions<{
|
|
@@ -88,6 +88,10 @@ export declare function useImageField(props: useImageFieldProps): {
|
|
|
88
88
|
}) | undefined;
|
|
89
89
|
onClear: () => void;
|
|
90
90
|
uploadImage: import("@tanstack/react-query/build/legacy/types").UseMutateFunction<{
|
|
91
|
+
kind: string;
|
|
92
|
+
id: string;
|
|
93
|
+
url: string;
|
|
94
|
+
size: number;
|
|
91
95
|
tags: {
|
|
92
96
|
name: string;
|
|
93
97
|
id: string;
|
|
@@ -96,14 +100,10 @@ export declare function useImageField(props: useImageFieldProps): {
|
|
|
96
100
|
count: number;
|
|
97
101
|
uploader_id?: string | undefined;
|
|
98
102
|
}[];
|
|
99
|
-
id: string;
|
|
100
|
-
url: string;
|
|
101
|
-
kind: string;
|
|
102
|
-
size: number;
|
|
103
103
|
last_modified: number;
|
|
104
104
|
filename: string;
|
|
105
|
-
width?: number | undefined;
|
|
106
105
|
height?: number | undefined;
|
|
106
|
+
width?: number | undefined;
|
|
107
107
|
credits?: string | undefined;
|
|
108
108
|
alt?: string | undefined;
|
|
109
109
|
notes?: string | undefined;
|
|
@@ -4,6 +4,10 @@ interface UseImageFieldImageUploadArgs {
|
|
|
4
4
|
}
|
|
5
5
|
export declare function useImageFieldImageUpload(args: UseImageFieldImageUploadArgs): {
|
|
6
6
|
uploadImage: import("@tanstack/react-query/build/legacy/types").UseMutateFunction<{
|
|
7
|
+
kind: string;
|
|
8
|
+
id: string;
|
|
9
|
+
url: string;
|
|
10
|
+
size: number;
|
|
7
11
|
tags: {
|
|
8
12
|
name: string;
|
|
9
13
|
id: string;
|
|
@@ -12,14 +16,10 @@ export declare function useImageFieldImageUpload(args: UseImageFieldImageUploadA
|
|
|
12
16
|
count: number;
|
|
13
17
|
uploader_id?: string | undefined;
|
|
14
18
|
}[];
|
|
15
|
-
id: string;
|
|
16
|
-
url: string;
|
|
17
|
-
kind: string;
|
|
18
|
-
size: number;
|
|
19
19
|
last_modified: number;
|
|
20
20
|
filename: string;
|
|
21
|
-
width?: number | undefined;
|
|
22
21
|
height?: number | undefined;
|
|
22
|
+
width?: number | undefined;
|
|
23
23
|
credits?: string | undefined;
|
|
24
24
|
alt?: string | undefined;
|
|
25
25
|
notes?: string | undefined;
|
|
@@ -10,6 +10,8 @@ export interface DocumentCardProps {
|
|
|
10
10
|
tags: string[];
|
|
11
11
|
tagsFilter?: Set<FilterOption>;
|
|
12
12
|
highlighted?: boolean;
|
|
13
|
+
highlightedUID?: string;
|
|
14
|
+
searchTerm?: string;
|
|
13
15
|
onSelect: () => void;
|
|
14
16
|
}
|
|
15
17
|
export declare function DocumentCard(props: DocumentCardProps): JSX.Element;
|
|
@@ -16,8 +16,8 @@ export declare function useDocuments(params: {
|
|
|
16
16
|
} | {
|
|
17
17
|
status: "archived";
|
|
18
18
|
}) & {
|
|
19
|
-
tags: string[];
|
|
20
19
|
version_id: string;
|
|
20
|
+
tags: string[];
|
|
21
21
|
last_modified_date: Date;
|
|
22
22
|
custom_type_label: string;
|
|
23
23
|
author: {
|
|
@@ -39,13 +39,13 @@ export declare function useDocuments(params: {
|
|
|
39
39
|
} | {
|
|
40
40
|
status: "archived";
|
|
41
41
|
}) & {
|
|
42
|
-
tags: string[];
|
|
43
42
|
version_id: string;
|
|
43
|
+
tags: string[];
|
|
44
44
|
last_modified_date: Date;
|
|
45
|
+
summary?: string | undefined;
|
|
45
46
|
preview_image?: string | undefined;
|
|
46
47
|
uid?: string | undefined;
|
|
47
48
|
custom_type_id?: string | undefined;
|
|
48
|
-
summary?: string | undefined;
|
|
49
49
|
author_ids?: string[] | undefined;
|
|
50
50
|
highlights?: {
|
|
51
51
|
uid?: string | undefined;
|
|
@@ -71,8 +71,8 @@ export declare function useDocuments(params: {
|
|
|
71
71
|
} | {
|
|
72
72
|
status: "archived";
|
|
73
73
|
}) & {
|
|
74
|
-
tags: string[];
|
|
75
74
|
version_id: string;
|
|
75
|
+
tags: string[];
|
|
76
76
|
last_modified_date: Date;
|
|
77
77
|
custom_type_label: string;
|
|
78
78
|
author: {
|
|
@@ -94,13 +94,13 @@ export declare function useDocuments(params: {
|
|
|
94
94
|
} | {
|
|
95
95
|
status: "archived";
|
|
96
96
|
}) & {
|
|
97
|
-
tags: string[];
|
|
98
97
|
version_id: string;
|
|
98
|
+
tags: string[];
|
|
99
99
|
last_modified_date: Date;
|
|
100
|
+
summary?: string | undefined;
|
|
100
101
|
preview_image?: string | undefined;
|
|
101
102
|
uid?: string | undefined;
|
|
102
103
|
custom_type_id?: string | undefined;
|
|
103
|
-
summary?: string | undefined;
|
|
104
104
|
author_ids?: string[] | undefined;
|
|
105
105
|
highlights?: {
|
|
106
106
|
uid?: string | undefined;
|
|
@@ -16,7 +16,7 @@ interface GetFieldIconArgs {
|
|
|
16
16
|
selectType?: FieldSelectType;
|
|
17
17
|
displayTextEnabled?: boolean;
|
|
18
18
|
}
|
|
19
|
-
export declare function getFieldIcon(args: GetFieldIconArgs): "
|
|
19
|
+
export declare function getFieldIcon(args: GetFieldIconArgs): "description" | "image" | "link" | "notes" | "public";
|
|
20
20
|
interface FilledLinkFieldProps {
|
|
21
21
|
id?: string;
|
|
22
22
|
appearance?: LinkFieldAppearance;
|
|
@@ -11,7 +11,7 @@ interface useLinkFieldParams {
|
|
|
11
11
|
}
|
|
12
12
|
export declare function useLinkField(params: useLinkFieldParams): {
|
|
13
13
|
contentType: "ImageLink" | "FileLink" | "DocumentLink" | "ExternalLink" | "MediaLink" | "AnyLink" | undefined;
|
|
14
|
-
selectType: "
|
|
14
|
+
selectType: "document" | "web" | "media" | "any" | undefined;
|
|
15
15
|
fieldValue: string;
|
|
16
16
|
onDisplayTextChange: (displayText: string) => void;
|
|
17
17
|
onValueChange: (value: string, options?: {
|
|
@@ -4,6 +4,7 @@ interface BubbleMenuProps {
|
|
|
4
4
|
editor: Editor;
|
|
5
5
|
nodeTypes: string[];
|
|
6
6
|
labels: string[];
|
|
7
|
+
hideDisabledOptions?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export type Modal = "webLink" | "documentLink" | "mediaLink" | undefined;
|
|
9
10
|
export declare function BubbleMenu(props: BubbleMenuProps): JSX.Element | null;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { RichText } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import type { ExtendedRichTextContent } from "./types";
|
|
4
|
-
interface Props<
|
|
4
|
+
interface Props<TContent extends ExtendedRichTextContent> {
|
|
5
5
|
id: string;
|
|
6
|
-
content:
|
|
6
|
+
content: TContent | undefined;
|
|
7
7
|
field: RichText;
|
|
8
8
|
readOnly: boolean;
|
|
9
|
-
onContentChange: (content:
|
|
10
|
-
converter?: (value: T) => ExtendedRichTextContent;
|
|
9
|
+
onContentChange: (content: TContent | undefined) => void;
|
|
11
10
|
}
|
|
12
|
-
export declare function RichTextField<
|
|
11
|
+
export declare function RichTextField<TContent extends ExtendedRichTextContent>(props: Props<TContent>): JSX.Element;
|
|
13
12
|
export {};
|
|
@@ -3,7 +3,7 @@ declare const _default: {
|
|
|
3
3
|
component: import("@tiptap/core").Node<import("@tiptap/extension-list-item").ListItemOptions, any>;
|
|
4
4
|
converter: {
|
|
5
5
|
fromPrismic(schema: Schema<any, any>): (list: {
|
|
6
|
-
type: "
|
|
6
|
+
type: "em" | "embed" | "strong" | "image" | "list-item" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "paragraph" | "preformatted" | "hyperlink" | "o-list-item" | "rtl";
|
|
7
7
|
content: {
|
|
8
8
|
text: string;
|
|
9
9
|
} & {
|
|
@@ -56,7 +56,7 @@ declare const _default: {
|
|
|
56
56
|
} | {
|
|
57
57
|
start: number;
|
|
58
58
|
end: number;
|
|
59
|
-
type: "
|
|
59
|
+
type: "em" | "strong" | "list-item";
|
|
60
60
|
})[] | undefined;
|
|
61
61
|
};
|
|
62
62
|
} & {
|
|
@@ -64,7 +64,7 @@ declare const _default: {
|
|
|
64
64
|
direction?: string | undefined;
|
|
65
65
|
}) => ProsemirrorNode | undefined;
|
|
66
66
|
toPrismic(node: ProsemirrorNode, nodeType: "list-item" | "o-list-item"): readonly ({
|
|
67
|
-
type: "
|
|
67
|
+
type: "em" | "embed" | "strong" | "image" | "list-item" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "paragraph" | "preformatted" | "hyperlink" | "o-list-item" | "rtl";
|
|
68
68
|
content: {
|
|
69
69
|
text: string;
|
|
70
70
|
} & {
|
|
@@ -117,7 +117,7 @@ declare const _default: {
|
|
|
117
117
|
} | {
|
|
118
118
|
start: number;
|
|
119
119
|
end: number;
|
|
120
|
-
type: "
|
|
120
|
+
type: "em" | "strong" | "list-item";
|
|
121
121
|
})[] | undefined;
|
|
122
122
|
};
|
|
123
123
|
} & {
|
|
@@ -23,28 +23,28 @@ export declare function useImageView(props: useImageViewProps): {
|
|
|
23
23
|
tags: {
|
|
24
24
|
name: string;
|
|
25
25
|
id: string;
|
|
26
|
-
created_at: number;
|
|
27
26
|
last_modified: number;
|
|
27
|
+
created_at: number;
|
|
28
28
|
count: number;
|
|
29
29
|
uploader_id?: string | undefined;
|
|
30
30
|
}[];
|
|
31
|
+
size: number;
|
|
31
32
|
id: string;
|
|
32
|
-
url: string;
|
|
33
33
|
kind: string;
|
|
34
|
-
|
|
35
|
-
last_modified: number;
|
|
34
|
+
url: string;
|
|
36
35
|
filename: string;
|
|
36
|
+
last_modified: number;
|
|
37
|
+
notes?: string | undefined;
|
|
37
38
|
width?: number | undefined;
|
|
38
39
|
height?: number | undefined;
|
|
39
40
|
credits?: string | undefined;
|
|
40
41
|
alt?: string | undefined;
|
|
41
|
-
notes?: string | undefined;
|
|
42
|
-
uploader_id?: string | undefined;
|
|
43
42
|
extension?: string | undefined;
|
|
43
|
+
uploader_id?: string | undefined;
|
|
44
44
|
search_highlight?: {
|
|
45
|
+
notes?: string | undefined;
|
|
45
46
|
credits?: string | undefined;
|
|
46
47
|
alt?: string | undefined;
|
|
47
|
-
notes?: string | undefined;
|
|
48
48
|
filename?: string | undefined;
|
|
49
49
|
} | undefined;
|
|
50
50
|
}, Error, File, unknown>;
|
|
@@ -12,7 +12,7 @@ import { Link } from "./Link/Link";
|
|
|
12
12
|
import { default as OrderedList } from "./OrderedList/OrderedList";
|
|
13
13
|
import { default as Paragraph } from "./Paragraph/Paragraph";
|
|
14
14
|
import { Table } from "./Table/Table";
|
|
15
|
-
export declare const MarkExtensions: (import("./
|
|
15
|
+
export declare const MarkExtensions: (import("./Link/LinkModel").LinkExtension | import("./Bold/BoldModel").BoldExtension | import("./Italic/ItalicModel").ItalicExtension | import("./Label/LabelModel").LabelExtension)[];
|
|
16
16
|
export type MarkExtensionName = (typeof MarkExtensions)[number]["name"];
|
|
17
17
|
export declare function getAllExtensions(nodeTypes?: Set<ExtendedRichTextNodeType>): WidgetExtension[];
|
|
18
18
|
export { Bold, BulletList, CodeBlock, Embed, Heading, Image, Italic, Label, Link, OrderedList, Paragraph, Table, };
|
|
@@ -3,7 +3,7 @@ export declare const NodeUtils: {
|
|
|
3
3
|
isHardBreak(node: ProsemirrorNode): boolean;
|
|
4
4
|
children: {
|
|
5
5
|
reduce<T>(node: ProsemirrorNode, f: (acc: T, child: ProsemirrorNode, index: number) => T, defaultValue: T): T;
|
|
6
|
-
map<T_1>(node: ProsemirrorNode, f: (child: ProsemirrorNode) => T_1): readonly T_1[];
|
|
6
|
+
map<T_1, TReturnReadOnly extends boolean = true>(node: ProsemirrorNode, f: (child: ProsemirrorNode) => T_1): TReturnReadOnly extends true ? readonly T_1[] : T_1[];
|
|
7
7
|
exists(node: ProsemirrorNode, f: (child: ProsemirrorNode) => boolean): boolean;
|
|
8
8
|
filter(node: ProsemirrorNode, predicate: (child: ProsemirrorNode) => boolean): readonly ProsemirrorNode[];
|
|
9
9
|
};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Here live the types to extend RichTextField.
|
|
2
3
|
*
|
|
3
|
-
* Table: The table extension is only used internally by
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Table: The table extension is only used internally by TableBlock. It's not
|
|
5
|
+
* supported by RichText itself, meaning that a user cannot create a table when
|
|
6
|
+
* interacting with RichTextField. It's also not part of the types-internal
|
|
7
|
+
* RichText's types, meaning that we only use these in the frontend, so there is
|
|
8
|
+
* no need to care about RichText table anywhere else.
|
|
6
9
|
*/
|
|
7
10
|
import type { EmbedBlock, ImageBlock, RichTextContent, TableContent, TextBlock } from "@prismicio/types-internal/lib/content";
|
|
8
11
|
export type ExtendedBlock = EmbedBlock | ImageBlock | TextBlock | TableBlock;
|
|
12
|
+
/** Superset of RichTextContent that adds support for TableBlock. */
|
|
9
13
|
export interface ExtendedRichTextContent extends Omit<RichTextContent, "value"> {
|
|
10
14
|
value: ExtendedBlock[];
|
|
11
15
|
}
|
|
@@ -13,7 +17,7 @@ export interface TableBlock {
|
|
|
13
17
|
type: "table";
|
|
14
18
|
content: TableContent["content"];
|
|
15
19
|
}
|
|
16
|
-
export declare
|
|
20
|
+
export declare function isTableBlock(block: ExtendedBlock): block is TableBlock;
|
|
17
21
|
export declare const ExtendedRichTextNodeType: {
|
|
18
22
|
readonly table: "table";
|
|
19
23
|
readonly heading1: "heading1";
|