@prismicio/editor-fields 0.4.63-alpha.jp-upgrade-tiptap.0 → 0.4.64-alpha.fix-simulator-issue.0
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 +12 -3
- package/dist/core/APIExplorer/APIExplorer.d.ts +2 -0
- package/dist/core/APIExplorer/components/APIExplorerContext.d.ts +54 -0
- package/dist/core/APIExplorer/components/APIExplorerRequest.d.ts +2 -0
- package/dist/core/APIExplorer/components/APIExplorerResponse.d.ts +2 -0
- package/dist/core/APIExplorer/components/Request/GetByTypeRequest.d.ts +1 -0
- package/dist/core/APIExplorer/components/Request/GetByUIDRequest.d.ts +1 -0
- package/dist/core/APIExplorer/components/Request/GetRepositoryRequest.d.ts +1 -0
- package/dist/core/APIExplorer/components/Request/GetRequest.d.ts +1 -0
- package/dist/core/APIExplorer/components/Request/GetSingleRequest.d.ts +1 -0
- package/dist/core/APIExplorer/components/Request/components/RequestFormInput.d.ts +4 -0
- package/dist/core/APIExplorer/components/Request/components/RequestFormInputBase.d.ts +6 -0
- package/dist/core/APIExplorer/components/Request/components/RequestFormSelect.d.ts +4 -0
- package/dist/core/APIExplorer/components/Request/components/RequestPaginationFieldset.d.ts +5 -0
- package/dist/core/APIExplorer/components/Request/components/RequestTypeFieldset.d.ts +7 -0
- package/dist/core/APIExplorer/components/Request/components/index.d.ts +3 -0
- package/dist/core/APIExplorer/components/Request/createRequest.d.ts +20 -0
- package/dist/core/APIExplorer/components/Request/index.d.ts +1 -0
- package/dist/core/APIExplorer/components/Request/types.d.ts +14 -0
- package/dist/core/APIExplorer/index.d.ts +1 -0
- package/dist/core/MediaLibrary/hooks/mediaLibraryData.d.ts +84 -84
- package/dist/core/MediaLibrary/hooks/tagData.d.ts +3 -3
- package/dist/core/MediaLibrary/hooks/useMediaLibraryUpload.d.ts +8 -8
- package/dist/core/MediaLibrary/hooks/useSelectedMedia.d.ts +8 -8
- package/dist/core/UnsplashLibrary/unsplashData.d.ts +9 -9
- package/dist/core/service/aiSeoMetadata.d.ts +2 -6
- package/dist/core/service/customType.d.ts +20 -20
- package/dist/core/service/document.d.ts +218 -192
- package/dist/core/service/documentSearch.d.ts +57 -76
- package/dist/core/service/repository.d.ts +24 -24
- package/dist/core/service/role.d.ts +257 -36
- package/dist/core/service/user.d.ts +11 -7
- package/dist/fields/ImageField/useImageField.d.ts +8 -8
- package/dist/fields/ImageField/useImageFieldImageUpload.d.ts +8 -8
- package/dist/fields/LinkField/Documents/documentsData.d.ts +20 -18
- package/dist/fields/LinkField/LinkField.d.ts +1 -1
- package/dist/fields/LinkField/useLinkField.d.ts +1 -1
- package/dist/fields/RichTextField/RichTextField.d.ts +2 -0
- package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +2 -2
- package/dist/fields/RichTextField/extensions/Image/useImageView.d.ts +8 -8
- package/dist/fields/RichTextField/extensions/Table/Table.d.ts +18 -0
- package/dist/fields/RichTextField/extensions/Table/TableCell/TableCell.d.ts +10 -0
- package/dist/fields/RichTextField/extensions/Table/TableCell/TableHeaderCell.d.ts +10 -0
- package/dist/fields/RichTextField/extensions/Table/TableCell/index.d.ts +2 -0
- package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/TableHandlesPlugin.d.ts +8 -0
- package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/TableHandlesPluginView.d.ts +34 -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/types.d.ts +17 -0
- package/dist/fields/RichTextField/extensions/Table/TableCell/utils.d.ts +15 -0
- package/dist/fields/RichTextField/extensions/Table/TableControlsWrapper.d.ts +3 -0
- package/dist/fields/RichTextField/extensions/Table/TableEvent.d.ts +31 -0
- package/dist/fields/RichTextField/extensions/Table/TableLimitToast.d.ts +7 -0
- package/dist/fields/RichTextField/extensions/Table/TableRow.d.ts +9 -0
- package/dist/fields/RichTextField/extensions/Table/TableView.d.ts +20 -0
- package/dist/fields/RichTextField/extensions/Table/menus/TableColumnMenu.d.ts +11 -0
- package/dist/fields/RichTextField/extensions/Table/menus/TableFloatingMenus.d.ts +7 -0
- package/dist/fields/RichTextField/extensions/Table/menus/TableRowMenu.d.ts +10 -0
- package/dist/fields/RichTextField/extensions/Table/menus/TriggerAnchor.d.ts +11 -0
- package/dist/fields/RichTextField/extensions/Table/menus/index.d.ts +2 -0
- package/dist/fields/RichTextField/extensions/Table/menus/utils.d.ts +23 -0
- package/dist/fields/RichTextField/extensions/Table/utils.d.ts +60 -0
- package/dist/fields/RichTextField/extensions/extensions.d.ts +1 -1
- package/dist/fields/TableField/TableField.d.ts +1 -1
- package/dist/index.cjs.js +92 -111
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +37996 -43673
- package/dist/slices/utils.d.ts +4 -4
- package/package.json +7 -6
package/dist/EditorConfig.d.ts
CHANGED
|
@@ -52,9 +52,8 @@ type AISeoMetadata = {
|
|
|
52
52
|
aiSeoMetadataEnabled?: never;
|
|
53
53
|
} | {
|
|
54
54
|
aiSeoMetadataEnabled: boolean;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
awsBedrockRegion: string;
|
|
55
|
+
documentBaseUrl: URL;
|
|
56
|
+
repository: string;
|
|
58
57
|
trackMetadataGeneration: (args: {
|
|
59
58
|
documentId: string;
|
|
60
59
|
locale: string;
|
|
@@ -96,6 +95,16 @@ interface OnAnalyticsEvent {
|
|
|
96
95
|
customTypeFormat: "page" | "custom";
|
|
97
96
|
}): void;
|
|
98
97
|
(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;
|
|
99
108
|
}
|
|
100
109
|
interface Analytics {
|
|
101
110
|
onAnalyticsEvent?: OnAnalyticsEvent;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type PropsWithChildren } from "react";
|
|
2
|
+
import { type RequestRunReturnType, type RequestTypes } from "./Request";
|
|
3
|
+
export type RequestPagination = {
|
|
4
|
+
page?: number;
|
|
5
|
+
pageSize?: number;
|
|
6
|
+
};
|
|
7
|
+
type ResponseBase = {
|
|
8
|
+
duration: number;
|
|
9
|
+
};
|
|
10
|
+
type ResponsePending = {
|
|
11
|
+
status: "pending";
|
|
12
|
+
};
|
|
13
|
+
export type ResponseSuccess = ResponseBase & {
|
|
14
|
+
status: "success";
|
|
15
|
+
url?: string;
|
|
16
|
+
ref?: string;
|
|
17
|
+
data: RequestRunReturnType;
|
|
18
|
+
};
|
|
19
|
+
export type ResponseError = ResponseBase & {
|
|
20
|
+
status: "error";
|
|
21
|
+
url?: string;
|
|
22
|
+
error: Error;
|
|
23
|
+
};
|
|
24
|
+
export type UseAPIExplorerRequestProperties = {
|
|
25
|
+
repository: {
|
|
26
|
+
id: string;
|
|
27
|
+
accessToken: string;
|
|
28
|
+
};
|
|
29
|
+
type: RequestTypes;
|
|
30
|
+
options: {
|
|
31
|
+
[Type in RequestTypes]?: Record<string, string>;
|
|
32
|
+
};
|
|
33
|
+
pagination: RequestPagination;
|
|
34
|
+
response?: ResponsePending | ResponseSuccess | ResponseError;
|
|
35
|
+
};
|
|
36
|
+
type UseAPIExplorerRequestMethods = {
|
|
37
|
+
setRepositoryID: (id: string) => void;
|
|
38
|
+
setRepositoryAccessToken: (token: string) => void;
|
|
39
|
+
setRequestType: (type: RequestTypes) => void;
|
|
40
|
+
setRequestOptions: <Type extends RequestTypes>(type: Type, options: UseAPIExplorerRequestProperties["options"][Type]) => void;
|
|
41
|
+
setPagination: (pagination: {
|
|
42
|
+
page?: number;
|
|
43
|
+
pageSize?: number;
|
|
44
|
+
}) => void;
|
|
45
|
+
run: () => Promise<void>;
|
|
46
|
+
};
|
|
47
|
+
type APIExplorerContextType = {
|
|
48
|
+
request: UseAPIExplorerRequestProperties & UseAPIExplorerRequestMethods;
|
|
49
|
+
};
|
|
50
|
+
type APIExplorerProviderProps = PropsWithChildren;
|
|
51
|
+
export declare const APIExplorerProvider: (props: APIExplorerProviderProps) => JSX.Element;
|
|
52
|
+
export declare function useAPIExplorer(): APIExplorerContextType;
|
|
53
|
+
export declare function useAPIExplorerRequest(): UseAPIExplorerRequestProperties & UseAPIExplorerRequestMethods;
|
|
54
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GetByTypeRequest: import("./createRequest").RequestConfig<"getByType">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GetByUIDRequest: import("./createRequest").RequestConfig<"getByUID">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GetRepositoryRequest: import("./createRequest").RequestConfig<"getRepository">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GetRequest: import("./createRequest").RequestConfig<"get">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GetSingleRequest: import("./createRequest").RequestConfig<"getSingle">;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type FormInputProps } from "@prismicio/editor-ui";
|
|
3
|
+
import { type RequestFormInputBaseProps } from "./RequestFormInputBase";
|
|
4
|
+
export declare function RequestFormInput(props: Pick<RequestFormInputBaseProps, "label"> & FormInputProps): JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type SelectProps } from "@prismicio/editor-ui";
|
|
3
|
+
import { type RequestFormInputBaseProps } from "./RequestFormInputBase";
|
|
4
|
+
export declare function RequestFormSelect(props: Pick<RequestFormInputBaseProps, "label"> & SelectProps<string>): JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { Client } from "@prismicio/client";
|
|
3
|
+
import { type FormInputProps } from "@prismicio/editor-ui";
|
|
4
|
+
import { type RequestPagination } from "../APIExplorerContext";
|
|
5
|
+
import type { RequestRunReturnType } from "./types";
|
|
6
|
+
export type RequestConfig<TType extends string> = {
|
|
7
|
+
type: TType;
|
|
8
|
+
Fieldset?: () => JSX.Element;
|
|
9
|
+
getSnippet: (options: Record<string, string | number> & RequestPagination) => string;
|
|
10
|
+
run: (client: Client, options: Record<string, string | number> & RequestPagination) => Promise<RequestRunReturnType>;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* A factory for creating request handlers (fieldset, snippet, runner, erc.) for the API explorer.
|
|
14
|
+
*
|
|
15
|
+
* @param config - Request configuration.
|
|
16
|
+
* @returns A request handler to be referenced in `./types.ts` for the API explorer to use.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createRequest<TType extends string>(config: RequestConfig<TType>): RequestConfig<TType>;
|
|
19
|
+
export declare function RequestFormInput(props: FormInputProps): JSX.Element;
|
|
20
|
+
export declare function RequestPaginationFieldset(): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type RequestRunReturnType, Requests, type RequestTypes } from "./types";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PrismicDocument, Query, Repository } from "@prismicio/client";
|
|
2
|
+
/**
|
|
3
|
+
* All available requests for the API explorer.
|
|
4
|
+
*/
|
|
5
|
+
export declare const Requests: {
|
|
6
|
+
readonly get: import("./createRequest").RequestConfig<"get">;
|
|
7
|
+
readonly getByType: import("./createRequest").RequestConfig<"getByType">;
|
|
8
|
+
readonly getByUID: import("./createRequest").RequestConfig<"getByUID">;
|
|
9
|
+
readonly getSingle: import("./createRequest").RequestConfig<"getSingle">;
|
|
10
|
+
readonly getRepository: import("./createRequest").RequestConfig<"getRepository">;
|
|
11
|
+
};
|
|
12
|
+
export type Requests = typeof Requests;
|
|
13
|
+
export type RequestTypes = keyof Requests;
|
|
14
|
+
export type RequestRunReturnType = PrismicDocument[] | PrismicDocument | Query | Repository;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { APIExplorer } from "./APIExplorer";
|
|
@@ -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
|
-
filename?: string | undefined;
|
|
25
|
-
alt?: string | undefined;
|
|
26
24
|
notes?: string | undefined;
|
|
27
25
|
credits?: string | undefined;
|
|
26
|
+
alt?: string | undefined;
|
|
27
|
+
filename?: string | undefined;
|
|
28
28
|
}, {
|
|
29
|
-
filename?: string[] | undefined;
|
|
30
|
-
alt?: string[] | undefined;
|
|
31
29
|
notes?: string[] | undefined;
|
|
32
30
|
credits?: string[] | undefined;
|
|
31
|
+
alt?: string[] | undefined;
|
|
32
|
+
filename?: 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
|
-
last_modified: number;
|
|
45
44
|
created_at: number;
|
|
45
|
+
last_modified: number;
|
|
46
46
|
count: number;
|
|
47
47
|
uploader_id?: string | undefined;
|
|
48
48
|
}, {
|
|
49
49
|
id: string;
|
|
50
50
|
name: string;
|
|
51
|
-
last_modified: number;
|
|
52
51
|
created_at: number;
|
|
52
|
+
last_modified: 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
|
kind: string;
|
|
59
60
|
url: string;
|
|
60
|
-
size: number;
|
|
61
61
|
tags: {
|
|
62
62
|
id: string;
|
|
63
63
|
name: string;
|
|
64
|
-
last_modified: number;
|
|
65
64
|
created_at: number;
|
|
65
|
+
last_modified: number;
|
|
66
66
|
count: number;
|
|
67
67
|
uploader_id?: string | undefined;
|
|
68
68
|
}[];
|
|
69
|
-
filename: string;
|
|
70
69
|
last_modified: number;
|
|
70
|
+
filename: string;
|
|
71
|
+
notes?: string | undefined;
|
|
71
72
|
height?: number | undefined;
|
|
72
73
|
width?: number | undefined;
|
|
73
|
-
|
|
74
|
+
credits?: string | undefined;
|
|
74
75
|
alt?: string | undefined;
|
|
75
76
|
uploader_id?: string | undefined;
|
|
76
|
-
|
|
77
|
-
credits?: string | undefined;
|
|
77
|
+
extension?: string | undefined;
|
|
78
78
|
search_highlight?: {
|
|
79
|
-
filename?: string | undefined;
|
|
80
|
-
alt?: string | undefined;
|
|
81
79
|
notes?: string | undefined;
|
|
82
80
|
credits?: string | undefined;
|
|
81
|
+
alt?: string | undefined;
|
|
82
|
+
filename?: string | undefined;
|
|
83
83
|
} | undefined;
|
|
84
84
|
}, {
|
|
85
85
|
id: string;
|
|
86
|
+
size: number;
|
|
86
87
|
kind: string;
|
|
87
88
|
url: string;
|
|
88
|
-
size: number;
|
|
89
89
|
tags: {
|
|
90
90
|
id: string;
|
|
91
91
|
name: string;
|
|
92
|
-
last_modified: number;
|
|
93
92
|
created_at: number;
|
|
93
|
+
last_modified: number;
|
|
94
94
|
uploader_id?: string | undefined;
|
|
95
95
|
count?: number | undefined;
|
|
96
96
|
}[];
|
|
97
|
-
filename: string;
|
|
98
97
|
last_modified: number;
|
|
98
|
+
filename: string;
|
|
99
|
+
notes?: string | undefined;
|
|
99
100
|
height?: number | undefined;
|
|
100
101
|
width?: number | undefined;
|
|
101
|
-
|
|
102
|
+
credits?: string | undefined;
|
|
102
103
|
alt?: string | undefined;
|
|
103
104
|
uploader_id?: string | undefined;
|
|
104
|
-
|
|
105
|
-
credits?: string | undefined;
|
|
105
|
+
extension?: string | undefined;
|
|
106
106
|
search_highlight?: {
|
|
107
|
-
filename?: string[] | undefined;
|
|
108
|
-
alt?: string[] | undefined;
|
|
109
107
|
notes?: string[] | undefined;
|
|
110
108
|
credits?: string[] | undefined;
|
|
109
|
+
alt?: string[] | undefined;
|
|
110
|
+
filename?: 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
|
-
filename?: string | undefined;
|
|
140
|
-
alt?: string | undefined;
|
|
141
139
|
notes?: string | undefined;
|
|
142
140
|
credits?: string | undefined;
|
|
141
|
+
alt?: string | undefined;
|
|
142
|
+
filename?: string | undefined;
|
|
143
143
|
}, {
|
|
144
|
-
filename?: string[] | undefined;
|
|
145
|
-
alt?: string[] | undefined;
|
|
146
144
|
notes?: string[] | undefined;
|
|
147
145
|
credits?: string[] | undefined;
|
|
146
|
+
alt?: string[] | undefined;
|
|
147
|
+
filename?: 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
|
-
last_modified: number;
|
|
160
159
|
created_at: number;
|
|
160
|
+
last_modified: number;
|
|
161
161
|
count: number;
|
|
162
162
|
uploader_id?: string | undefined;
|
|
163
163
|
}, {
|
|
164
164
|
id: string;
|
|
165
165
|
name: string;
|
|
166
|
-
last_modified: number;
|
|
167
166
|
created_at: number;
|
|
167
|
+
last_modified: 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
|
kind: string;
|
|
174
175
|
url: string;
|
|
175
|
-
size: number;
|
|
176
176
|
tags: {
|
|
177
177
|
id: string;
|
|
178
178
|
name: string;
|
|
179
|
-
last_modified: number;
|
|
180
179
|
created_at: number;
|
|
180
|
+
last_modified: number;
|
|
181
181
|
count: number;
|
|
182
182
|
uploader_id?: string | undefined;
|
|
183
183
|
}[];
|
|
184
|
-
filename: string;
|
|
185
184
|
last_modified: number;
|
|
185
|
+
filename: string;
|
|
186
|
+
notes?: string | undefined;
|
|
186
187
|
height?: number | undefined;
|
|
187
188
|
width?: number | undefined;
|
|
188
|
-
|
|
189
|
+
credits?: string | undefined;
|
|
189
190
|
alt?: string | undefined;
|
|
190
191
|
uploader_id?: string | undefined;
|
|
191
|
-
|
|
192
|
-
credits?: string | undefined;
|
|
192
|
+
extension?: string | undefined;
|
|
193
193
|
search_highlight?: {
|
|
194
|
-
filename?: string | undefined;
|
|
195
|
-
alt?: string | undefined;
|
|
196
194
|
notes?: string | undefined;
|
|
197
195
|
credits?: string | undefined;
|
|
196
|
+
alt?: string | undefined;
|
|
197
|
+
filename?: string | undefined;
|
|
198
198
|
} | undefined;
|
|
199
199
|
}, {
|
|
200
200
|
id: string;
|
|
201
|
+
size: number;
|
|
201
202
|
kind: string;
|
|
202
203
|
url: string;
|
|
203
|
-
size: number;
|
|
204
204
|
tags: {
|
|
205
205
|
id: string;
|
|
206
206
|
name: string;
|
|
207
|
-
last_modified: number;
|
|
208
207
|
created_at: number;
|
|
208
|
+
last_modified: number;
|
|
209
209
|
uploader_id?: string | undefined;
|
|
210
210
|
count?: number | undefined;
|
|
211
211
|
}[];
|
|
212
|
-
filename: string;
|
|
213
212
|
last_modified: number;
|
|
213
|
+
filename: string;
|
|
214
|
+
notes?: string | undefined;
|
|
214
215
|
height?: number | undefined;
|
|
215
216
|
width?: number | undefined;
|
|
216
|
-
|
|
217
|
+
credits?: string | undefined;
|
|
217
218
|
alt?: string | undefined;
|
|
218
219
|
uploader_id?: string | undefined;
|
|
219
|
-
|
|
220
|
-
credits?: string | undefined;
|
|
220
|
+
extension?: string | undefined;
|
|
221
221
|
search_highlight?: {
|
|
222
|
-
filename?: string[] | undefined;
|
|
223
|
-
alt?: string[] | undefined;
|
|
224
222
|
notes?: string[] | undefined;
|
|
225
223
|
credits?: string[] | undefined;
|
|
224
|
+
alt?: string[] | undefined;
|
|
225
|
+
filename?: 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
|
kind: string;
|
|
233
234
|
url: string;
|
|
234
|
-
size: number;
|
|
235
235
|
tags: {
|
|
236
236
|
id: string;
|
|
237
237
|
name: string;
|
|
238
|
-
last_modified: number;
|
|
239
238
|
created_at: number;
|
|
239
|
+
last_modified: number;
|
|
240
240
|
count: number;
|
|
241
241
|
uploader_id?: string | undefined;
|
|
242
242
|
}[];
|
|
243
|
-
filename: string;
|
|
244
243
|
last_modified: number;
|
|
244
|
+
filename: string;
|
|
245
|
+
notes?: string | undefined;
|
|
245
246
|
height?: number | undefined;
|
|
246
247
|
width?: number | undefined;
|
|
247
|
-
|
|
248
|
+
credits?: string | undefined;
|
|
248
249
|
alt?: string | undefined;
|
|
249
250
|
uploader_id?: string | undefined;
|
|
250
|
-
|
|
251
|
-
credits?: string | undefined;
|
|
251
|
+
extension?: string | undefined;
|
|
252
252
|
search_highlight?: {
|
|
253
|
-
filename?: string | undefined;
|
|
254
|
-
alt?: string | undefined;
|
|
255
253
|
notes?: string | undefined;
|
|
256
254
|
credits?: string | undefined;
|
|
255
|
+
alt?: string | undefined;
|
|
256
|
+
filename?: 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
|
kind: string;
|
|
265
266
|
url: string;
|
|
266
|
-
size: number;
|
|
267
267
|
tags: {
|
|
268
268
|
id: string;
|
|
269
269
|
name: string;
|
|
270
|
-
last_modified: number;
|
|
271
270
|
created_at: number;
|
|
271
|
+
last_modified: number;
|
|
272
272
|
uploader_id?: string | undefined;
|
|
273
273
|
count?: number | undefined;
|
|
274
274
|
}[];
|
|
275
|
-
filename: string;
|
|
276
275
|
last_modified: number;
|
|
276
|
+
filename: string;
|
|
277
|
+
notes?: string | undefined;
|
|
277
278
|
height?: number | undefined;
|
|
278
279
|
width?: number | undefined;
|
|
279
|
-
|
|
280
|
+
credits?: string | undefined;
|
|
280
281
|
alt?: string | undefined;
|
|
281
282
|
uploader_id?: string | undefined;
|
|
282
|
-
|
|
283
|
-
credits?: string | undefined;
|
|
283
|
+
extension?: string | undefined;
|
|
284
284
|
search_highlight?: {
|
|
285
|
-
filename?: string[] | undefined;
|
|
286
|
-
alt?: string[] | undefined;
|
|
287
285
|
notes?: string[] | undefined;
|
|
288
286
|
credits?: string[] | undefined;
|
|
287
|
+
alt?: string[] | undefined;
|
|
288
|
+
filename?: 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
|
kind: string;
|
|
313
314
|
url: string;
|
|
314
|
-
size: number;
|
|
315
315
|
tags: {
|
|
316
316
|
id: string;
|
|
317
317
|
name: string;
|
|
318
|
-
last_modified: number;
|
|
319
318
|
created_at: number;
|
|
319
|
+
last_modified: number;
|
|
320
320
|
count: number;
|
|
321
321
|
uploader_id?: string | undefined;
|
|
322
322
|
}[];
|
|
323
|
-
filename: string;
|
|
324
323
|
last_modified: number;
|
|
324
|
+
filename: string;
|
|
325
|
+
notes?: string | undefined;
|
|
325
326
|
height?: number | undefined;
|
|
326
327
|
width?: number | undefined;
|
|
327
|
-
|
|
328
|
+
credits?: string | undefined;
|
|
328
329
|
alt?: string | undefined;
|
|
329
330
|
uploader_id?: string | undefined;
|
|
330
|
-
|
|
331
|
-
credits?: string | undefined;
|
|
331
|
+
extension?: string | undefined;
|
|
332
332
|
search_highlight?: {
|
|
333
|
-
filename?: string | undefined;
|
|
334
|
-
alt?: string | undefined;
|
|
335
333
|
notes?: string | undefined;
|
|
336
334
|
credits?: string | undefined;
|
|
335
|
+
alt?: string | undefined;
|
|
336
|
+
filename?: 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
|
kind: string;
|
|
362
363
|
url: string;
|
|
363
|
-
size: number;
|
|
364
364
|
tags: {
|
|
365
365
|
id: string;
|
|
366
366
|
name: string;
|
|
367
|
-
last_modified: number;
|
|
368
367
|
created_at: number;
|
|
368
|
+
last_modified: number;
|
|
369
369
|
count: number;
|
|
370
370
|
uploader_id?: string | undefined;
|
|
371
371
|
}[];
|
|
372
|
-
filename: string;
|
|
373
372
|
last_modified: number;
|
|
373
|
+
filename: string;
|
|
374
|
+
notes?: string | undefined;
|
|
374
375
|
height?: number | undefined;
|
|
375
376
|
width?: number | undefined;
|
|
376
|
-
|
|
377
|
+
credits?: string | undefined;
|
|
377
378
|
alt?: string | undefined;
|
|
378
379
|
uploader_id?: string | undefined;
|
|
379
|
-
|
|
380
|
-
credits?: string | undefined;
|
|
380
|
+
extension?: string | undefined;
|
|
381
381
|
search_highlight?: {
|
|
382
|
-
filename?: string | undefined;
|
|
383
|
-
alt?: string | undefined;
|
|
384
382
|
notes?: string | undefined;
|
|
385
383
|
credits?: string | undefined;
|
|
384
|
+
alt?: string | undefined;
|
|
385
|
+
filename?: 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
|
kind: string;
|
|
412
413
|
url: string;
|
|
413
|
-
size: number;
|
|
414
414
|
tags: {
|
|
415
415
|
id: string;
|
|
416
416
|
name: string;
|
|
417
|
-
last_modified: number;
|
|
418
417
|
created_at: number;
|
|
418
|
+
last_modified: number;
|
|
419
419
|
count: number;
|
|
420
420
|
uploader_id?: string | undefined;
|
|
421
421
|
}[];
|
|
422
|
-
filename: string;
|
|
423
422
|
last_modified: number;
|
|
423
|
+
filename: string;
|
|
424
|
+
notes?: string | undefined;
|
|
424
425
|
height?: number | undefined;
|
|
425
426
|
width?: number | undefined;
|
|
426
|
-
|
|
427
|
+
credits?: string | undefined;
|
|
427
428
|
alt?: string | undefined;
|
|
428
429
|
uploader_id?: string | undefined;
|
|
429
|
-
|
|
430
|
-
credits?: string | undefined;
|
|
430
|
+
extension?: string | undefined;
|
|
431
431
|
search_highlight?: {
|
|
432
|
-
filename?: string | undefined;
|
|
433
|
-
alt?: string | undefined;
|
|
434
432
|
notes?: string | undefined;
|
|
435
433
|
credits?: string | undefined;
|
|
434
|
+
alt?: string | undefined;
|
|
435
|
+
filename?: 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
|
-
last_modified: number;
|
|
7
6
|
created_at: number;
|
|
7
|
+
last_modified: 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
|
-
last_modified: number;
|
|
26
25
|
created_at: number;
|
|
26
|
+
last_modified: number;
|
|
27
27
|
count: number;
|
|
28
28
|
uploader_id?: string | undefined;
|
|
29
29
|
}, {
|
|
30
30
|
id: string;
|
|
31
31
|
name: string;
|
|
32
|
-
last_modified: number;
|
|
33
32
|
created_at: number;
|
|
33
|
+
last_modified: number;
|
|
34
34
|
uploader_id?: string | undefined;
|
|
35
35
|
count?: number | undefined;
|
|
36
36
|
}>;
|