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