@prismicio/editor-fields 0.4.79-alpha.jp-release-script.1 → 0.4.79-bump-types-internal.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 +0 -11
- package/dist/GroupEditor.d.ts +12 -2
- package/dist/NestableWidgetSwitch.d.ts +1 -1
- package/dist/core/APIExplorer/components/APIExplorerContext.d.ts +20 -39
- package/dist/core/APIExplorer/components/Request/components/RequestFiltersFieldset/FilterConfigPathInput.d.ts +9 -0
- package/dist/core/APIExplorer/components/Request/components/RequestFiltersFieldset/types.d.ts +11 -1
- package/dist/core/APIExplorer/components/Request/components/RequestFormMultiInput.d.ts +3 -6
- package/dist/core/APIExplorer/components/Request/components/RequestTagsFieldset.d.ts +0 -11
- package/dist/core/APIExplorer/components/Request/components/index.d.ts +0 -1
- package/dist/core/APIExplorer/components/Request/createRequest.d.ts +2 -5
- package/dist/core/APIExplorer/utils.d.ts +2 -4
- package/dist/core/document.d.ts +1 -1
- package/dist/core/imageUtils.d.ts +2 -0
- package/dist/core/service/document.d.ts +12 -30
- package/dist/core/service/documentSearch.d.ts +0 -5
- package/dist/core/service/onboarding.d.ts +3 -3
- package/dist/fields/ImageField/ImageField.d.ts +0 -1
- package/dist/fields/KeyTextField.d.ts +1 -1
- package/dist/fields/LinkField/Documents/documentsData.d.ts +0 -1
- package/dist/fields/RichTextField/RichTextField.d.ts +3 -5
- package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +1 -2
- package/dist/fields/RichTextField/coreExtensions/Text.d.ts +1 -2
- package/dist/fields/RichTextField/extensions/Table/TableCell/TableCell.d.ts +1 -2
- package/dist/fields/RichTextField/extensions/Table/TableCell/TableHeaderCell.d.ts +1 -2
- package/dist/fields/RichTextField/extensions/Table/TableCell/utils.d.ts +1 -2
- package/dist/fields/RichTextField/extensions/Table/TableRow.d.ts +1 -2
- package/dist/fields/RichTextField/models/EditorExtension.d.ts +7 -8
- package/dist/index.cjs.js +50 -45
- package/dist/index.es.js +48147 -40599
- package/dist/slices/utils.d.ts +1 -1
- package/dist/zones/RepeatableZoneEditor.d.ts +0 -1
- package/package.json +8 -66
- package/dist/core/APIExplorer/components/Request/components/RequestAPIPathFieldset.d.ts +0 -26
- package/dist/core/APIExplorer/components/Request/components/RequestOrderingsFieldset/OrderingConfigDialog.d.ts +0 -8
- package/dist/core/APIExplorer/components/Request/components/RequestOrderingsFieldset/RequestOrderingsFieldset.d.ts +0 -5
- package/dist/core/APIExplorer/components/Request/components/RequestOrderingsFieldset/constants.d.ts +0 -1
- package/dist/core/APIExplorer/components/Request/components/RequestOrderingsFieldset/index.d.ts +0 -2
- package/dist/core/APIExplorer/components/Request/components/RequestOrderingsFieldset/queryOrderingsToOrderings.d.ts +0 -2
- package/dist/core/Collaboration/CollaborationPresence.d.ts +0 -7
package/dist/EditorConfig.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { BaseMetadata } from "@liveblocks/core";
|
|
3
|
-
import type { useThreads as useLiveblocksThreads, UseThreadsOptions } from "@liveblocks/react";
|
|
4
2
|
import { type MediaAssetType } from "@prismicio/editor-ui";
|
|
5
|
-
import type { Content, Extension } from "@tiptap/core";
|
|
6
3
|
import type { APIExplorerEvents } from "./core/APIExplorer/components/APIExplorerContext";
|
|
7
4
|
import type { MetadataType } from "./core/service";
|
|
8
5
|
export type EditorConfig = {
|
|
@@ -10,8 +7,6 @@ export type EditorConfig = {
|
|
|
10
7
|
embedApiEndpoint: URL;
|
|
11
8
|
unsplashApiBaseUrl: URL;
|
|
12
9
|
authStrategy: AuthStrategy;
|
|
13
|
-
useCollaborativeComments?: UseCollaborativeComments;
|
|
14
|
-
useThreads?: UseThreads;
|
|
15
10
|
} & OptionalConfigs;
|
|
16
11
|
type OptionalConfigs = SearchDocuments & MediaLibrary & UIDField & Analytics & ErrorTracking & IntegrationFields & LayoutConfig & UserService & AISeoMetadata;
|
|
17
12
|
type UserService = {
|
|
@@ -113,12 +108,6 @@ interface ErrorTracking {
|
|
|
113
108
|
/** Asks the editor to track this Error in its Error monitoring solution. */
|
|
114
109
|
onTrackError?: (error: Error) => void;
|
|
115
110
|
}
|
|
116
|
-
interface UseCollaborativeCommentsArgs {
|
|
117
|
-
field?: string;
|
|
118
|
-
initialContent?: Content;
|
|
119
|
-
}
|
|
120
|
-
type UseCollaborativeComments = (args: UseCollaborativeCommentsArgs) => Extension;
|
|
121
|
-
type UseThreads = (options?: UseThreadsOptions<BaseMetadata> | undefined) => ReturnType<typeof useLiveblocksThreads>;
|
|
122
111
|
export type AuthStrategy = "cookie" | "token";
|
|
123
112
|
export declare const EditorConfigContext: import("react").Context<EditorConfig | undefined>;
|
|
124
113
|
export declare function useEditorConfig(): EditorConfig;
|
package/dist/GroupEditor.d.ts
CHANGED
|
@@ -2,12 +2,22 @@
|
|
|
2
2
|
import type { GroupContent } from "@prismicio/types-internal/lib/content";
|
|
3
3
|
import type { Group } from "@prismicio/types-internal/lib/customtypes";
|
|
4
4
|
interface GroupEditorProps {
|
|
5
|
-
content: GroupContent | undefined;
|
|
5
|
+
content: GroupContent | EditorGroupContent | undefined;
|
|
6
6
|
group: Group;
|
|
7
7
|
id: string;
|
|
8
8
|
readOnly: boolean;
|
|
9
|
-
onContentChange: (content:
|
|
9
|
+
onContentChange: (content: EditorGroupContent) => void;
|
|
10
10
|
}
|
|
11
11
|
export declare function GroupEditor(props: GroupEditorProps): JSX.Element;
|
|
12
12
|
export declare function getGroupLabel(group: Group): string;
|
|
13
|
+
/**
|
|
14
|
+
* We extend the base Prismic GroupContent type to add a key property.
|
|
15
|
+
* This is used to identify and reference the group item in the repeatable zone.
|
|
16
|
+
*
|
|
17
|
+
* TODO: re-evaluate this strategy and the effort of adding stable IDs to Prismic models.
|
|
18
|
+
* [PBD-2135](https://linear.app/prismic/issue/PBD-2135/spike-stable-group-items)
|
|
19
|
+
*/
|
|
20
|
+
interface EditorGroupContent extends GroupContent {
|
|
21
|
+
key: string;
|
|
22
|
+
}
|
|
13
23
|
export {};
|
|
@@ -8,5 +8,5 @@ interface Props {
|
|
|
8
8
|
onContentChange: (content: NestableContent | undefined) => void;
|
|
9
9
|
readOnly: boolean;
|
|
10
10
|
}
|
|
11
|
-
export declare function NestableWidgetSwitch(props: Props): JSX.Element;
|
|
11
|
+
export declare function NestableWidgetSwitch(props: Props): JSX.Element | null;
|
|
12
12
|
export {};
|
|
@@ -3,18 +3,18 @@ import { z } from "zod";
|
|
|
3
3
|
import { type RequestRunReturnType, type RequestType } from "./Request";
|
|
4
4
|
import { type Filter } from "./Request/components/RequestFiltersFieldset";
|
|
5
5
|
declare const APIExplorerRequestProperties: z.ZodObject<{
|
|
6
|
-
repository: z.
|
|
7
|
-
id: z.
|
|
6
|
+
repository: z.ZodObject<{
|
|
7
|
+
id: z.ZodString;
|
|
8
8
|
accessToken: z.ZodOptional<z.ZodString>;
|
|
9
9
|
}, "strip", z.ZodTypeAny, {
|
|
10
10
|
id: string;
|
|
11
11
|
accessToken?: string | undefined;
|
|
12
12
|
}, {
|
|
13
|
-
id
|
|
13
|
+
id: string;
|
|
14
14
|
accessToken?: string | undefined;
|
|
15
|
-
}
|
|
16
|
-
type: z.
|
|
17
|
-
options: z.
|
|
15
|
+
}>;
|
|
16
|
+
type: z.ZodEnum<["get" | "getFirst" | "getByID" | "getByIDs" | "getAllByIDs" | "getByUID" | "getByUIDs" | "getAllByUIDs" | "getSingle" | "getByType" | "getAllByType" | "getByTag" | "getAllByTag" | "getByEveryTag" | "getAllByEveryTag" | "getBySomeTags" | "getAllBySomeTags" | "getRepository" | "getTags", ...("get" | "getFirst" | "getByID" | "getByIDs" | "getAllByIDs" | "getByUID" | "getByUIDs" | "getAllByUIDs" | "getSingle" | "getByType" | "getAllByType" | "getByTag" | "getAllByTag" | "getByEveryTag" | "getAllByEveryTag" | "getBySomeTags" | "getAllBySomeTags" | "getRepository" | "getTags")[]]>;
|
|
17
|
+
options: z.ZodRecord<z.ZodEnum<["get" | "getFirst" | "getByID" | "getByIDs" | "getAllByIDs" | "getByUID" | "getByUIDs" | "getAllByUIDs" | "getSingle" | "getByType" | "getAllByType" | "getByTag" | "getAllByTag" | "getByEveryTag" | "getAllByEveryTag" | "getBySomeTags" | "getAllBySomeTags" | "getRepository" | "getTags", ...("get" | "getFirst" | "getByID" | "getByIDs" | "getAllByIDs" | "getByUID" | "getByUIDs" | "getAllByUIDs" | "getSingle" | "getByType" | "getAllByType" | "getByTag" | "getAllByTag" | "getByEveryTag" | "getAllByEveryTag" | "getBySomeTags" | "getAllBySomeTags" | "getRepository" | "getTags")[]]>, z.ZodOptional<z.ZodObject<{
|
|
18
18
|
id: z.ZodOptional<z.ZodString>;
|
|
19
19
|
ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
20
20
|
type: z.ZodOptional<z.ZodString>;
|
|
@@ -38,8 +38,8 @@ declare const APIExplorerRequestProperties: z.ZodObject<{
|
|
|
38
38
|
uid?: string | undefined;
|
|
39
39
|
uids?: string[] | undefined;
|
|
40
40
|
tags?: string[] | undefined;
|
|
41
|
-
}
|
|
42
|
-
pagination: z.
|
|
41
|
+
}>>>;
|
|
42
|
+
pagination: z.ZodObject<{
|
|
43
43
|
page: z.ZodOptional<z.ZodNumber>;
|
|
44
44
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
45
45
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -48,7 +48,7 @@ declare const APIExplorerRequestProperties: z.ZodObject<{
|
|
|
48
48
|
}, {
|
|
49
49
|
pageSize?: number | undefined;
|
|
50
50
|
page?: number | undefined;
|
|
51
|
-
}
|
|
51
|
+
}>;
|
|
52
52
|
lang: z.ZodOptional<z.ZodString>;
|
|
53
53
|
advanced: z.ZodDefault<z.ZodBoolean>;
|
|
54
54
|
ref: z.ZodOptional<z.ZodString>;
|
|
@@ -65,16 +65,6 @@ declare const APIExplorerRequestProperties: z.ZodObject<{
|
|
|
65
65
|
type: "at" | "not" | "any" | "in" | "fulltext" | "has" | "missing" | "similar" | "geopointNear" | "numberLessThan" | "numberGreaterThan" | "numberInRange" | "dateAfter" | "dateBefore" | "dateBetween" | "dateDayOfMonth" | "dateDayOfMonthAfter" | "dateDayOfMonthBefore" | "dateDayOfWeek" | "dateDayOfWeekAfter" | "dateDayOfWeekBefore" | "dateMonth" | "dateMonthAfter" | "dateMonthBefore" | "dateYear" | "dateHour" | "dateHourAfter" | "dateHourBefore";
|
|
66
66
|
args: (string | number | boolean | (string | number | boolean)[])[];
|
|
67
67
|
}[] | undefined>;
|
|
68
|
-
orderings: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
69
|
-
field: z.ZodString;
|
|
70
|
-
direction: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
71
|
-
}, "strip", z.ZodTypeAny, {
|
|
72
|
-
field: string;
|
|
73
|
-
direction?: "desc" | "asc" | undefined;
|
|
74
|
-
}, {
|
|
75
|
-
field: string;
|
|
76
|
-
direction?: "desc" | "asc" | undefined;
|
|
77
|
-
}>, "many">>;
|
|
78
68
|
}, "strip", z.ZodTypeAny, {
|
|
79
69
|
options: Partial<Record<"get" | "getFirst" | "getByID" | "getByIDs" | "getAllByIDs" | "getByUID" | "getByUIDs" | "getAllByUIDs" | "getSingle" | "getByType" | "getAllByType" | "getByTag" | "getAllByTag" | "getByEveryTag" | "getAllByEveryTag" | "getBySomeTags" | "getAllBySomeTags" | "getRepository" | "getTags", {
|
|
80
70
|
tag?: string | undefined;
|
|
@@ -91,10 +81,6 @@ declare const APIExplorerRequestProperties: z.ZodObject<{
|
|
|
91
81
|
accessToken?: string | undefined;
|
|
92
82
|
};
|
|
93
83
|
filters: Filter[];
|
|
94
|
-
orderings: {
|
|
95
|
-
field: string;
|
|
96
|
-
direction?: "desc" | "asc" | undefined;
|
|
97
|
-
}[];
|
|
98
84
|
pagination: {
|
|
99
85
|
pageSize?: number | undefined;
|
|
100
86
|
page?: number | undefined;
|
|
@@ -103,7 +89,7 @@ declare const APIExplorerRequestProperties: z.ZodObject<{
|
|
|
103
89
|
ref?: string | undefined;
|
|
104
90
|
lang?: string | undefined;
|
|
105
91
|
}, {
|
|
106
|
-
options
|
|
92
|
+
options: Partial<Record<"get" | "getFirst" | "getByID" | "getByIDs" | "getAllByIDs" | "getByUID" | "getByUIDs" | "getAllByUIDs" | "getSingle" | "getByType" | "getAllByType" | "getByTag" | "getAllByTag" | "getByEveryTag" | "getAllByEveryTag" | "getBySomeTags" | "getAllBySomeTags" | "getRepository" | "getTags", {
|
|
107
93
|
tag?: string | undefined;
|
|
108
94
|
type?: string | undefined;
|
|
109
95
|
id?: string | undefined;
|
|
@@ -111,26 +97,22 @@ declare const APIExplorerRequestProperties: z.ZodObject<{
|
|
|
111
97
|
uid?: string | undefined;
|
|
112
98
|
uids?: string[] | undefined;
|
|
113
99
|
tags?: string[] | undefined;
|
|
114
|
-
} | undefined
|
|
115
|
-
type
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
id?: string | undefined;
|
|
100
|
+
} | undefined>>;
|
|
101
|
+
type: "get" | "getFirst" | "getByID" | "getByIDs" | "getAllByIDs" | "getByUID" | "getByUIDs" | "getAllByUIDs" | "getSingle" | "getByType" | "getAllByType" | "getByTag" | "getAllByTag" | "getByEveryTag" | "getAllByEveryTag" | "getBySomeTags" | "getAllBySomeTags" | "getRepository" | "getTags";
|
|
102
|
+
repository: {
|
|
103
|
+
id: string;
|
|
119
104
|
accessToken?: string | undefined;
|
|
120
|
-
}
|
|
105
|
+
};
|
|
106
|
+
pagination: {
|
|
107
|
+
pageSize?: number | undefined;
|
|
108
|
+
page?: number | undefined;
|
|
109
|
+
};
|
|
110
|
+
ref?: string | undefined;
|
|
121
111
|
filters?: {
|
|
122
112
|
type: "at" | "not" | "any" | "in" | "fulltext" | "has" | "missing" | "similar" | "geopointNear" | "numberLessThan" | "numberGreaterThan" | "numberInRange" | "dateAfter" | "dateBefore" | "dateBetween" | "dateDayOfMonth" | "dateDayOfMonthAfter" | "dateDayOfMonthBefore" | "dateDayOfWeek" | "dateDayOfWeekAfter" | "dateDayOfWeekBefore" | "dateMonth" | "dateMonthAfter" | "dateMonthBefore" | "dateYear" | "dateHour" | "dateHourAfter" | "dateHourBefore";
|
|
123
113
|
args: (string | number | boolean | (string | number | boolean)[])[];
|
|
124
114
|
}[] | undefined;
|
|
125
|
-
orderings?: {
|
|
126
|
-
field: string;
|
|
127
|
-
direction?: "desc" | "asc" | undefined;
|
|
128
|
-
}[] | undefined;
|
|
129
115
|
lang?: string | undefined;
|
|
130
|
-
pagination?: {
|
|
131
|
-
pageSize?: number | undefined;
|
|
132
|
-
page?: number | undefined;
|
|
133
|
-
} | undefined;
|
|
134
116
|
advanced?: boolean | undefined;
|
|
135
117
|
}>;
|
|
136
118
|
export type APIExplorerRequestProperties = z.infer<typeof APIExplorerRequestProperties>;
|
|
@@ -147,7 +129,6 @@ type APIExplorerRequestMethods = {
|
|
|
147
129
|
setAdvanced: (advanced: boolean) => void;
|
|
148
130
|
setRef: (ref?: string) => void;
|
|
149
131
|
setFilters: (filters: APIExplorerRequestProperties["filters"]) => void;
|
|
150
|
-
setOrderings: (orderings: APIExplorerRequestProperties["orderings"]) => void;
|
|
151
132
|
run: () => Promise<void>;
|
|
152
133
|
};
|
|
153
134
|
type ResponseBase = {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type FilterConfigPathInputProps = {
|
|
3
|
+
path: string;
|
|
4
|
+
setPath: (path: string) => void;
|
|
5
|
+
description: string;
|
|
6
|
+
allowedPaths: string[];
|
|
7
|
+
};
|
|
8
|
+
export declare function FilterConfigPathInput(props: FilterConfigPathInputProps): JSX.Element;
|
|
9
|
+
export {};
|
package/dist/core/APIExplorer/components/Request/components/RequestFiltersFieldset/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { filter } from "@prismicio/client";
|
|
2
|
-
import type { IconName } from "
|
|
2
|
+
import type { IconName } from "editor-ui/src/components/Icon";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
export type FilterType = keyof typeof filter;
|
|
5
5
|
export declare const FilterTypes: ["at" | "not" | "any" | "in" | "fulltext" | "has" | "missing" | "similar" | "geopointNear" | "numberLessThan" | "numberGreaterThan" | "numberInRange" | "dateAfter" | "dateBefore" | "dateBetween" | "dateDayOfMonth" | "dateDayOfMonthAfter" | "dateDayOfMonthBefore" | "dateDayOfWeek" | "dateDayOfWeekAfter" | "dateDayOfWeekBefore" | "dateMonth" | "dateMonthAfter" | "dateMonthBefore" | "dateYear" | "dateHour" | "dateHourAfter" | "dateHourBefore", ...("at" | "not" | "any" | "in" | "fulltext" | "has" | "missing" | "similar" | "geopointNear" | "numberLessThan" | "numberGreaterThan" | "numberInRange" | "dateAfter" | "dateBefore" | "dateBetween" | "dateDayOfMonth" | "dateDayOfMonthAfter" | "dateDayOfMonthBefore" | "dateDayOfWeek" | "dateDayOfWeekAfter" | "dateDayOfWeekBefore" | "dateMonth" | "dateMonthAfter" | "dateMonthBefore" | "dateYear" | "dateHour" | "dateHourAfter" | "dateHourBefore")[]];
|
|
@@ -24,4 +24,14 @@ export declare const filters: {
|
|
|
24
24
|
}[];
|
|
25
25
|
export declare const FilterAnyArg: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">]>;
|
|
26
26
|
export type FilterAnyArg = z.infer<typeof FilterAnyArg>;
|
|
27
|
+
export declare const filterPaths: {
|
|
28
|
+
doc: string;
|
|
29
|
+
docType: string;
|
|
30
|
+
docTags: string;
|
|
31
|
+
docFirstPublicationDate: string;
|
|
32
|
+
docLastPublicationDate: string;
|
|
33
|
+
docId: string;
|
|
34
|
+
myDocUid: string;
|
|
35
|
+
myDocField: string;
|
|
36
|
+
};
|
|
27
37
|
export {};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { type
|
|
3
|
-
|
|
4
|
-
export type RequestFormMultiInputProps = Pick<RequestFormInputBaseProps, "label"> & FormMultiInputProps;
|
|
5
|
-
export declare function RequestFormMultiInput(props: RequestFormMultiInputProps): JSX.Element;
|
|
6
|
-
export type FormMultiInputProps = Omit<FormInputProps, "value" | "onValueChange"> & {
|
|
2
|
+
import { type RequestFormInputProps } from "./RequestFormInput";
|
|
3
|
+
export type RequestFormMultiInputProps = Omit<RequestFormInputProps, "value" | "onValueChange"> & {
|
|
7
4
|
value: string[];
|
|
8
5
|
onValueChange: (values: string[]) => void;
|
|
9
6
|
};
|
|
10
|
-
export declare function
|
|
7
|
+
export declare function RequestFormMultiInput(props: RequestFormMultiInputProps): JSX.Element;
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { type FormInputProps } from "@prismicio/editor-ui";
|
|
3
2
|
/**
|
|
4
3
|
* Display a fieldset managing a request tags settings.
|
|
5
4
|
*/
|
|
6
5
|
export declare function RequestTagsFieldset(): JSX.Element;
|
|
7
|
-
interface TagsFieldsetProps extends Omit<FormInputProps, "value" | "onValueChange" | "placeholder"> {
|
|
8
|
-
tags: string[];
|
|
9
|
-
setTags: (tags: string[]) => void;
|
|
10
|
-
overflowWidth: number;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Display a fieldset managing tags.
|
|
14
|
-
*/
|
|
15
|
-
export declare function TagsFieldset(props: TagsFieldsetProps): JSX.Element;
|
|
16
|
-
export {};
|
|
@@ -2,7 +2,6 @@ export { RequestFiltersFieldset } from "./RequestFiltersFieldset";
|
|
|
2
2
|
export { RequestFormInput } from "./RequestFormInput";
|
|
3
3
|
export { RequestFormMultiInput } from "./RequestFormMultiInput";
|
|
4
4
|
export { RequestLangFieldset } from "./RequestLangFieldset";
|
|
5
|
-
export { RequestOrderingsFieldset } from "./RequestOrderingsFieldset";
|
|
6
5
|
export { RequestPaginationFieldset } from "./RequestPaginationFieldset";
|
|
7
6
|
export { RequestRefFieldset } from "./RequestRefFieldset";
|
|
8
7
|
export { RequestTagFieldset } from "./RequestTagFieldset";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { BuildQueryURLArgs, Client
|
|
2
|
+
import type { BuildQueryURLArgs, Client } from "@prismicio/client";
|
|
3
3
|
import type { SnippetArgs } from "../../utils";
|
|
4
4
|
import type { RequestRunReturnType } from "./types";
|
|
5
5
|
type RequestOptions = {
|
|
@@ -15,11 +15,8 @@ type RequestOptions = {
|
|
|
15
15
|
export type RequestConfig<TType extends string> = {
|
|
16
16
|
type: TType;
|
|
17
17
|
Fieldset?: () => JSX.Element;
|
|
18
|
-
getSnippetArgs?: (options: Omit<RequestOptions, "filters"
|
|
18
|
+
getSnippetArgs?: (options: Omit<RequestOptions, "filters"> & {
|
|
19
19
|
filters?: symbol[];
|
|
20
|
-
orderings?: {
|
|
21
|
-
[K in keyof Ordering]: Ordering[K];
|
|
22
|
-
}[];
|
|
23
20
|
}) => SnippetArgs;
|
|
24
21
|
run: (client: Client, options: RequestOptions) => Promise<RequestRunReturnType>;
|
|
25
22
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
type Primitive = number | string | boolean | symbol | undefined;
|
|
2
|
-
type
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
export type SnippetArgs = Serializable[];
|
|
2
|
+
type PrimitiveWithArray = Primitive | Primitive[];
|
|
3
|
+
export type SnippetArgs = (PrimitiveWithArray | Record<string, PrimitiveWithArray>)[];
|
|
6
4
|
export declare function formatSnippetArgs(args: SnippetArgs, options?: {
|
|
7
5
|
maxLength: number;
|
|
8
6
|
}): string;
|
package/dist/core/document.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { type Document as DocumentT, GroupContent } from "@prismicio/types-inter
|
|
|
2
2
|
import { type StaticCustomType } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import type { DocumentVersion } from "./service";
|
|
4
4
|
export declare function prepareDocument(document: DocumentT, customType: StaticCustomType): DocumentT;
|
|
5
|
-
export declare
|
|
5
|
+
export declare const defaultGroupContentWithOneItem: GroupContent;
|
|
6
6
|
export declare const documentStatus: {
|
|
7
7
|
readonly unclassified: {
|
|
8
8
|
readonly title: "Draft";
|
|
@@ -39,6 +39,8 @@ export declare function getPreviewImage(fromUrl: string, options?: {
|
|
|
39
39
|
height?: number;
|
|
40
40
|
}): string;
|
|
41
41
|
export declare function getSearchTileImage(fromUrl: string): string;
|
|
42
|
+
export declare function getCarouselImage(fromUrl: string): string;
|
|
43
|
+
export declare function getCarouselItemSource(view: ImageContentView | undefined): string | undefined;
|
|
42
44
|
export declare function replaceImage(thumbnailName: string, field: Image, content: ImageContent | undefined, extImage: MediaAssetOrExternalImage): ImageContent;
|
|
43
45
|
export declare function isMediaAsset(image: MediaAssetOrExternalImage): image is MediaAsset;
|
|
44
46
|
export declare function createContentView(image: MediaAssetOrExternalImage, constraints?: ImageConstraint): ImageContentView;
|
|
@@ -205,7 +205,6 @@ export declare const documentMetaSchema: z.ZodObject<{
|
|
|
205
205
|
name: string;
|
|
206
206
|
is_master?: boolean | undefined;
|
|
207
207
|
}>;
|
|
208
|
-
ai_abm_thread_id: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
209
208
|
versions: z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
|
|
210
209
|
status: z.ZodLiteral<"unclassified">;
|
|
211
210
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -327,7 +326,6 @@ export declare const documentMetaSchema: z.ZodObject<{
|
|
|
327
326
|
preview_image?: string | undefined;
|
|
328
327
|
preview_summary?: string | undefined;
|
|
329
328
|
})[];
|
|
330
|
-
ai_abm_thread_id?: string | undefined;
|
|
331
329
|
}, {
|
|
332
330
|
language: {
|
|
333
331
|
id: string;
|
|
@@ -363,7 +361,6 @@ export declare const documentMetaSchema: z.ZodObject<{
|
|
|
363
361
|
preview_summary?: string | undefined;
|
|
364
362
|
})[];
|
|
365
363
|
title?: string | null | undefined;
|
|
366
|
-
ai_abm_thread_id?: string | null | undefined;
|
|
367
364
|
}>;
|
|
368
365
|
declare const getDocumentListSchema: z.ZodObject<{
|
|
369
366
|
total: z.ZodNumber;
|
|
@@ -394,7 +391,6 @@ declare const getDocumentListSchema: z.ZodObject<{
|
|
|
394
391
|
name: string;
|
|
395
392
|
is_master?: boolean | undefined;
|
|
396
393
|
}>;
|
|
397
|
-
ai_abm_thread_id: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
398
394
|
versions: z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
|
|
399
395
|
status: z.ZodLiteral<"unclassified">;
|
|
400
396
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -516,7 +512,6 @@ declare const getDocumentListSchema: z.ZodObject<{
|
|
|
516
512
|
preview_image?: string | undefined;
|
|
517
513
|
preview_summary?: string | undefined;
|
|
518
514
|
})[];
|
|
519
|
-
ai_abm_thread_id?: string | undefined;
|
|
520
515
|
}, {
|
|
521
516
|
language: {
|
|
522
517
|
id: string;
|
|
@@ -552,7 +547,6 @@ declare const getDocumentListSchema: z.ZodObject<{
|
|
|
552
547
|
preview_summary?: string | undefined;
|
|
553
548
|
})[];
|
|
554
549
|
title?: string | null | undefined;
|
|
555
|
-
ai_abm_thread_id?: string | null | undefined;
|
|
556
550
|
}>, "many">;
|
|
557
551
|
}, "strip", z.ZodTypeAny, {
|
|
558
552
|
results: {
|
|
@@ -590,7 +584,6 @@ declare const getDocumentListSchema: z.ZodObject<{
|
|
|
590
584
|
preview_image?: string | undefined;
|
|
591
585
|
preview_summary?: string | undefined;
|
|
592
586
|
})[];
|
|
593
|
-
ai_abm_thread_id?: string | undefined;
|
|
594
587
|
}[];
|
|
595
588
|
total: number;
|
|
596
589
|
cursor?: string | undefined;
|
|
@@ -630,7 +623,6 @@ declare const getDocumentListSchema: z.ZodObject<{
|
|
|
630
623
|
preview_summary?: string | undefined;
|
|
631
624
|
})[];
|
|
632
625
|
title?: string | null | undefined;
|
|
633
|
-
ai_abm_thread_id?: string | null | undefined;
|
|
634
626
|
}[];
|
|
635
627
|
total: number;
|
|
636
628
|
cursor?: string | undefined;
|
|
@@ -1116,7 +1108,7 @@ export declare function createSearchParams<T extends string>(params: {
|
|
|
1116
1108
|
values: (string | undefined)[];
|
|
1117
1109
|
}[]): [string, string][];
|
|
1118
1110
|
export declare function getDocumentById(baseUrl: URL, authStrategy: AuthStrategy, id: string): Promise<DocumentMeta>;
|
|
1119
|
-
export declare const
|
|
1111
|
+
export declare const documentSchema: z.ZodEffects<z.ZodType<unknown, z.ZodTypeDef, unknown>, {
|
|
1120
1112
|
[x: string]: import("@prismicio/types-internal/lib/content").GroupContent | {
|
|
1121
1113
|
type: string;
|
|
1122
1114
|
__TYPE__: "EmptyContent";
|
|
@@ -1468,7 +1460,7 @@ export declare const Document: z.ZodEffects<z.ZodUnknown, {
|
|
|
1468
1460
|
content: ({
|
|
1469
1461
|
key: string;
|
|
1470
1462
|
} & {
|
|
1471
|
-
type: "
|
|
1463
|
+
type: "tableCell" | "tableHeader";
|
|
1472
1464
|
content: {
|
|
1473
1465
|
__TYPE__: "StructuredTextContent";
|
|
1474
1466
|
value: (({
|
|
@@ -2069,7 +2061,7 @@ export declare const Document: z.ZodEffects<z.ZodUnknown, {
|
|
|
2069
2061
|
content: ({
|
|
2070
2062
|
key: string;
|
|
2071
2063
|
} & {
|
|
2072
|
-
type: "
|
|
2064
|
+
type: "tableCell" | "tableHeader";
|
|
2073
2065
|
content: {
|
|
2074
2066
|
__TYPE__: "StructuredTextContent";
|
|
2075
2067
|
value: (({
|
|
@@ -2311,7 +2303,6 @@ export declare const Document: z.ZodEffects<z.ZodUnknown, {
|
|
|
2311
2303
|
};
|
|
2312
2304
|
repeat: {
|
|
2313
2305
|
__TYPE__: "GroupItemContent";
|
|
2314
|
-
key: string;
|
|
2315
2306
|
value: [string, import("@prismicio/types-internal/lib/content").GroupContent | {
|
|
2316
2307
|
type: string;
|
|
2317
2308
|
__TYPE__: "EmptyContent";
|
|
@@ -2663,7 +2654,7 @@ export declare const Document: z.ZodEffects<z.ZodUnknown, {
|
|
|
2663
2654
|
content: ({
|
|
2664
2655
|
key: string;
|
|
2665
2656
|
} & {
|
|
2666
|
-
type: "
|
|
2657
|
+
type: "tableCell" | "tableHeader";
|
|
2667
2658
|
content: {
|
|
2668
2659
|
__TYPE__: "StructuredTextContent";
|
|
2669
2660
|
value: (({
|
|
@@ -3255,7 +3246,7 @@ export declare const Document: z.ZodEffects<z.ZodUnknown, {
|
|
|
3255
3246
|
content: ({
|
|
3256
3247
|
key: string;
|
|
3257
3248
|
} & {
|
|
3258
|
-
type: "
|
|
3249
|
+
type: "tableCell" | "tableHeader";
|
|
3259
3250
|
content: {
|
|
3260
3251
|
__TYPE__: "StructuredTextContent";
|
|
3261
3252
|
value: (({
|
|
@@ -3497,7 +3488,6 @@ export declare const Document: z.ZodEffects<z.ZodUnknown, {
|
|
|
3497
3488
|
};
|
|
3498
3489
|
items: {
|
|
3499
3490
|
__TYPE__: "GroupItemContent";
|
|
3500
|
-
key: string;
|
|
3501
3491
|
value: [string, import("@prismicio/types-internal/lib/content").GroupContent | {
|
|
3502
3492
|
type: string;
|
|
3503
3493
|
__TYPE__: "EmptyContent";
|
|
@@ -3849,7 +3839,7 @@ export declare const Document: z.ZodEffects<z.ZodUnknown, {
|
|
|
3849
3839
|
content: ({
|
|
3850
3840
|
key: string;
|
|
3851
3841
|
} & {
|
|
3852
|
-
type: "
|
|
3842
|
+
type: "tableCell" | "tableHeader";
|
|
3853
3843
|
content: {
|
|
3854
3844
|
__TYPE__: "StructuredTextContent";
|
|
3855
3845
|
value: (({
|
|
@@ -4437,7 +4427,7 @@ export declare const Document: z.ZodEffects<z.ZodUnknown, {
|
|
|
4437
4427
|
content: ({
|
|
4438
4428
|
key: string;
|
|
4439
4429
|
} & {
|
|
4440
|
-
type: "
|
|
4430
|
+
type: "tableCell" | "tableHeader";
|
|
4441
4431
|
content: {
|
|
4442
4432
|
__TYPE__: "StructuredTextContent";
|
|
4443
4433
|
value: (({
|
|
@@ -4679,7 +4669,6 @@ export declare const Document: z.ZodEffects<z.ZodUnknown, {
|
|
|
4679
4669
|
}[];
|
|
4680
4670
|
};
|
|
4681
4671
|
}, unknown>;
|
|
4682
|
-
export type Document = z.TypeOf<typeof Document>;
|
|
4683
4672
|
export declare const sliceItemContentSchema: z.ZodEffects<z.ZodUnknown, {
|
|
4684
4673
|
key: string;
|
|
4685
4674
|
name: string;
|
|
@@ -5038,7 +5027,7 @@ export declare const sliceItemContentSchema: z.ZodEffects<z.ZodUnknown, {
|
|
|
5038
5027
|
content: ({
|
|
5039
5028
|
key: string;
|
|
5040
5029
|
} & {
|
|
5041
|
-
type: "
|
|
5030
|
+
type: "tableCell" | "tableHeader";
|
|
5042
5031
|
content: {
|
|
5043
5032
|
__TYPE__: "StructuredTextContent";
|
|
5044
5033
|
value: (({
|
|
@@ -5280,7 +5269,6 @@ export declare const sliceItemContentSchema: z.ZodEffects<z.ZodUnknown, {
|
|
|
5280
5269
|
};
|
|
5281
5270
|
repeat: {
|
|
5282
5271
|
__TYPE__: "GroupItemContent";
|
|
5283
|
-
key: string;
|
|
5284
5272
|
value: [string, import("@prismicio/types-internal/lib/content").GroupContent | {
|
|
5285
5273
|
type: string;
|
|
5286
5274
|
__TYPE__: "EmptyContent";
|
|
@@ -5632,7 +5620,7 @@ export declare const sliceItemContentSchema: z.ZodEffects<z.ZodUnknown, {
|
|
|
5632
5620
|
content: ({
|
|
5633
5621
|
key: string;
|
|
5634
5622
|
} & {
|
|
5635
|
-
type: "
|
|
5623
|
+
type: "tableCell" | "tableHeader";
|
|
5636
5624
|
content: {
|
|
5637
5625
|
__TYPE__: "StructuredTextContent";
|
|
5638
5626
|
value: (({
|
|
@@ -6227,7 +6215,7 @@ export declare const sliceItemContentSchema: z.ZodEffects<z.ZodUnknown, {
|
|
|
6227
6215
|
content: ({
|
|
6228
6216
|
key: string;
|
|
6229
6217
|
} & {
|
|
6230
|
-
type: "
|
|
6218
|
+
type: "tableCell" | "tableHeader";
|
|
6231
6219
|
content: {
|
|
6232
6220
|
__TYPE__: "StructuredTextContent";
|
|
6233
6221
|
value: (({
|
|
@@ -6469,7 +6457,6 @@ export declare const sliceItemContentSchema: z.ZodEffects<z.ZodUnknown, {
|
|
|
6469
6457
|
};
|
|
6470
6458
|
items: {
|
|
6471
6459
|
__TYPE__: "GroupItemContent";
|
|
6472
|
-
key: string;
|
|
6473
6460
|
value: [string, import("@prismicio/types-internal/lib/content").GroupContent | {
|
|
6474
6461
|
type: string;
|
|
6475
6462
|
__TYPE__: "EmptyContent";
|
|
@@ -6821,7 +6808,7 @@ export declare const sliceItemContentSchema: z.ZodEffects<z.ZodUnknown, {
|
|
|
6821
6808
|
content: ({
|
|
6822
6809
|
key: string;
|
|
6823
6810
|
} & {
|
|
6824
|
-
type: "
|
|
6811
|
+
type: "tableCell" | "tableHeader";
|
|
6825
6812
|
content: {
|
|
6826
6813
|
__TYPE__: "StructuredTextContent";
|
|
6827
6814
|
value: (({
|
|
@@ -7412,7 +7399,7 @@ export declare const sliceItemContentSchema: z.ZodEffects<z.ZodUnknown, {
|
|
|
7412
7399
|
content: ({
|
|
7413
7400
|
key: string;
|
|
7414
7401
|
} & {
|
|
7415
|
-
type: "
|
|
7402
|
+
type: "tableCell" | "tableHeader";
|
|
7416
7403
|
content: {
|
|
7417
7404
|
__TYPE__: "StructuredTextContent";
|
|
7418
7405
|
value: (({
|
|
@@ -7701,7 +7688,6 @@ export declare function useDocumentList(args: GetDocumentListArgs): import("@tan
|
|
|
7701
7688
|
preview_image?: string | undefined;
|
|
7702
7689
|
preview_summary?: string | undefined;
|
|
7703
7690
|
})[];
|
|
7704
|
-
ai_abm_thread_id?: string | undefined;
|
|
7705
7691
|
}[];
|
|
7706
7692
|
total: number;
|
|
7707
7693
|
cursor?: string | undefined;
|
|
@@ -7742,7 +7728,6 @@ export declare function getDocumentListOptions(args: GetDocumentListArgs): impor
|
|
|
7742
7728
|
preview_image?: string | undefined;
|
|
7743
7729
|
preview_summary?: string | undefined;
|
|
7744
7730
|
})[];
|
|
7745
|
-
ai_abm_thread_id?: string | undefined;
|
|
7746
7731
|
}[];
|
|
7747
7732
|
total: number;
|
|
7748
7733
|
cursor?: string | undefined;
|
|
@@ -7782,7 +7767,6 @@ export declare function getDocumentListOptions(args: GetDocumentListArgs): impor
|
|
|
7782
7767
|
preview_image?: string | undefined;
|
|
7783
7768
|
preview_summary?: string | undefined;
|
|
7784
7769
|
})[];
|
|
7785
|
-
ai_abm_thread_id?: string | undefined;
|
|
7786
7770
|
}[];
|
|
7787
7771
|
total: number;
|
|
7788
7772
|
cursor?: string | undefined;
|
|
@@ -7823,7 +7807,6 @@ export declare function getDocumentListOptions(args: GetDocumentListArgs): impor
|
|
|
7823
7807
|
preview_image?: string | undefined;
|
|
7824
7808
|
preview_summary?: string | undefined;
|
|
7825
7809
|
})[];
|
|
7826
|
-
ai_abm_thread_id?: string | undefined;
|
|
7827
7810
|
}[];
|
|
7828
7811
|
total: number;
|
|
7829
7812
|
cursor?: string | undefined;
|
|
@@ -7865,7 +7848,6 @@ export declare function getDocumentListOptions(args: GetDocumentListArgs): impor
|
|
|
7865
7848
|
preview_image?: string | undefined;
|
|
7866
7849
|
preview_summary?: string | undefined;
|
|
7867
7850
|
})[];
|
|
7868
|
-
ai_abm_thread_id?: string | undefined;
|
|
7869
7851
|
}[];
|
|
7870
7852
|
total: number;
|
|
7871
7853
|
cursor?: string | undefined;
|
|
@@ -54,7 +54,6 @@ export declare function searchDocuments(args: SearchDocumentsArgs): Promise<{
|
|
|
54
54
|
preview_image?: string | undefined;
|
|
55
55
|
preview_summary?: string | undefined;
|
|
56
56
|
})[];
|
|
57
|
-
ai_abm_thread_id?: string | undefined;
|
|
58
57
|
}[];
|
|
59
58
|
} | {
|
|
60
59
|
results: {
|
|
@@ -136,7 +135,6 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
|
|
|
136
135
|
preview_image?: string | undefined;
|
|
137
136
|
preview_summary?: string | undefined;
|
|
138
137
|
})[];
|
|
139
|
-
ai_abm_thread_id?: string | undefined;
|
|
140
138
|
}[];
|
|
141
139
|
} | {
|
|
142
140
|
results: {
|
|
@@ -204,7 +202,6 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
|
|
|
204
202
|
preview_image?: string | undefined;
|
|
205
203
|
preview_summary?: string | undefined;
|
|
206
204
|
})[];
|
|
207
|
-
ai_abm_thread_id?: string | undefined;
|
|
208
205
|
}[];
|
|
209
206
|
} | {
|
|
210
207
|
results: {
|
|
@@ -288,7 +285,6 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
|
|
|
288
285
|
preview_image?: string | undefined;
|
|
289
286
|
preview_summary?: string | undefined;
|
|
290
287
|
})[];
|
|
291
|
-
ai_abm_thread_id?: string | undefined;
|
|
292
288
|
}[];
|
|
293
289
|
} | {
|
|
294
290
|
results: {
|
|
@@ -373,7 +369,6 @@ export declare function searchDocumentsQueryOptions(args: SearchDocumentsQueryOp
|
|
|
373
369
|
preview_image?: string | undefined;
|
|
374
370
|
preview_summary?: string | undefined;
|
|
375
371
|
})[];
|
|
376
|
-
ai_abm_thread_id?: string | undefined;
|
|
377
372
|
}[];
|
|
378
373
|
} | {
|
|
379
374
|
results: {
|
|
@@ -25,19 +25,19 @@ export declare const onboardingStateSchema: z.ZodObject<{
|
|
|
25
25
|
starterId?: string | null | undefined;
|
|
26
26
|
}>;
|
|
27
27
|
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
completedSteps: string[];
|
|
29
|
+
isDismissed: boolean;
|
|
28
30
|
context: {
|
|
29
31
|
framework: "next" | "nuxt" | "sveltekit" | "other";
|
|
30
32
|
starterId?: string | null | undefined;
|
|
31
33
|
};
|
|
34
|
+
}, {
|
|
32
35
|
completedSteps: string[];
|
|
33
36
|
isDismissed: boolean;
|
|
34
|
-
}, {
|
|
35
37
|
context: {
|
|
36
38
|
framework?: unknown;
|
|
37
39
|
starterId?: string | null | undefined;
|
|
38
40
|
};
|
|
39
|
-
completedSteps: string[];
|
|
40
|
-
isDismissed: boolean;
|
|
41
41
|
}>;
|
|
42
42
|
export type OnboardingState = z.infer<typeof onboardingStateSchema>;
|
|
43
43
|
export type OnboardingFramework = OnboardingState["context"]["framework"];
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import type { ImageContent } from "@prismicio/types-internal/lib/content";
|
|
3
3
|
import type { Image } from "@prismicio/types-internal/lib/customtypes";
|
|
4
4
|
export interface ImageFieldProps {
|
|
5
|
-
id: string | undefined;
|
|
6
5
|
content: ImageContent | undefined;
|
|
7
6
|
field: Image;
|
|
8
7
|
readOnly: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { TextContent } from "@prismicio/types-internal/lib/content";
|
|
2
2
|
import type { Text } from "@prismicio/types-internal/lib/customtypes";
|
|
3
3
|
import { type ReactNode } from "react";
|
|
4
4
|
interface Props {
|