@prismicio/editor-fields 0.4.8 → 0.4.9

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.
@@ -3,6 +3,7 @@ interface FooterProps {
3
3
  debouncedUrl: string;
4
4
  content?: EmbedContent;
5
5
  onContentChange: (content?: EmbedContent) => void;
6
+ selected?: boolean;
6
7
  }
7
8
  export declare function Footer(props: FooterProps): JSX.Element;
8
9
  export {};
@@ -3,6 +3,7 @@ interface ImageAltControlProps {
3
3
  readOnly: boolean;
4
4
  altText: string;
5
5
  onValueChange: (value: string) => void;
6
+ selected?: boolean;
6
7
  }
7
8
  export declare function ImageAltControl(props: ImageAltControlProps): JSX.Element;
8
9
  export {};
@@ -5,11 +5,10 @@ import type { CropperImage } from "../imageFieldUtils";
5
5
  import type { ExternalImage } from "../MediaPicker/externalImage";
6
6
  interface ImageFieldCardProps {
7
7
  content: ImageContent | undefined;
8
- onContentChange: (content: ImageContent | undefined) => void;
8
+ selected?: boolean;
9
9
  fieldLabel: string;
10
10
  readOnly: boolean;
11
11
  imageLabel: string[];
12
- setPage?: (page: number) => void;
13
12
  onMediaSelected: (media: ExternalImage) => void;
14
13
  initialImages: CropperImage[];
15
14
  initialOption?: number;
@@ -17,6 +16,7 @@ interface ImageFieldCardProps {
17
16
  croppedImages: CroppedImages;
18
17
  option: number;
19
18
  }) => void;
19
+ onClear: () => void;
20
20
  children: ReactNode;
21
21
  }
22
22
  export declare function ImageFieldCard(props: ImageFieldCardProps): JSX.Element;
@@ -16,7 +16,6 @@ export declare function useImageField(props: useImageFieldProps): {
16
16
  onMediaSelected: (media: ExternalImage) => void;
17
17
  isUpdating: boolean;
18
18
  page: number;
19
- setPage: import("react").Dispatch<import("react").SetStateAction<number>>;
20
19
  thumbnail: Readonly<{
21
20
  width?: number | null | undefined;
22
21
  height?: number | null | undefined;
@@ -97,5 +96,6 @@ export declare function useImageField(props: useImageFieldProps): {
97
96
  alt?: string | null | undefined;
98
97
  provider?: string | null | undefined;
99
98
  }) | undefined;
99
+ onClear: () => void;
100
100
  };
101
101
  export {};
