@prismicio/editor-fields 0.4.72 → 0.4.74
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/EditorConfig.d.ts +2 -10
- package/dist/core/APIExplorer/APIExplorer.d.ts +4 -1
- package/dist/core/APIExplorer/components/APIExplorerContext.d.ts +40 -12
- package/dist/core/APIExplorer/components/Request/components/RequestRefFieldset.d.ts +1 -1
- package/dist/core/APIExplorer/components/Request/components/RequestTypeFieldset.d.ts +12 -3
- package/dist/core/APIExplorer/components/Request/components/index.d.ts +1 -0
- package/dist/core/APIExplorer/components/Request/index.d.ts +1 -0
- package/dist/core/APIExplorer/hooks/useRepositoryCustomTypes.d.ts +6 -0
- package/dist/core/APIExplorer/hooks/useRequestRepository.d.ts +1 -1
- package/dist/core/MediaLibrary/hooks/mediaLibraryData.d.ts +93 -93
- package/dist/core/MediaLibrary/hooks/tagData.d.ts +3 -3
- package/dist/core/MediaLibrary/hooks/useMediaLibraryUpload.d.ts +9 -9
- package/dist/core/MediaLibrary/hooks/useSelectedMedia.d.ts +9 -9
- package/dist/core/service/customType.d.ts +12 -12
- package/dist/core/service/document.d.ts +201 -201
- package/dist/core/service/documentSearch.d.ts +47 -47
- package/dist/core/service/onboarding.d.ts +3 -3
- package/dist/core/service/repository.d.ts +6 -6
- package/dist/core/service/role.d.ts +64 -64
- package/dist/core/service/user.d.ts +8 -8
- package/dist/fields/ImageField/useImageField.d.ts +9 -9
- package/dist/fields/ImageField/useImageFieldImageUpload.d.ts +9 -9
- package/dist/fields/LinkField/Documents/documentsData.d.ts +16 -16
- package/dist/fields/LinkField/LinkField.d.ts +1 -1
- package/dist/fields/LinkField/useLinkField.d.ts +1 -1
- package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +4 -4
- package/dist/fields/RichTextField/extensions/Image/useImageView.d.ts +9 -9
- package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/TableHandlesPlugin.d.ts +8 -0
- package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/events.d.ts +19 -0
- package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/index.d.ts +1 -0
- package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/utils.d.ts +23 -0
- package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/index.d.ts +1 -0
- package/dist/fields/RichTextField/extensions/Table/TableCell/utils.d.ts +1 -0
- package/dist/fields/RichTextField/extensions/Table/TableControlsWrapper.d.ts +3 -0
- package/dist/fields/RichTextField/extensions/Table/TableView.d.ts +5 -8
- package/dist/fields/RichTextField/extensions/Table/menus/PassthroughTrigger.d.ts +12 -0
- package/dist/fields/RichTextField/extensions/Table/menus/TableColumnMenu.d.ts +6 -4
- package/dist/fields/RichTextField/extensions/Table/menus/TableRowMenu.d.ts +6 -4
- package/dist/fields/RichTextField/extensions/Table/plugins/TableHandles/TableHandlesPluginDef.d.ts +8 -0
- package/dist/fields/RichTextField/extensions/Table/plugins/TableHandles/TableHandlesPluginView.d.ts +34 -0
- package/dist/fields/RichTextField/extensions/Table/plugins/TableHandles/TableHandlesPluginViewClass.d.ts +34 -0
- package/dist/index.cjs.js +42 -42
- package/dist/index.es.js +12885 -12780
- package/dist/slices/utils.d.ts +1 -1
- package/package.json +4 -4
- package/dist/core/APIExplorer/hooks/useRequestRepositoryCustomTypes.d.ts +0 -6
- /package/dist/fields/RichTextField/extensions/Table/{plugins/tableHandles/tableHandlesPluginView.d.ts → TableCell/plugins/TableHandles/TableHandlesPluginView.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/plugins/{tableHandles → TableHandles}/index.d.ts +0 -0
- /package/dist/fields/RichTextField/extensions/Table/plugins/{tableHandles → TableHandles}/utils.d.ts +0 -0
package/dist/EditorConfig.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type MediaAssetType } from "@prismicio/editor-ui";
|
|
3
|
+
import type { APIExplorerEvents } from "./core/APIExplorer/components/APIExplorerContext";
|
|
3
4
|
import type { MetadataType } from "./core/service";
|
|
4
5
|
export type EditorConfig = {
|
|
5
6
|
baseUrl: URL;
|
|
@@ -95,19 +96,10 @@ interface OnAnalyticsEvent {
|
|
|
95
96
|
customTypeFormat: "page" | "custom";
|
|
96
97
|
}): void;
|
|
97
98
|
(event: "Unsplash Image Searched" | "Unsplash Image Added"): void;
|
|
98
|
-
(event: "API Explorer Request", args: {
|
|
99
|
-
type: string;
|
|
100
|
-
repositoryID: string;
|
|
101
|
-
}): void;
|
|
102
|
-
(event: "API Explorer Request Error", args: {
|
|
103
|
-
type: string;
|
|
104
|
-
repositoryID: string;
|
|
105
|
-
error?: string;
|
|
106
|
-
url?: string;
|
|
107
|
-
}): void;
|
|
108
99
|
(event: "Table Limit Reached", args: {
|
|
109
100
|
type: "row" | "column";
|
|
110
101
|
}): void;
|
|
102
|
+
(...params: APIExplorerEvents): void;
|
|
111
103
|
}
|
|
112
104
|
interface Analytics {
|
|
113
105
|
onAnalyticsEvent?: OnAnalyticsEvent;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { type APIExplorerProviderProps } from "./components/APIExplorerContext";
|
|
3
|
+
type APIExplorerProps = Pick<APIExplorerProviderProps, "repository" | "track">;
|
|
4
|
+
export declare function APIExplorer(props: APIExplorerProps): JSX.Element;
|
|
5
|
+
export {};
|
|
@@ -18,40 +18,40 @@ declare const APIExplorerRequestProperties: z.ZodObject<{
|
|
|
18
18
|
page: z.ZodOptional<z.ZodNumber>;
|
|
19
19
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
20
20
|
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
page?: number | undefined;
|
|
22
21
|
pageSize?: number | undefined;
|
|
23
|
-
}, {
|
|
24
22
|
page?: number | undefined;
|
|
23
|
+
}, {
|
|
25
24
|
pageSize?: number | undefined;
|
|
25
|
+
page?: number | undefined;
|
|
26
26
|
}>;
|
|
27
27
|
lang: z.ZodOptional<z.ZodString>;
|
|
28
28
|
ref: z.ZodOptional<z.ZodString>;
|
|
29
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
30
|
repository: {
|
|
33
31
|
id: string;
|
|
34
32
|
accessToken?: string | undefined;
|
|
35
33
|
};
|
|
34
|
+
options: Partial<Record<"get" | "getByType" | "getByUID" | "getSingle" | "getRepository", Record<string, string> | undefined>>;
|
|
35
|
+
type: "get" | "getByType" | "getByUID" | "getSingle" | "getRepository";
|
|
36
36
|
pagination: {
|
|
37
|
-
page?: number | undefined;
|
|
38
37
|
pageSize?: number | undefined;
|
|
38
|
+
page?: number | undefined;
|
|
39
39
|
};
|
|
40
|
-
ref?: string | undefined;
|
|
41
40
|
lang?: string | undefined;
|
|
41
|
+
ref?: string | undefined;
|
|
42
42
|
}, {
|
|
43
|
-
options: Partial<Record<"get" | "getByType" | "getByUID" | "getSingle" | "getRepository", Record<string, string> | undefined>>;
|
|
44
|
-
type: "get" | "getByType" | "getByUID" | "getSingle" | "getRepository";
|
|
45
43
|
repository: {
|
|
46
44
|
id: string;
|
|
47
45
|
accessToken?: string | undefined;
|
|
48
46
|
};
|
|
47
|
+
options: Partial<Record<"get" | "getByType" | "getByUID" | "getSingle" | "getRepository", Record<string, string> | undefined>>;
|
|
48
|
+
type: "get" | "getByType" | "getByUID" | "getSingle" | "getRepository";
|
|
49
49
|
pagination: {
|
|
50
|
-
page?: number | undefined;
|
|
51
50
|
pageSize?: number | undefined;
|
|
51
|
+
page?: number | undefined;
|
|
52
52
|
};
|
|
53
|
-
ref?: string | undefined;
|
|
54
53
|
lang?: string | undefined;
|
|
54
|
+
ref?: string | undefined;
|
|
55
55
|
}>;
|
|
56
56
|
export type APIExplorerRequestProperties = z.infer<typeof APIExplorerRequestProperties>;
|
|
57
57
|
type APIExplorerRequestMethods = {
|
|
@@ -88,12 +88,40 @@ export type ResponseError = ResponseBase & {
|
|
|
88
88
|
error: Error;
|
|
89
89
|
};
|
|
90
90
|
type APIExplorerResponse = ResponseIdle | ResponsePending | ResponseSuccess | ResponseError;
|
|
91
|
-
|
|
91
|
+
type APIExplorerConfig = {
|
|
92
|
+
/**
|
|
93
|
+
* Repository information to use the API Explorer with.
|
|
94
|
+
* When not provided, the API Explorer will allow entering a repository ID.
|
|
95
|
+
*/
|
|
96
|
+
repository?: {
|
|
97
|
+
id: string;
|
|
98
|
+
documentAPIEndpoint: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
92
101
|
type APIExplorerContextType = {
|
|
93
102
|
request: APIExplorerRequestProperties & APIExplorerRequestMethods;
|
|
94
103
|
response: APIExplorerResponse;
|
|
104
|
+
config: APIExplorerConfig;
|
|
95
105
|
};
|
|
96
|
-
type
|
|
106
|
+
export type APIExplorerEvents = [
|
|
107
|
+
event: "API Explorer Request",
|
|
108
|
+
args: {
|
|
109
|
+
type: RequestTypes;
|
|
110
|
+
repositoryID: string;
|
|
111
|
+
}
|
|
112
|
+
] | [
|
|
113
|
+
event: "API Explorer Request Error",
|
|
114
|
+
args: {
|
|
115
|
+
type: RequestTypes;
|
|
116
|
+
repositoryID: string;
|
|
117
|
+
error?: string;
|
|
118
|
+
url?: string;
|
|
119
|
+
}
|
|
120
|
+
];
|
|
121
|
+
export type APIExplorerProviderProps = {
|
|
122
|
+
track?: (...params: APIExplorerEvents) => void;
|
|
123
|
+
} & APIExplorerConfig & PropsWithChildren;
|
|
97
124
|
export declare const APIExplorerProvider: (props: APIExplorerProviderProps) => JSX.Element;
|
|
98
125
|
export declare function useAPIExplorer(): APIExplorerContextType;
|
|
126
|
+
export declare const apiExplorerShareableUrlSearchParam = "request";
|
|
99
127
|
export {};
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
type RequestTypeFieldsetProps = {
|
|
3
|
+
nonRepeatableOnly?: boolean;
|
|
4
|
+
};
|
|
2
5
|
/**
|
|
3
6
|
* Display a fieldset managing a request document type setting.
|
|
4
7
|
*/
|
|
5
|
-
export declare function RequestTypeFieldset(props:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
export declare function RequestTypeFieldset(props: RequestTypeFieldsetProps): JSX.Element;
|
|
9
|
+
type RequestTypeFieldsetContentProps = {
|
|
10
|
+
customTypes?: {
|
|
11
|
+
id: string;
|
|
12
|
+
label: string;
|
|
13
|
+
}[];
|
|
14
|
+
};
|
|
15
|
+
export declare function RequestTypeFieldsetContent(props: RequestTypeFieldsetContentProps): JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { RequestFormInput } from "./RequestFormInput";
|
|
2
2
|
export { RequestLangFieldset } from "./RequestLangFieldset";
|
|
3
3
|
export { RequestPaginationFieldset } from "./RequestPaginationFieldset";
|
|
4
|
+
export { RequestRefFieldset } from "./RequestRefFieldset";
|
|
4
5
|
export { RequestTypeFieldset } from "./RequestTypeFieldset";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useRequestRepository(): import("@prismicio/client").Repository;
|
|
1
|
+
export declare function useRequestRepository(): import("@prismicio/client").Repository | undefined;
|
|
@@ -21,15 +21,15 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
21
21
|
notes: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodString, "many">>, string | undefined, string[] | undefined>;
|
|
22
22
|
credits: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodString, "many">>, string | undefined, string[] | undefined>;
|
|
23
23
|
}, "strip", z.ZodTypeAny, {
|
|
24
|
-
credits?: string | undefined;
|
|
25
|
-
alt?: string | undefined;
|
|
26
24
|
notes?: string | undefined;
|
|
27
25
|
filename?: string | undefined;
|
|
26
|
+
alt?: string | undefined;
|
|
27
|
+
credits?: string | undefined;
|
|
28
28
|
}, {
|
|
29
|
-
credits?: string[] | undefined;
|
|
30
|
-
alt?: string[] | undefined;
|
|
31
29
|
notes?: string[] | undefined;
|
|
32
30
|
filename?: string[] | undefined;
|
|
31
|
+
alt?: string[] | undefined;
|
|
32
|
+
credits?: string[] | undefined;
|
|
33
33
|
}>>;
|
|
34
34
|
tags: z.ZodArray<z.ZodObject<{
|
|
35
35
|
id: z.ZodString;
|
|
@@ -41,73 +41,73 @@ export declare const mediaAssetType: z.ZodObject<{
|
|
|
41
41
|
}, "strip", z.ZodTypeAny, {
|
|
42
42
|
id: string;
|
|
43
43
|
name: string;
|
|
44
|
-
created_at: number;
|
|
45
44
|
last_modified: number;
|
|
45
|
+
created_at: number;
|
|
46
46
|
count: number;
|
|
47
47
|
uploader_id?: string | undefined;
|
|
48
48
|
}, {
|
|
49
49
|
id: string;
|
|
50
50
|
name: string;
|
|
51
|
-
created_at: number;
|
|
52
51
|
last_modified: number;
|
|
52
|
+
created_at: number;
|
|
53
53
|
uploader_id?: string | undefined;
|
|
54
54
|
count?: number | undefined;
|
|
55
55
|
}>, "many">;
|
|
56
56
|
}, "strip", z.ZodTypeAny, {
|
|
57
57
|
id: string;
|
|
58
|
+
size: number;
|
|
58
59
|
url: string;
|
|
59
60
|
kind: string;
|
|
60
|
-
|
|
61
|
+
filename: string;
|
|
62
|
+
last_modified: number;
|
|
61
63
|
tags: {
|
|
62
64
|
id: string;
|
|
63
65
|
name: string;
|
|
64
|
-
created_at: number;
|
|
65
66
|
last_modified: number;
|
|
67
|
+
created_at: number;
|
|
66
68
|
count: number;
|
|
67
69
|
uploader_id?: string | undefined;
|
|
68
70
|
}[];
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
notes?: string | undefined;
|
|
72
|
+
extension?: string | undefined;
|
|
71
73
|
width?: number | undefined;
|
|
72
74
|
height?: number | undefined;
|
|
73
|
-
credits?: string | undefined;
|
|
74
75
|
alt?: string | undefined;
|
|
75
|
-
notes?: string | undefined;
|
|
76
76
|
uploader_id?: string | undefined;
|
|
77
|
-
|
|
77
|
+
credits?: string | undefined;
|
|
78
78
|
search_highlight?: {
|
|
79
|
-
credits?: string | undefined;
|
|
80
|
-
alt?: string | undefined;
|
|
81
79
|
notes?: string | undefined;
|
|
82
80
|
filename?: string | undefined;
|
|
81
|
+
alt?: string | undefined;
|
|
82
|
+
credits?: string | undefined;
|
|
83
83
|
} | undefined;
|
|
84
84
|
}, {
|
|
85
85
|
id: string;
|
|
86
|
+
size: number;
|
|
86
87
|
url: string;
|
|
87
88
|
kind: string;
|
|
88
|
-
|
|
89
|
+
filename: string;
|
|
90
|
+
last_modified: number;
|
|
89
91
|
tags: {
|
|
90
92
|
id: string;
|
|
91
93
|
name: string;
|
|
92
|
-
created_at: number;
|
|
93
94
|
last_modified: number;
|
|
95
|
+
created_at: number;
|
|
94
96
|
uploader_id?: string | undefined;
|
|
95
97
|
count?: number | undefined;
|
|
96
98
|
}[];
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
notes?: string | undefined;
|
|
100
|
+
extension?: string | undefined;
|
|
99
101
|
width?: number | undefined;
|
|
100
102
|
height?: number | undefined;
|
|
101
|
-
credits?: string | undefined;
|
|
102
103
|
alt?: string | undefined;
|
|
103
|
-
notes?: string | undefined;
|
|
104
104
|
uploader_id?: string | undefined;
|
|
105
|
-
|
|
105
|
+
credits?: string | undefined;
|
|
106
106
|
search_highlight?: {
|
|
107
|
-
credits?: string[] | undefined;
|
|
108
|
-
alt?: string[] | undefined;
|
|
109
107
|
notes?: string[] | undefined;
|
|
110
108
|
filename?: string[] | undefined;
|
|
109
|
+
alt?: string[] | undefined;
|
|
110
|
+
credits?: string[] | undefined;
|
|
111
111
|
} | undefined;
|
|
112
112
|
}>;
|
|
113
113
|
export declare const assetApiHeaders: {
|
|
@@ -136,15 +136,15 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
136
136
|
notes: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodString, "many">>, string | undefined, string[] | undefined>;
|
|
137
137
|
credits: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodString, "many">>, string | undefined, string[] | undefined>;
|
|
138
138
|
}, "strip", z.ZodTypeAny, {
|
|
139
|
-
credits?: string | undefined;
|
|
140
|
-
alt?: string | undefined;
|
|
141
139
|
notes?: string | undefined;
|
|
142
140
|
filename?: string | undefined;
|
|
141
|
+
alt?: string | undefined;
|
|
142
|
+
credits?: string | undefined;
|
|
143
143
|
}, {
|
|
144
|
-
credits?: string[] | undefined;
|
|
145
|
-
alt?: string[] | undefined;
|
|
146
144
|
notes?: string[] | undefined;
|
|
147
145
|
filename?: string[] | undefined;
|
|
146
|
+
alt?: string[] | undefined;
|
|
147
|
+
credits?: string[] | undefined;
|
|
148
148
|
}>>;
|
|
149
149
|
tags: z.ZodArray<z.ZodObject<{
|
|
150
150
|
id: z.ZodString;
|
|
@@ -156,104 +156,104 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
156
156
|
}, "strip", z.ZodTypeAny, {
|
|
157
157
|
id: string;
|
|
158
158
|
name: string;
|
|
159
|
-
created_at: number;
|
|
160
159
|
last_modified: number;
|
|
160
|
+
created_at: number;
|
|
161
161
|
count: number;
|
|
162
162
|
uploader_id?: string | undefined;
|
|
163
163
|
}, {
|
|
164
164
|
id: string;
|
|
165
165
|
name: string;
|
|
166
|
-
created_at: number;
|
|
167
166
|
last_modified: number;
|
|
167
|
+
created_at: number;
|
|
168
168
|
uploader_id?: string | undefined;
|
|
169
169
|
count?: number | undefined;
|
|
170
170
|
}>, "many">;
|
|
171
171
|
}, "strip", z.ZodTypeAny, {
|
|
172
172
|
id: string;
|
|
173
|
+
size: number;
|
|
173
174
|
url: string;
|
|
174
175
|
kind: string;
|
|
175
|
-
|
|
176
|
+
filename: string;
|
|
177
|
+
last_modified: number;
|
|
176
178
|
tags: {
|
|
177
179
|
id: string;
|
|
178
180
|
name: string;
|
|
179
|
-
created_at: number;
|
|
180
181
|
last_modified: number;
|
|
182
|
+
created_at: number;
|
|
181
183
|
count: number;
|
|
182
184
|
uploader_id?: string | undefined;
|
|
183
185
|
}[];
|
|
184
|
-
|
|
185
|
-
|
|
186
|
+
notes?: string | undefined;
|
|
187
|
+
extension?: string | undefined;
|
|
186
188
|
width?: number | undefined;
|
|
187
189
|
height?: number | undefined;
|
|
188
|
-
credits?: string | undefined;
|
|
189
190
|
alt?: string | undefined;
|
|
190
|
-
notes?: string | undefined;
|
|
191
191
|
uploader_id?: string | undefined;
|
|
192
|
-
|
|
192
|
+
credits?: string | undefined;
|
|
193
193
|
search_highlight?: {
|
|
194
|
-
credits?: string | undefined;
|
|
195
|
-
alt?: string | undefined;
|
|
196
194
|
notes?: string | undefined;
|
|
197
195
|
filename?: string | undefined;
|
|
196
|
+
alt?: string | undefined;
|
|
197
|
+
credits?: string | undefined;
|
|
198
198
|
} | undefined;
|
|
199
199
|
}, {
|
|
200
200
|
id: string;
|
|
201
|
+
size: number;
|
|
201
202
|
url: string;
|
|
202
203
|
kind: string;
|
|
203
|
-
|
|
204
|
+
filename: string;
|
|
205
|
+
last_modified: number;
|
|
204
206
|
tags: {
|
|
205
207
|
id: string;
|
|
206
208
|
name: string;
|
|
207
|
-
created_at: number;
|
|
208
209
|
last_modified: number;
|
|
210
|
+
created_at: number;
|
|
209
211
|
uploader_id?: string | undefined;
|
|
210
212
|
count?: number | undefined;
|
|
211
213
|
}[];
|
|
212
|
-
|
|
213
|
-
|
|
214
|
+
notes?: string | undefined;
|
|
215
|
+
extension?: string | undefined;
|
|
214
216
|
width?: number | undefined;
|
|
215
217
|
height?: number | undefined;
|
|
216
|
-
credits?: string | undefined;
|
|
217
218
|
alt?: string | undefined;
|
|
218
|
-
notes?: string | undefined;
|
|
219
219
|
uploader_id?: string | undefined;
|
|
220
|
-
|
|
220
|
+
credits?: string | undefined;
|
|
221
221
|
search_highlight?: {
|
|
222
|
-
credits?: string[] | undefined;
|
|
223
|
-
alt?: string[] | undefined;
|
|
224
222
|
notes?: string[] | undefined;
|
|
225
223
|
filename?: string[] | undefined;
|
|
224
|
+
alt?: string[] | undefined;
|
|
225
|
+
credits?: string[] | undefined;
|
|
226
226
|
} | undefined;
|
|
227
227
|
}>, "many">;
|
|
228
228
|
}, "strip", z.ZodTypeAny, {
|
|
229
229
|
total: number;
|
|
230
230
|
items: {
|
|
231
231
|
id: string;
|
|
232
|
+
size: number;
|
|
232
233
|
url: string;
|
|
233
234
|
kind: string;
|
|
234
|
-
|
|
235
|
+
filename: string;
|
|
236
|
+
last_modified: number;
|
|
235
237
|
tags: {
|
|
236
238
|
id: string;
|
|
237
239
|
name: string;
|
|
238
|
-
created_at: number;
|
|
239
240
|
last_modified: number;
|
|
241
|
+
created_at: number;
|
|
240
242
|
count: number;
|
|
241
243
|
uploader_id?: string | undefined;
|
|
242
244
|
}[];
|
|
243
|
-
|
|
244
|
-
|
|
245
|
+
notes?: string | undefined;
|
|
246
|
+
extension?: string | undefined;
|
|
245
247
|
width?: number | undefined;
|
|
246
248
|
height?: number | undefined;
|
|
247
|
-
credits?: string | undefined;
|
|
248
249
|
alt?: string | undefined;
|
|
249
|
-
notes?: string | undefined;
|
|
250
250
|
uploader_id?: string | undefined;
|
|
251
|
-
|
|
251
|
+
credits?: string | undefined;
|
|
252
252
|
search_highlight?: {
|
|
253
|
-
credits?: string | undefined;
|
|
254
|
-
alt?: string | undefined;
|
|
255
253
|
notes?: string | undefined;
|
|
256
254
|
filename?: string | undefined;
|
|
255
|
+
alt?: string | undefined;
|
|
256
|
+
credits?: string | undefined;
|
|
257
257
|
} | undefined;
|
|
258
258
|
}[];
|
|
259
259
|
cursor?: string | undefined;
|
|
@@ -261,31 +261,31 @@ export declare const mediaSearchResponse: z.ZodObject<{
|
|
|
261
261
|
total: number;
|
|
262
262
|
items: {
|
|
263
263
|
id: string;
|
|
264
|
+
size: number;
|
|
264
265
|
url: string;
|
|
265
266
|
kind: string;
|
|
266
|
-
|
|
267
|
+
filename: string;
|
|
268
|
+
last_modified: number;
|
|
267
269
|
tags: {
|
|
268
270
|
id: string;
|
|
269
271
|
name: string;
|
|
270
|
-
created_at: number;
|
|
271
272
|
last_modified: number;
|
|
273
|
+
created_at: number;
|
|
272
274
|
uploader_id?: string | undefined;
|
|
273
275
|
count?: number | undefined;
|
|
274
276
|
}[];
|
|
275
|
-
|
|
276
|
-
|
|
277
|
+
notes?: string | undefined;
|
|
278
|
+
extension?: string | undefined;
|
|
277
279
|
width?: number | undefined;
|
|
278
280
|
height?: number | undefined;
|
|
279
|
-
credits?: string | undefined;
|
|
280
281
|
alt?: string | undefined;
|
|
281
|
-
notes?: string | undefined;
|
|
282
282
|
uploader_id?: string | undefined;
|
|
283
|
-
|
|
283
|
+
credits?: string | undefined;
|
|
284
284
|
search_highlight?: {
|
|
285
|
-
credits?: string[] | undefined;
|
|
286
|
-
alt?: string[] | undefined;
|
|
287
285
|
notes?: string[] | undefined;
|
|
288
286
|
filename?: string[] | undefined;
|
|
287
|
+
alt?: string[] | undefined;
|
|
288
|
+
credits?: string[] | undefined;
|
|
289
289
|
} | undefined;
|
|
290
290
|
}[];
|
|
291
291
|
cursor?: string | undefined;
|
|
@@ -309,31 +309,31 @@ export declare function searchMedia(baseUrl: URL | undefined, repository: string
|
|
|
309
309
|
total: number;
|
|
310
310
|
items: {
|
|
311
311
|
id: string;
|
|
312
|
+
size: number;
|
|
312
313
|
url: string;
|
|
313
314
|
kind: string;
|
|
314
|
-
|
|
315
|
+
filename: string;
|
|
316
|
+
last_modified: number;
|
|
315
317
|
tags: {
|
|
316
318
|
id: string;
|
|
317
319
|
name: string;
|
|
318
|
-
created_at: number;
|
|
319
320
|
last_modified: number;
|
|
321
|
+
created_at: number;
|
|
320
322
|
count: number;
|
|
321
323
|
uploader_id?: string | undefined;
|
|
322
324
|
}[];
|
|
323
|
-
|
|
324
|
-
|
|
325
|
+
notes?: string | undefined;
|
|
326
|
+
extension?: string | undefined;
|
|
325
327
|
width?: number | undefined;
|
|
326
328
|
height?: number | undefined;
|
|
327
|
-
credits?: string | undefined;
|
|
328
329
|
alt?: string | undefined;
|
|
329
|
-
notes?: string | undefined;
|
|
330
330
|
uploader_id?: string | undefined;
|
|
331
|
-
|
|
331
|
+
credits?: string | undefined;
|
|
332
332
|
search_highlight?: {
|
|
333
|
-
credits?: string | undefined;
|
|
334
|
-
alt?: string | undefined;
|
|
335
333
|
notes?: string | undefined;
|
|
336
334
|
filename?: string | undefined;
|
|
335
|
+
alt?: string | undefined;
|
|
336
|
+
credits?: string | undefined;
|
|
337
337
|
} | undefined;
|
|
338
338
|
}[];
|
|
339
339
|
cursor?: string | undefined;
|
|
@@ -358,31 +358,31 @@ export declare function useMediaSearch(args: UseMediaLibrarySearchArgs): {
|
|
|
358
358
|
resetFilters: () => void;
|
|
359
359
|
media: {
|
|
360
360
|
id: string;
|
|
361
|
+
size: number;
|
|
361
362
|
url: string;
|
|
362
363
|
kind: string;
|
|
363
|
-
|
|
364
|
+
filename: string;
|
|
365
|
+
last_modified: number;
|
|
364
366
|
tags: {
|
|
365
367
|
id: string;
|
|
366
368
|
name: string;
|
|
367
|
-
created_at: number;
|
|
368
369
|
last_modified: number;
|
|
370
|
+
created_at: number;
|
|
369
371
|
count: number;
|
|
370
372
|
uploader_id?: string | undefined;
|
|
371
373
|
}[];
|
|
372
|
-
|
|
373
|
-
|
|
374
|
+
notes?: string | undefined;
|
|
375
|
+
extension?: string | undefined;
|
|
374
376
|
width?: number | undefined;
|
|
375
377
|
height?: number | undefined;
|
|
376
|
-
credits?: string | undefined;
|
|
377
378
|
alt?: string | undefined;
|
|
378
|
-
notes?: string | undefined;
|
|
379
379
|
uploader_id?: string | undefined;
|
|
380
|
-
|
|
380
|
+
credits?: string | undefined;
|
|
381
381
|
search_highlight?: {
|
|
382
|
-
credits?: string | undefined;
|
|
383
|
-
alt?: string | undefined;
|
|
384
382
|
notes?: string | undefined;
|
|
385
383
|
filename?: string | undefined;
|
|
384
|
+
alt?: string | undefined;
|
|
385
|
+
credits?: string | undefined;
|
|
386
386
|
} | undefined;
|
|
387
387
|
}[];
|
|
388
388
|
mediaTotal: number;
|
|
@@ -408,31 +408,31 @@ declare function deleteSearchData(args: MediaLibraryFilters): void;
|
|
|
408
408
|
type MediaPage = Awaited<ReturnType<typeof searchMedia>>;
|
|
409
409
|
export declare function getMedia(allPages: MediaPage[], keyword: string, assetType: MediaAssetType, uploaderId: string | undefined, tags: string): {
|
|
410
410
|
id: string;
|
|
411
|
+
size: number;
|
|
411
412
|
url: string;
|
|
412
413
|
kind: string;
|
|
413
|
-
|
|
414
|
+
filename: string;
|
|
415
|
+
last_modified: number;
|
|
414
416
|
tags: {
|
|
415
417
|
id: string;
|
|
416
418
|
name: string;
|
|
417
|
-
created_at: number;
|
|
418
419
|
last_modified: number;
|
|
420
|
+
created_at: number;
|
|
419
421
|
count: number;
|
|
420
422
|
uploader_id?: string | undefined;
|
|
421
423
|
}[];
|
|
422
|
-
|
|
423
|
-
|
|
424
|
+
notes?: string | undefined;
|
|
425
|
+
extension?: string | undefined;
|
|
424
426
|
width?: number | undefined;
|
|
425
427
|
height?: number | undefined;
|
|
426
|
-
credits?: string | undefined;
|
|
427
428
|
alt?: string | undefined;
|
|
428
|
-
notes?: string | undefined;
|
|
429
429
|
uploader_id?: string | undefined;
|
|
430
|
-
|
|
430
|
+
credits?: string | undefined;
|
|
431
431
|
search_highlight?: {
|
|
432
|
-
credits?: string | undefined;
|
|
433
|
-
alt?: string | undefined;
|
|
434
432
|
notes?: string | undefined;
|
|
435
433
|
filename?: string | undefined;
|
|
434
|
+
alt?: string | undefined;
|
|
435
|
+
credits?: string | undefined;
|
|
436
436
|
} | undefined;
|
|
437
437
|
}[];
|
|
438
438
|
interface PageMetadata {
|
|
@@ -3,8 +3,8 @@ export declare function useTagSearch(): {
|
|
|
3
3
|
tags: {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
6
|
-
created_at: number;
|
|
7
6
|
last_modified: number;
|
|
7
|
+
created_at: number;
|
|
8
8
|
count: number;
|
|
9
9
|
uploader_id?: string | undefined;
|
|
10
10
|
}[];
|
|
@@ -22,15 +22,15 @@ export declare const tagSchema: z.ZodObject<{
|
|
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
|
23
23
|
id: string;
|
|
24
24
|
name: string;
|
|
25
|
-
created_at: number;
|
|
26
25
|
last_modified: number;
|
|
26
|
+
created_at: number;
|
|
27
27
|
count: number;
|
|
28
28
|
uploader_id?: string | undefined;
|
|
29
29
|
}, {
|
|
30
30
|
id: string;
|
|
31
31
|
name: string;
|
|
32
|
-
created_at: number;
|
|
33
32
|
last_modified: number;
|
|
33
|
+
created_at: number;
|
|
34
34
|
uploader_id?: string | undefined;
|
|
35
35
|
count?: number | undefined;
|
|
36
36
|
}>;
|
|
@@ -38,31 +38,31 @@ export declare function uploadMedia(params: {
|
|
|
38
38
|
config: EditorConfig;
|
|
39
39
|
}): Promise<{
|
|
40
40
|
id: string;
|
|
41
|
+
size: number;
|
|
41
42
|
url: string;
|
|
42
43
|
kind: string;
|
|
43
|
-
|
|
44
|
+
filename: string;
|
|
45
|
+
last_modified: number;
|
|
44
46
|
tags: {
|
|
45
47
|
id: string;
|
|
46
48
|
name: string;
|
|
47
|
-
created_at: number;
|
|
48
49
|
last_modified: number;
|
|
50
|
+
created_at: number;
|
|
49
51
|
count: number;
|
|
50
52
|
uploader_id?: string | undefined;
|
|
51
53
|
}[];
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
notes?: string | undefined;
|
|
55
|
+
extension?: string | undefined;
|
|
54
56
|
width?: number | undefined;
|
|
55
57
|
height?: number | undefined;
|
|
56
|
-
credits?: string | undefined;
|
|
57
58
|
alt?: string | undefined;
|
|
58
|
-
notes?: string | undefined;
|
|
59
59
|
uploader_id?: string | undefined;
|
|
60
|
-
|
|
60
|
+
credits?: string | undefined;
|
|
61
61
|
search_highlight?: {
|
|
62
|
-
credits?: string | undefined;
|
|
63
|
-
alt?: string | undefined;
|
|
64
62
|
notes?: string | undefined;
|
|
65
63
|
filename?: string | undefined;
|
|
64
|
+
alt?: string | undefined;
|
|
65
|
+
credits?: string | undefined;
|
|
66
66
|
} | undefined;
|
|
67
67
|
}>;
|
|
68
68
|
export {};
|