@prismicio/editor-fields 0.4.70 → 0.4.72
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/APIExplorer/components/APIExplorerContext.d.ts +74 -31
- package/dist/core/APIExplorer/components/Request/components/RequestRefFieldset.d.ts +5 -0
- package/dist/core/APIExplorer/components/Request/createRequest.d.ts +4 -2
- package/dist/core/APIExplorer/components/Request/index.d.ts +1 -1
- package/dist/core/APIExplorer/components/Request/types.d.ts +1 -0
- package/dist/core/APIExplorer/hooks/useCopy.d.ts +4 -0
- package/dist/core/APIExplorer/hooks/useRequestRepository.d.ts +1 -0
- package/dist/core/APIExplorer/hooks/useRequestRepositoryCustomTypes.d.ts +6 -0
- package/dist/core/service/customType.d.ts +12 -12
- package/dist/core/service/document.d.ts +11 -11
- package/dist/fields/LinkField/useLinkField.d.ts +1 -1
- package/dist/fields/RichTextField/extensions/Table/TableView.d.ts +2 -0
- package/dist/fields/RichTextField/extensions/Table/plugins/index.d.ts +1 -0
- package/dist/fields/RichTextField/extensions/Table/plugins/tableCellFocusPlugin.d.ts +9 -0
- package/dist/index.cjs.js +45 -45
- package/dist/index.es.js +29400 -28931
- package/dist/slices/utils.d.ts +1 -1
- package/package.json +4 -4
- package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/TableHandlesPlugin.d.ts +0 -8
- package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/events.d.ts +0 -19
- package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/index.d.ts +0 -1
- package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/utils.d.ts +0 -23
- package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/index.d.ts +0 -1
- package/dist/fields/RichTextField/extensions/Table/TableControlsWrapper.d.ts +0 -3
- package/dist/fields/RichTextField/extensions/Table/plugins/TableHandles/TableHandlesPluginDef.d.ts +0 -8
- package/dist/fields/RichTextField/extensions/Table/plugins/TableHandles/TableHandlesPluginView.d.ts +0 -34
- package/dist/fields/RichTextField/extensions/Table/plugins/TableHandles/TableHandlesPluginViewClass.d.ts +0 -34
- /package/dist/fields/RichTextField/extensions/Table/plugins/{TableHandles → tableHandles}/index.d.ts +0 -0
- /package/dist/fields/RichTextField/extensions/Table/plugins/{TableHandles/TableHandlesPlugin.d.ts → tableHandles/tableHandlesPlugin.d.ts} +0 -0
- /package/dist/fields/RichTextField/extensions/Table/{TableCell/plugins/TableHandles/TableHandlesPluginView.d.ts → plugins/tableHandles/tableHandlesPluginView.d.ts} +0 -0
- /package/dist/fields/RichTextField/extensions/Table/plugins/{TableHandles → tableHandles}/utils.d.ts +0 -0
|
@@ -1,12 +1,78 @@
|
|
|
1
1
|
import { type PropsWithChildren } from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { type RequestRunReturnType, RequestTypes } from "./Request";
|
|
4
|
+
declare const APIExplorerRequestProperties: z.ZodObject<{
|
|
5
|
+
repository: z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
accessToken: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
id: string;
|
|
10
|
+
accessToken?: string | undefined;
|
|
11
|
+
}, {
|
|
12
|
+
id: string;
|
|
13
|
+
accessToken?: string | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
type: z.ZodEnum<["get" | "getByType" | "getByUID" | "getSingle" | "getRepository", ...("get" | "getByType" | "getByUID" | "getSingle" | "getRepository")[]]>;
|
|
16
|
+
options: z.ZodRecord<z.ZodEnum<["get" | "getByType" | "getByUID" | "getSingle" | "getRepository", ...("get" | "getByType" | "getByUID" | "getSingle" | "getRepository")[]]>, z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
17
|
+
pagination: z.ZodObject<{
|
|
18
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
page?: number | undefined;
|
|
22
|
+
pageSize?: number | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
page?: number | undefined;
|
|
25
|
+
pageSize?: number | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
28
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
options: Partial<Record<"get" | "getByType" | "getByUID" | "getSingle" | "getRepository", Record<string, string> | undefined>>;
|
|
31
|
+
type: "get" | "getByType" | "getByUID" | "getSingle" | "getRepository";
|
|
32
|
+
repository: {
|
|
33
|
+
id: string;
|
|
34
|
+
accessToken?: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
pagination: {
|
|
37
|
+
page?: number | undefined;
|
|
38
|
+
pageSize?: number | undefined;
|
|
39
|
+
};
|
|
40
|
+
ref?: string | undefined;
|
|
41
|
+
lang?: string | undefined;
|
|
42
|
+
}, {
|
|
43
|
+
options: Partial<Record<"get" | "getByType" | "getByUID" | "getSingle" | "getRepository", Record<string, string> | undefined>>;
|
|
44
|
+
type: "get" | "getByType" | "getByUID" | "getSingle" | "getRepository";
|
|
45
|
+
repository: {
|
|
46
|
+
id: string;
|
|
47
|
+
accessToken?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
pagination: {
|
|
50
|
+
page?: number | undefined;
|
|
51
|
+
pageSize?: number | undefined;
|
|
52
|
+
};
|
|
53
|
+
ref?: string | undefined;
|
|
54
|
+
lang?: string | undefined;
|
|
55
|
+
}>;
|
|
56
|
+
export type APIExplorerRequestProperties = z.infer<typeof APIExplorerRequestProperties>;
|
|
57
|
+
type APIExplorerRequestMethods = {
|
|
58
|
+
setRepositoryID: (id: string) => void;
|
|
59
|
+
setRepositoryAccessToken: (token: string) => void;
|
|
60
|
+
setRequestType: (type: RequestTypes) => void;
|
|
61
|
+
setRequestOptions: <Type extends RequestTypes>(type: Type, options: APIExplorerRequestProperties["options"][Type]) => void;
|
|
62
|
+
setPagination: (pagination: {
|
|
63
|
+
page?: number;
|
|
64
|
+
pageSize?: number;
|
|
65
|
+
}) => void;
|
|
66
|
+
setLang: (lang?: string) => void;
|
|
67
|
+
setRef: (ref?: string) => void;
|
|
68
|
+
run: () => Promise<void>;
|
|
6
69
|
};
|
|
7
70
|
type ResponseBase = {
|
|
8
71
|
duration: number;
|
|
9
72
|
};
|
|
73
|
+
type ResponseIdle = {
|
|
74
|
+
status: "idle";
|
|
75
|
+
};
|
|
10
76
|
type ResponsePending = {
|
|
11
77
|
status: "pending";
|
|
12
78
|
};
|
|
@@ -21,36 +87,13 @@ export type ResponseError = ResponseBase & {
|
|
|
21
87
|
url?: string;
|
|
22
88
|
error: Error;
|
|
23
89
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
id: string;
|
|
27
|
-
accessToken: string;
|
|
28
|
-
};
|
|
29
|
-
type: RequestTypes;
|
|
30
|
-
options: {
|
|
31
|
-
[Type in RequestTypes]?: Record<string, string>;
|
|
32
|
-
};
|
|
33
|
-
pagination: RequestPagination;
|
|
34
|
-
lang?: string;
|
|
35
|
-
response?: ResponsePending | ResponseSuccess | ResponseError;
|
|
36
|
-
};
|
|
37
|
-
type UseAPIExplorerRequestMethods = {
|
|
38
|
-
setRepositoryID: (id: string) => void;
|
|
39
|
-
setRepositoryAccessToken: (token: string) => void;
|
|
40
|
-
setRequestType: (type: RequestTypes) => void;
|
|
41
|
-
setRequestOptions: <Type extends RequestTypes>(type: Type, options: UseAPIExplorerRequestProperties["options"][Type]) => void;
|
|
42
|
-
setPagination: (pagination: {
|
|
43
|
-
page?: number;
|
|
44
|
-
pageSize?: number;
|
|
45
|
-
}) => void;
|
|
46
|
-
setLang: (lang?: string) => void;
|
|
47
|
-
run: () => Promise<void>;
|
|
48
|
-
};
|
|
90
|
+
type APIExplorerResponse = ResponseIdle | ResponsePending | ResponseSuccess | ResponseError;
|
|
91
|
+
export declare const apiExplorerShareableUrlSearchParam = "request";
|
|
49
92
|
type APIExplorerContextType = {
|
|
50
|
-
request:
|
|
93
|
+
request: APIExplorerRequestProperties & APIExplorerRequestMethods;
|
|
94
|
+
response: APIExplorerResponse;
|
|
51
95
|
};
|
|
52
96
|
type APIExplorerProviderProps = PropsWithChildren;
|
|
53
97
|
export declare const APIExplorerProvider: (props: APIExplorerProviderProps) => JSX.Element;
|
|
54
98
|
export declare function useAPIExplorer(): APIExplorerContextType;
|
|
55
|
-
export declare function useAPIExplorerRequest(): UseAPIExplorerRequestProperties & UseAPIExplorerRequestMethods;
|
|
56
99
|
export {};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Client } from "@prismicio/client";
|
|
3
|
-
import type { RequestPagination } from "../APIExplorerContext";
|
|
4
3
|
import type { RequestRunReturnType } from "./types";
|
|
5
|
-
type RequestOptions = Record<string, string | number | undefined> &
|
|
4
|
+
type RequestOptions = Record<string, string | number | undefined> & {
|
|
5
|
+
page?: number;
|
|
6
|
+
pageSize?: number;
|
|
6
7
|
lang?: string;
|
|
8
|
+
ref?: string;
|
|
7
9
|
};
|
|
8
10
|
export type RequestConfig<TType extends string> = {
|
|
9
11
|
type: TType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { type RequestRunReturnType, Requests,
|
|
1
|
+
export { type RequestRunReturnType, Requests, RequestTypes } from "./types";
|
|
@@ -11,4 +11,5 @@ export declare const Requests: {
|
|
|
11
11
|
};
|
|
12
12
|
export type Requests = typeof Requests;
|
|
13
13
|
export type RequestTypes = keyof Requests;
|
|
14
|
+
export declare const RequestTypes: ["get" | "getByType" | "getByUID" | "getSingle" | "getRepository", ...("get" | "getByType" | "getByUID" | "getSingle" | "getRepository")[]];
|
|
14
15
|
export type RequestRunReturnType = PrismicDocument[] | PrismicDocument | Query | Repository;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useRequestRepository(): import("@prismicio/client").Repository;
|
|
@@ -154,7 +154,7 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
|
|
|
154
154
|
label?: string | null | undefined;
|
|
155
155
|
useAsTitle?: boolean | undefined;
|
|
156
156
|
placeholder?: string | undefined;
|
|
157
|
-
select?: "web" | "
|
|
157
|
+
select?: "web" | "document" | "media" | null | undefined;
|
|
158
158
|
customtypes?: readonly string[] | undefined;
|
|
159
159
|
masks?: readonly string[] | undefined;
|
|
160
160
|
tags?: readonly string[] | undefined;
|
|
@@ -329,7 +329,7 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
|
|
|
329
329
|
label?: string | null | undefined;
|
|
330
330
|
useAsTitle?: boolean | undefined;
|
|
331
331
|
placeholder?: string | undefined;
|
|
332
|
-
select?: "web" | "
|
|
332
|
+
select?: "web" | "document" | "media" | null | undefined;
|
|
333
333
|
customtypes?: readonly string[] | undefined;
|
|
334
334
|
masks?: readonly string[] | undefined;
|
|
335
335
|
tags?: readonly string[] | undefined;
|
|
@@ -504,7 +504,7 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
|
|
|
504
504
|
label?: string | null | undefined;
|
|
505
505
|
useAsTitle?: boolean | undefined;
|
|
506
506
|
placeholder?: string | undefined;
|
|
507
|
-
select?: "web" | "
|
|
507
|
+
select?: "web" | "document" | "media" | null | undefined;
|
|
508
508
|
customtypes?: readonly string[] | undefined;
|
|
509
509
|
masks?: readonly string[] | undefined;
|
|
510
510
|
tags?: readonly string[] | undefined;
|
|
@@ -689,7 +689,7 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
|
|
|
689
689
|
label?: string | null | undefined;
|
|
690
690
|
useAsTitle?: boolean | undefined;
|
|
691
691
|
placeholder?: string | undefined;
|
|
692
|
-
select?: "web" | "
|
|
692
|
+
select?: "web" | "document" | "media" | null | undefined;
|
|
693
693
|
customtypes?: readonly string[] | undefined;
|
|
694
694
|
masks?: readonly string[] | undefined;
|
|
695
695
|
tags?: readonly string[] | undefined;
|
|
@@ -864,7 +864,7 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
|
|
|
864
864
|
label?: string | null | undefined;
|
|
865
865
|
useAsTitle?: boolean | undefined;
|
|
866
866
|
placeholder?: string | undefined;
|
|
867
|
-
select?: "web" | "
|
|
867
|
+
select?: "web" | "document" | "media" | null | undefined;
|
|
868
868
|
customtypes?: readonly string[] | undefined;
|
|
869
869
|
masks?: readonly string[] | undefined;
|
|
870
870
|
tags?: readonly string[] | undefined;
|
|
@@ -1040,7 +1040,7 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
|
|
|
1040
1040
|
label?: string | null | undefined;
|
|
1041
1041
|
useAsTitle?: boolean | undefined;
|
|
1042
1042
|
placeholder?: string | undefined;
|
|
1043
|
-
select?: "web" | "
|
|
1043
|
+
select?: "web" | "document" | "media" | null | undefined;
|
|
1044
1044
|
customtypes?: readonly string[] | undefined;
|
|
1045
1045
|
masks?: readonly string[] | undefined;
|
|
1046
1046
|
tags?: readonly string[] | undefined;
|
|
@@ -1208,7 +1208,7 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
|
|
|
1208
1208
|
label?: string | null | undefined;
|
|
1209
1209
|
useAsTitle?: boolean | undefined;
|
|
1210
1210
|
placeholder?: string | undefined;
|
|
1211
|
-
select?: "web" | "
|
|
1211
|
+
select?: "web" | "document" | "media" | null | undefined;
|
|
1212
1212
|
customtypes?: readonly string[] | undefined;
|
|
1213
1213
|
masks?: readonly string[] | undefined;
|
|
1214
1214
|
tags?: readonly string[] | undefined;
|
|
@@ -1392,7 +1392,7 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
|
|
|
1392
1392
|
label?: string | null | undefined;
|
|
1393
1393
|
useAsTitle?: boolean | undefined;
|
|
1394
1394
|
placeholder?: string | undefined;
|
|
1395
|
-
select?: "web" | "
|
|
1395
|
+
select?: "web" | "document" | "media" | null | undefined;
|
|
1396
1396
|
customtypes?: readonly string[] | undefined;
|
|
1397
1397
|
masks?: readonly string[] | undefined;
|
|
1398
1398
|
tags?: readonly string[] | undefined;
|
|
@@ -1567,7 +1567,7 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
|
|
|
1567
1567
|
label?: string | null | undefined;
|
|
1568
1568
|
useAsTitle?: boolean | undefined;
|
|
1569
1569
|
placeholder?: string | undefined;
|
|
1570
|
-
select?: "web" | "
|
|
1570
|
+
select?: "web" | "document" | "media" | null | undefined;
|
|
1571
1571
|
customtypes?: readonly string[] | undefined;
|
|
1572
1572
|
masks?: readonly string[] | undefined;
|
|
1573
1573
|
tags?: readonly string[] | undefined;
|
|
@@ -1742,7 +1742,7 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
|
|
|
1742
1742
|
label?: string | null | undefined;
|
|
1743
1743
|
useAsTitle?: boolean | undefined;
|
|
1744
1744
|
placeholder?: string | undefined;
|
|
1745
|
-
select?: "web" | "
|
|
1745
|
+
select?: "web" | "document" | "media" | null | undefined;
|
|
1746
1746
|
customtypes?: readonly string[] | undefined;
|
|
1747
1747
|
masks?: readonly string[] | undefined;
|
|
1748
1748
|
tags?: readonly string[] | undefined;
|
|
@@ -1916,7 +1916,7 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
|
|
|
1916
1916
|
label?: string | null | undefined;
|
|
1917
1917
|
useAsTitle?: boolean | undefined;
|
|
1918
1918
|
placeholder?: string | undefined;
|
|
1919
|
-
select?: "web" | "
|
|
1919
|
+
select?: "web" | "document" | "media" | null | undefined;
|
|
1920
1920
|
customtypes?: readonly string[] | undefined;
|
|
1921
1921
|
masks?: readonly string[] | undefined;
|
|
1922
1922
|
tags?: readonly string[] | undefined;
|
|
@@ -2031,5 +2031,5 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
|
|
|
2031
2031
|
} & {
|
|
2032
2032
|
format?: "custom" | "page" | undefined;
|
|
2033
2033
|
}, Error>;
|
|
2034
|
-
export declare function
|
|
2034
|
+
export declare function usePrefetchStaticCustomType(args: CustomTypeOptionsArgs): void;
|
|
2035
2035
|
export {};
|
|
@@ -1460,7 +1460,7 @@ export declare const documentSchema: z.ZodEffects<z.ZodType<unknown, z.ZodTypeDe
|
|
|
1460
1460
|
content: ({
|
|
1461
1461
|
key: string;
|
|
1462
1462
|
} & {
|
|
1463
|
-
type: "
|
|
1463
|
+
type: "tableCell" | "tableHeader";
|
|
1464
1464
|
content: {
|
|
1465
1465
|
__TYPE__: "StructuredTextContent";
|
|
1466
1466
|
value: (({
|
|
@@ -2061,7 +2061,7 @@ export declare const documentSchema: z.ZodEffects<z.ZodType<unknown, z.ZodTypeDe
|
|
|
2061
2061
|
content: ({
|
|
2062
2062
|
key: string;
|
|
2063
2063
|
} & {
|
|
2064
|
-
type: "
|
|
2064
|
+
type: "tableCell" | "tableHeader";
|
|
2065
2065
|
content: {
|
|
2066
2066
|
__TYPE__: "StructuredTextContent";
|
|
2067
2067
|
value: (({
|
|
@@ -2654,7 +2654,7 @@ export declare const documentSchema: z.ZodEffects<z.ZodType<unknown, z.ZodTypeDe
|
|
|
2654
2654
|
content: ({
|
|
2655
2655
|
key: string;
|
|
2656
2656
|
} & {
|
|
2657
|
-
type: "
|
|
2657
|
+
type: "tableCell" | "tableHeader";
|
|
2658
2658
|
content: {
|
|
2659
2659
|
__TYPE__: "StructuredTextContent";
|
|
2660
2660
|
value: (({
|
|
@@ -3246,7 +3246,7 @@ export declare const documentSchema: z.ZodEffects<z.ZodType<unknown, z.ZodTypeDe
|
|
|
3246
3246
|
content: ({
|
|
3247
3247
|
key: string;
|
|
3248
3248
|
} & {
|
|
3249
|
-
type: "
|
|
3249
|
+
type: "tableCell" | "tableHeader";
|
|
3250
3250
|
content: {
|
|
3251
3251
|
__TYPE__: "StructuredTextContent";
|
|
3252
3252
|
value: (({
|
|
@@ -3839,7 +3839,7 @@ export declare const documentSchema: z.ZodEffects<z.ZodType<unknown, z.ZodTypeDe
|
|
|
3839
3839
|
content: ({
|
|
3840
3840
|
key: string;
|
|
3841
3841
|
} & {
|
|
3842
|
-
type: "
|
|
3842
|
+
type: "tableCell" | "tableHeader";
|
|
3843
3843
|
content: {
|
|
3844
3844
|
__TYPE__: "StructuredTextContent";
|
|
3845
3845
|
value: (({
|
|
@@ -4427,7 +4427,7 @@ export declare const documentSchema: z.ZodEffects<z.ZodType<unknown, z.ZodTypeDe
|
|
|
4427
4427
|
content: ({
|
|
4428
4428
|
key: string;
|
|
4429
4429
|
} & {
|
|
4430
|
-
type: "
|
|
4430
|
+
type: "tableCell" | "tableHeader";
|
|
4431
4431
|
content: {
|
|
4432
4432
|
__TYPE__: "StructuredTextContent";
|
|
4433
4433
|
value: (({
|
|
@@ -5027,7 +5027,7 @@ export declare const sliceItemContentSchema: z.ZodEffects<z.ZodUnknown, {
|
|
|
5027
5027
|
content: ({
|
|
5028
5028
|
key: string;
|
|
5029
5029
|
} & {
|
|
5030
|
-
type: "
|
|
5030
|
+
type: "tableCell" | "tableHeader";
|
|
5031
5031
|
content: {
|
|
5032
5032
|
__TYPE__: "StructuredTextContent";
|
|
5033
5033
|
value: (({
|
|
@@ -5620,7 +5620,7 @@ export declare const sliceItemContentSchema: z.ZodEffects<z.ZodUnknown, {
|
|
|
5620
5620
|
content: ({
|
|
5621
5621
|
key: string;
|
|
5622
5622
|
} & {
|
|
5623
|
-
type: "
|
|
5623
|
+
type: "tableCell" | "tableHeader";
|
|
5624
5624
|
content: {
|
|
5625
5625
|
__TYPE__: "StructuredTextContent";
|
|
5626
5626
|
value: (({
|
|
@@ -6215,7 +6215,7 @@ export declare const sliceItemContentSchema: z.ZodEffects<z.ZodUnknown, {
|
|
|
6215
6215
|
content: ({
|
|
6216
6216
|
key: string;
|
|
6217
6217
|
} & {
|
|
6218
|
-
type: "
|
|
6218
|
+
type: "tableCell" | "tableHeader";
|
|
6219
6219
|
content: {
|
|
6220
6220
|
__TYPE__: "StructuredTextContent";
|
|
6221
6221
|
value: (({
|
|
@@ -6808,7 +6808,7 @@ export declare const sliceItemContentSchema: z.ZodEffects<z.ZodUnknown, {
|
|
|
6808
6808
|
content: ({
|
|
6809
6809
|
key: string;
|
|
6810
6810
|
} & {
|
|
6811
|
-
type: "
|
|
6811
|
+
type: "tableCell" | "tableHeader";
|
|
6812
6812
|
content: {
|
|
6813
6813
|
__TYPE__: "StructuredTextContent";
|
|
6814
6814
|
value: (({
|
|
@@ -7399,7 +7399,7 @@ export declare const sliceItemContentSchema: z.ZodEffects<z.ZodUnknown, {
|
|
|
7399
7399
|
content: ({
|
|
7400
7400
|
key: string;
|
|
7401
7401
|
} & {
|
|
7402
|
-
type: "
|
|
7402
|
+
type: "tableCell" | "tableHeader";
|
|
7403
7403
|
content: {
|
|
7404
7404
|
__TYPE__: "StructuredTextContent";
|
|
7405
7405
|
value: (({
|
|
@@ -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: "web" | "
|
|
14
|
+
selectType: "web" | "document" | "media" | "any" | undefined;
|
|
15
15
|
fieldValue: string;
|
|
16
16
|
onDisplayTextChange: (displayText: string) => void;
|
|
17
17
|
onValueChange: (value: string, options?: {
|
|
@@ -12,9 +12,11 @@ export interface TableOptions extends TTTableOptions {
|
|
|
12
12
|
* table content.
|
|
13
13
|
*/
|
|
14
14
|
export declare class TableView extends TTTableView implements NodeView {
|
|
15
|
+
private selectionOverlay;
|
|
15
16
|
constructor(args: {
|
|
16
17
|
node: ProseMirrorNode;
|
|
17
18
|
editor: Editor;
|
|
18
19
|
}, options: TableOptions);
|
|
20
|
+
destroy(): void;
|
|
19
21
|
ignoreMutation(mutation: ViewMutationRecord): boolean;
|
|
20
22
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Editor } from "@tiptap/core";
|
|
2
|
+
import { Plugin } from "@tiptap/pm/state";
|
|
3
|
+
/**
|
|
4
|
+
* Focus plugin based on `extension-focus`, but only for table cells and with
|
|
5
|
+
* a small fix to prevent focus jumping when it's a cell selection.
|
|
6
|
+
* Applies a className of `focusedCell` to the cell that is focused.
|
|
7
|
+
* See: https://github.com/ueberdosis/tiptap/blob/v2.11.5/packages/extension-focus/src/focus.ts
|
|
8
|
+
*/
|
|
9
|
+
export declare function tableCellFocusPlugin(editor: Editor): Plugin<any>;
|