@@ -1,4 +1,3 @@
1
- import { TypeOf } from "zod";
2
1
  export declare function useDocuments(params: {
3
2
  searchTerm: string;
4
3
  tagsFilter: string[];
@@ -6,8 +5,8 @@ export declare function useDocuments(params: {
6
5
  }): {
7
6
  documents: {
8
7
  id: string;
9
- title: string;
10
8
  custom_type_id: string;
9
+ title: string;
11
10
  versions: (({
12
11
  status: "unclassified";
13
12
  } | {
@@ -18,8 +17,8 @@ export declare function useDocuments(params: {
18
17
  } | {
19
18
  status: "archived";
20
19
  }) & {
21
- tags: string[];
22
20
  version_id: string;
21
+ tags: string[];
23
22
  custom_type_label: string;
24
23
  preview_summary?: string | undefined;
25
24
  preview_image?: string | undefined;
@@ -30,8 +29,8 @@ export declare function useDocuments(params: {
30
29
  total: number;
31
30
  results: {
32
31
  id: string;
33
- title: string;
34
32
  custom_type_id: string;
33
+ title: string;
35
34
  versions: (({
36
35
  status: "unclassified";
37
36
  } | {
@@ -42,8 +41,8 @@ export declare function useDocuments(params: {
42
41
  } | {
43
42
  status: "archived";
44
43
  }) & {
45
- tags: string[];
46
44
  version_id: string;
45
+ tags: string[];
47
46
  custom_type_label: string;
48
47
  preview_summary?: string | undefined;
49
48
  preview_image?: string | undefined;
@@ -52,240 +51,3 @@ export declare function useDocuments(params: {
52
51
  cursor?: string | undefined;
53
52
  };
54
53
  };
55
- declare const documentsSearchOkType: import("zod").ZodObject<{
56
- id: import("zod").ZodString;
57
- custom_type_id: import("zod").ZodString;
58
- title: import("zod").ZodString;
59
- versions: import("zod").ZodArray<import("zod").ZodIntersection<import("zod").ZodDiscriminatedUnion<"status", [import("zod").ZodObject<{
60
- status: import("zod").ZodLiteral<"unclassified">;
61
- }, "strip", import("zod").ZodTypeAny, {
62
- status: "unclassified";
63
- }, {
64
- status: "unclassified";
65
- }>, import("zod").ZodObject<{
66
- status: import("zod").ZodLiteral<"published">;
67
- }, "strip", import("zod").ZodTypeAny, {
68
- status: "published";
69
- }, {
70
- status: "published";
71
- }>, import("zod").ZodObject<{
72
- status: import("zod").ZodLiteral<"release">;
73
- release_id: import("zod").ZodString;
74
- }, "strip", import("zod").ZodTypeAny, {
75
- status: "release";
76
- release_id: string;
77
- }, {
78
- status: "release";
79
- release_id: string;
80
- }>, import("zod").ZodObject<{
81
- status: import("zod").ZodLiteral<"archived">;
82
- }, "strip", import("zod").ZodTypeAny, {
83
- status: "archived";
84
- }, {
85
- status: "archived";
86
- }>]>, import("zod").ZodObject<{
87
- version_id: import("zod").ZodString;
88
- tags: import("zod").ZodArray<import("zod").ZodString, "many">;
89
- custom_type_label: import("zod").ZodString;
90
- preview_summary: import("zod").ZodOptional<import("zod").ZodString>;
91
- preview_image: import("zod").ZodOptional<import("zod").ZodString>;
92
- }, "strip", import("zod").ZodTypeAny, {
93
- tags: string[];
94
- version_id: string;
95
- custom_type_label: string;
96
- preview_summary?: string | undefined;
97
- preview_image?: string | undefined;
98
- }, {
99
- tags: string[];
100
- version_id: string;
101
- custom_type_label: string;
102
- preview_summary?: string | undefined;
103
- preview_image?: string | undefined;
104
- }>>, "many">;
105
- }, "strip", import("zod").ZodTypeAny, {
106
- id: string;
107
- title: string;
108
- custom_type_id: string;
109
- versions: (({
110
- status: "unclassified";
111
- } | {
112
- status: "published";
113
- } | {
114
- status: "release";
115
- release_id: string;
116
- } | {
117
- status: "archived";
118
- }) & {
119
- tags: string[];
120
- version_id: string;
121
- custom_type_label: string;
122
- preview_summary?: string | undefined;
123
- preview_image?: string | undefined;
124
- })[];
125
- }, {
126
- id: string;
127
- title: string;
128
- custom_type_id: string;
129
- versions: (({
130
- status: "unclassified";
131
- } | {
132
- status: "published";
133
- } | {
134
- status: "release";
135
- release_id: string;
136
- } | {
137
- status: "archived";
138
- }) & {
139
- tags: string[];
140
- version_id: string;
141
- custom_type_label: string;
142
- preview_summary?: string | undefined;
143
- preview_image?: string | undefined;
144
- })[];
145
- }>;
146
- declare const documentsSearchAPISchemaOkType: import("zod").ZodObject<{
147
- total: import("zod").ZodNumber;
148
- cursor: import("zod").ZodOptional<import("zod").ZodString>;
149
- results: import("zod").ZodArray<import("zod").ZodObject<{
150
- id: import("zod").ZodString;
151
- custom_type_id: import("zod").ZodString;
152
- title: import("zod").ZodString;
153
- versions: import("zod").ZodArray<import("zod").ZodIntersection<import("zod").ZodDiscriminatedUnion<"status", [import("zod").ZodObject<{
154
- status: import("zod").ZodLiteral<"unclassified">;
155
- }, "strip", import("zod").ZodTypeAny, {
156
- status: "unclassified";
157
- }, {
158
- status: "unclassified";
159
- }>, import("zod").ZodObject<{
160
- status: import("zod").ZodLiteral<"published">;
161
- }, "strip", import("zod").ZodTypeAny, {
162
- status: "published";
163
- }, {
164
- status: "published";
165
- }>, import("zod").ZodObject<{
166
- status: import("zod").ZodLiteral<"release">;
167
- release_id: import("zod").ZodString;
168
- }, "strip", import("zod").ZodTypeAny, {
169
- status: "release";
170
- release_id: string;
171
- }, {
172
- status: "release";
173
- release_id: string;
174
- }>, import("zod").ZodObject<{
175
- status: import("zod").ZodLiteral<"archived">;
176
- }, "strip", import("zod").ZodTypeAny, {
177
- status: "archived";
178
- }, {
179
- status: "archived";
180
- }>]>, import("zod").ZodObject<{
181
- version_id: import("zod").ZodString;
182
- tags: import("zod").ZodArray<import("zod").ZodString, "many">;
183
- custom_type_label: import("zod").ZodString;
184
- preview_summary: import("zod").ZodOptional<import("zod").ZodString>;
185
- preview_image: import("zod").ZodOptional<import("zod").ZodString>;
186
- }, "strip", import("zod").ZodTypeAny, {
187
- tags: string[];
188
- version_id: string;
189
- custom_type_label: string;
190
- preview_summary?: string | undefined;
191
- preview_image?: string | undefined;
192
- }, {
193
- tags: string[];
194
- version_id: string;
195
- custom_type_label: string;
196
- preview_summary?: string | undefined;
197
- preview_image?: string | undefined;
198
- }>>, "many">;
199
- }, "strip", import("zod").ZodTypeAny, {
200
- id: string;
201
- title: string;
202
- custom_type_id: string;
203
- versions: (({
204
- status: "unclassified";
205
- } | {
206
- status: "published";
207
- } | {
208
- status: "release";
209
- release_id: string;
210
- } | {
211
- status: "archived";
212
- }) & {
213
- tags: string[];
214
- version_id: string;
215
- custom_type_label: string;
216
- preview_summary?: string | undefined;
217
- preview_image?: string | undefined;
218
- })[];
219
- }, {
220
- id: string;
221
- title: string;
222
- custom_type_id: string;
223
- versions: (({
224
- status: "unclassified";
225
- } | {
226
- status: "published";
227
- } | {
228
- status: "release";
229
- release_id: string;
230
- } | {
231
- status: "archived";
232
- }) & {
233
- tags: string[];
234
- version_id: string;
235
- custom_type_label: string;
236
- preview_summary?: string | undefined;
237
- preview_image?: string | undefined;
238
- })[];
239
- }>, "many">;
240
- }, "strip", import("zod").ZodTypeAny, {
241
- total: number;
242
- results: {
243
- id: string;
244
- title: string;
245
- custom_type_id: string;
246
- versions: (({
247
- status: "unclassified";
248
- } | {
249
- status: "published";
250
- } | {
251
- status: "release";
252
- release_id: string;
253
- } | {
254
- status: "archived";
255
- }) & {
256
- tags: string[];
257
- version_id: string;
258
- custom_type_label: string;
259
- preview_summary?: string | undefined;
260
- preview_image?: string | undefined;
261
- })[];
262
- }[];
263
- cursor?: string | undefined;
264
- }, {
265
- total: number;
266
- results: {
267
- id: string;
268
- title: string;
269
- custom_type_id: string;
270
- versions: (({
271
- status: "unclassified";
272
- } | {
273
- status: "published";
274
- } | {
275
- status: "release";
276
- release_id: string;
277
- } | {
278
- status: "archived";
279
- }) & {
280
- tags: string[];
281
- version_id: string;
282
- custom_type_label: string;
283
- preview_summary?: string | undefined;
284
- preview_image?: string | undefined;
285
- })[];
286
- }[];
287
- cursor?: string | undefined;
288
- }>;
289
- export declare type DocumentSearchApi = TypeOf<typeof documentsSearchAPISchemaOkType>;
290
- export declare type Document = TypeOf<typeof documentsSearchOkType>;
291
- export {};
@@ -3,5 +3,5 @@ interface BubbleMenuProps {
3
3
  editor: Editor;
4
4
  nodeTypes: string[];
5
5
  }
6
- export declare function BubbleMenu(props: BubbleMenuProps): JSX.Element | null;
6
+ export declare function BubbleMenu(props: BubbleMenuProps): JSX.Element;
7
7
  export {};
@@ -1,6 +1,7 @@
1
1
  import type { Editor } from "@tiptap/core";
2
2
  interface LinkItemsProps {
3
3
  editor: Editor;
4
+ setDisplayLinkModal: (open: boolean) => void;
4
5
  }
5
6
  export declare function LinkItems(props: LinkItemsProps): JSX.Element;
6
7
  export {};
@@ -0,0 +1,9 @@
1
+ interface SetLinkModalProps {
2
+ open: boolean;
3
+ setOpen: (open: boolean) => void;
4
+ onSetUrl: (url: string) => void;
5
+ openInNewTab: boolean;
6
+ setOpenInNewTab: (openInNewTab: boolean) => void;
7
+ }
8
+ export declare function SetLinkModal(props: SetLinkModalProps): JSX.Element;
9
+ export {};
@@ -12,12 +12,12 @@ interface useImageViewProps {
12
12
  imageViewProps: ImageViewProps;
13
13
  }
14
14
  export declare function useImageView(props: useImageViewProps): {
15
- onContentChange: (content?: ImageContent) => void;
16
15
  onMediaSelected: (media: ExternalImage) => void;
17
16
  onCropperDialogClose: ({ croppedImages }: {
18
17
  croppedImages: CroppedImages;
19
18
  }) => void;
20
19
  isUpdating: boolean;
21
20
  updateContent: (content?: ImageContent) => void;
21
+ onClear: () => void;
22
22
  };
23
23
  export {};
@@ -0,0 +1,4 @@
1
+ import type { NodeViewProps } from "@tiptap/core";
2
+ export declare function useSelected(props: NodeViewProps): {
3
+ selected: boolean;
4
+ };