@prismicio/editor-fields 0.4.73 → 0.4.75-alpha.support-new-cr-model.1

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 (46) hide show
  1. package/dist/core/APIExplorer/components/APIExplorerContext.d.ts +6 -6
  2. package/dist/core/APIExplorer/components/Request/components/RequestFormSelect.d.ts +1 -1
  3. package/dist/core/APIExplorer/components/Request/createRequest.d.ts +6 -7
  4. package/dist/core/APIExplorer/constants.d.ts +1 -0
  5. package/dist/core/APIExplorer/hooks/useRepositoryCustomTypes.d.ts +1 -1
  6. package/dist/core/APIExplorer/utils.d.ts +3 -0
  7. package/dist/core/MediaLibrary/hooks/mediaLibraryData.d.ts +102 -102
  8. package/dist/core/MediaLibrary/hooks/tagData.d.ts +3 -3
  9. package/dist/core/MediaLibrary/hooks/useMediaLibraryUpload.d.ts +10 -10
  10. package/dist/core/MediaLibrary/hooks/useSelectedMedia.d.ts +10 -10
  11. package/dist/core/UnsplashLibrary/unsplashData.d.ts +18 -18
  12. package/dist/core/document.d.ts +1 -1
  13. package/dist/core/service/customType.d.ts +141 -20
  14. package/dist/core/service/document.d.ts +178 -178
  15. package/dist/core/service/documentSearch.d.ts +55 -55
  16. package/dist/core/service/repository.d.ts +12 -12
  17. package/dist/fields/ImageField/useImageField.d.ts +10 -10
  18. package/dist/fields/ImageField/useImageFieldImageUpload.d.ts +10 -10
  19. package/dist/fields/IntegrationField/integrationData.d.ts +5 -5
  20. package/dist/fields/LinkField/Documents/documentsData.d.ts +18 -18
  21. package/dist/fields/LinkField/LinkField.d.ts +1 -1
  22. package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +2 -2
  23. package/dist/fields/RichTextField/extensions/Image/useImageView.d.ts +10 -10
  24. package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/TableHandlesPlugin.d.ts +8 -0
  25. package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/events.d.ts +19 -0
  26. package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/index.d.ts +1 -0
  27. package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/TableHandles/utils.d.ts +23 -0
  28. package/dist/fields/RichTextField/extensions/Table/TableCell/plugins/index.d.ts +1 -0
  29. package/dist/fields/RichTextField/extensions/Table/TableCell/utils.d.ts +1 -0
  30. package/dist/fields/RichTextField/extensions/Table/TableControlsWrapper.d.ts +3 -0
  31. package/dist/fields/RichTextField/extensions/Table/TableView.d.ts +5 -8
  32. package/dist/fields/RichTextField/extensions/Table/menus/PassthroughTrigger.d.ts +12 -0
  33. package/dist/fields/RichTextField/extensions/Table/menus/TableColumnMenu.d.ts +6 -4
  34. package/dist/fields/RichTextField/extensions/Table/menus/TableRowMenu.d.ts +6 -4
  35. package/dist/fields/RichTextField/extensions/Table/plugins/TableHandles/TableHandlesPluginDef.d.ts +8 -0
  36. package/dist/fields/RichTextField/extensions/Table/plugins/TableHandles/TableHandlesPluginView.d.ts +34 -0
  37. package/dist/fields/RichTextField/extensions/Table/plugins/TableHandles/TableHandlesPluginViewClass.d.ts +34 -0
  38. package/dist/index.cjs.js +50 -61
  39. package/dist/index.d.ts +1 -1
  40. package/dist/index.es.js +15781 -15626
  41. package/dist/slices/utils.d.ts +2 -2
  42. package/package.json +5 -5
  43. /package/dist/fields/RichTextField/extensions/Table/{plugins/tableHandles/tableHandlesPluginView.d.ts → TableCell/plugins/TableHandles/TableHandlesPluginView.d.ts} +0 -0
  44. /package/dist/fields/RichTextField/extensions/Table/plugins/{tableHandles/tableHandlesPlugin.d.ts → TableHandles/TableHandlesPlugin.d.ts} +0 -0
  45. /package/dist/fields/RichTextField/extensions/Table/plugins/{tableHandles → TableHandles}/index.d.ts +0 -0
  46. /package/dist/fields/RichTextField/extensions/Table/plugins/{tableHandles → TableHandles}/utils.d.ts +0 -0
@@ -16,20 +16,20 @@ declare const unsplashImage: import("zod").ZodObject<{
16
16
  alt_description: import("zod").ZodOptional<import("zod").ZodString>;
17
17
  description: import("zod").ZodNullable<import("zod").ZodString>;
18
18
  }, "strip", import("zod").ZodTypeAny, {
19
- description: string | null;
20
19
  id: string;
21
- width: number;
22
20
  height: number;
21
+ width: number;
22
+ description: string | null;
23
23
  urls: {
24
24
  small: string;
25
25
  full: string;
26
26
  };
27
27
  alt_description?: string | undefined;
28
28
  }, {
29
- description: string | null;
30
29
  id: string;
31
- width: number;
32
30
  height: number;
31
+ width: number;
32
+ description: string | null;
33
33
  urls: {
34
34
  small: string;
35
35
  full: string;
@@ -54,20 +54,20 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
54
54
  alt_description: import("zod").ZodOptional<import("zod").ZodString>;
55
55
  description: import("zod").ZodNullable<import("zod").ZodString>;
56
56
  }, "strip", import("zod").ZodTypeAny, {
57
- description: string | null;
58
57
  id: string;
59
- width: number;
60
58
  height: number;
59
+ width: number;
60
+ description: string | null;
61
61
  urls: {
62
62
  small: string;
63
63
  full: string;
64
64
  };
65
65
  alt_description?: string | undefined;
66
66
  }, {
67
- description: string | null;
68
67
  id: string;
69
- width: number;
70
68
  height: number;
69
+ width: number;
70
+ description: string | null;
71
71
  urls: {
72
72
  small: string;
73
73
  full: string;
@@ -76,10 +76,10 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
76
76
  }>, "many">;
77
77
  }, "strip", import("zod").ZodTypeAny, {
78
78
  results: {
79
- description: string | null;
80
79
  id: string;
81
- width: number;
82
80
  height: number;
81
+ width: number;
82
+ description: string | null;
83
83
  urls: {
84
84
  small: string;
85
85
  full: string;
@@ -88,10 +88,10 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
88
88
  }[];
89
89
  }, {
90
90
  results: {
91
- description: string | null;
92
91
  id: string;
93
- width: number;
94
92
  height: number;
93
+ width: number;
94
+ description: string | null;
95
95
  urls: {
96
96
  small: string;
97
97
  full: string;
@@ -99,10 +99,10 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
99
99
  alt_description?: string | undefined;
100
100
  }[];
101
101
  }>, {
102
- description: string | null;
103
102
  id: string;
104
- width: number;
105
103
  height: number;
104
+ width: number;
105
+ description: string | null;
106
106
  urls: {
107
107
  small: string;
108
108
  full: string;
@@ -110,10 +110,10 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
110
110
  alt_description?: string | undefined;
111
111
  }[], {
112
112
  results: {
113
- description: string | null;
114
113
  id: string;
115
- width: number;
116
114
  height: number;
115
+ width: number;
116
+ description: string | null;
117
117
  urls: {
118
118
  small: string;
119
119
  full: string;
@@ -124,10 +124,10 @@ export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod
124
124
  export type UnplashSearchApi = TypeOf<typeof unsplashSearchApiType>;
125
125
  export type UnsplashImage = TypeOf<typeof unsplashImage>;
126
126
  export declare function useUnsplashSearch(baseUrl: URL, term: string): {
127
- description: string | null;
128
127
  id: string;
129
- width: number;
130
128
  height: number;
129
+ width: number;
130
+ description: string | null;
131
131
  urls: {
132
132
  small: string;
133
133
  full: string;
@@ -1,7 +1,7 @@
1
1
  import { type Document as DocumentT, GroupContent } from "@prismicio/types-internal/lib/content";
2
2
  import { type StaticCustomType } from "@prismicio/types-internal/lib/customtypes";
3
3
  import type { DocumentVersion } from "./service";
4
- export declare function prepareDocumentForSave(customType: StaticCustomType, document: DocumentT): DocumentT;
4
+ export declare function prepareDocument(document: DocumentT, customType: StaticCustomType): DocumentT;
5
5
  export declare const defaultGroupContentWithOneItem: GroupContent;
6
6
  export declare const documentStatus: {
7
7
  readonly unclassified: {
@@ -7,14 +7,14 @@ declare const CustomType: z.ZodObject<{
7
7
  repeatable: z.ZodBoolean;
8
8
  status: z.ZodBoolean;
9
9
  }, "strip", z.ZodTypeAny, {
10
+ id: string;
10
11
  label: string;
11
12
  status: boolean;
12
- id: string;
13
13
  repeatable: boolean;
14
14
  }, {
15
+ id: string;
15
16
  label: string;
16
17
  status: boolean;
17
- id: string;
18
18
  repeatable: boolean;
19
19
  }>;
20
20
  export type CustomType = z.TypeOf<typeof CustomType>;
@@ -24,50 +24,50 @@ interface CustomTypesOptionsArgs {
24
24
  authStrategy: AuthStrategy;
25
25
  }
26
26
  export declare function getCustomTypesOptions(args: CustomTypesOptionsArgs): import("@tanstack/react-query/build/legacy/types").UseQueryOptions<{
27
+ id: string;
27
28
  label: string;
28
29
  status: boolean;
29
- id: string;
30
30
  repeatable: boolean;
31
31
  }[], Error, {
32
+ id: string;
32
33
  label: string;
33
34
  status: boolean;
34
- id: string;
35
35
  repeatable: boolean;
36
36
  }[], string[]> & {
37
37
  initialData?: import("@tanstack/query-core/build/legacy/hydration-DTVzC0E7").L<{
38
+ id: string;
38
39
  label: string;
39
40
  status: boolean;
40
- id: string;
41
41
  repeatable: boolean;
42
42
  }[]> | undefined;
43
43
  } & {
44
44
  queryKey: import("@tanstack/query-core/build/legacy/hydration-DTVzC0E7").E<string[], {
45
+ id: string;
45
46
  label: string;
46
47
  status: boolean;
47
- id: string;
48
48
  repeatable: boolean;
49
49
  }[]>;
50
50
  };
51
51
  export declare function prefetchCustomTypes(queryClient: QueryClient, args: CustomTypesOptionsArgs): void;
52
52
  export declare function fetchCustomTypes(queryClient: QueryClient, args: CustomTypesOptionsArgs): Promise<{
53
+ id: string;
53
54
  label: string;
54
55
  status: boolean;
55
- id: string;
56
56
  repeatable: boolean;
57
57
  }[]>;
58
58
  export declare function useCustomTypes(args: CustomTypesOptionsArgs): import("@tanstack/react-query/build/legacy/types").UseSuspenseQueryResult<{
59
+ id: string;
59
60
  label: string;
60
61
  status: boolean;
61
- id: string;
62
62
  repeatable: boolean;
63
63
  }[], Error>;
64
64
  interface CustomTypeOptionsArgs extends CustomTypesOptionsArgs {
65
65
  id: string;
66
66
  }
67
67
  export declare function useCustomType(args: CustomTypeOptionsArgs): {
68
+ id: string;
68
69
  label: string;
69
70
  status: boolean;
70
- id: string;
71
71
  repeatable: boolean;
72
72
  };
73
73
  export declare function invalidateCustomTypes(queryClient: QueryClient, args: CustomTypesOptionsArgs): Promise<void>;
@@ -155,7 +155,18 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
155
155
  useAsTitle?: boolean | undefined;
156
156
  placeholder?: string | undefined;
157
157
  select?: "web" | "document" | "media" | null | undefined;
158
- customtypes?: readonly string[] | undefined;
158
+ customtypes?: readonly (string | ({
159
+ id: string;
160
+ } & {
161
+ fields?: readonly (string | {
162
+ id: string;
163
+ customtypes: readonly (string | ({
164
+ id: string;
165
+ } & {
166
+ fields?: readonly string[] | undefined;
167
+ }))[];
168
+ })[] | undefined;
169
+ }))[] | undefined;
159
170
  masks?: readonly string[] | undefined;
160
171
  tags?: readonly string[] | undefined;
161
172
  allowTargetBlank?: boolean | undefined;
@@ -330,7 +341,18 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
330
341
  useAsTitle?: boolean | undefined;
331
342
  placeholder?: string | undefined;
332
343
  select?: "web" | "document" | "media" | null | undefined;
333
- customtypes?: readonly string[] | undefined;
344
+ customtypes?: readonly (string | ({
345
+ id: string;
346
+ } & {
347
+ fields?: readonly (string | {
348
+ id: string;
349
+ customtypes: readonly (string | ({
350
+ id: string;
351
+ } & {
352
+ fields?: readonly string[] | undefined;
353
+ }))[];
354
+ })[] | undefined;
355
+ }))[] | undefined;
334
356
  masks?: readonly string[] | undefined;
335
357
  tags?: readonly string[] | undefined;
336
358
  allowTargetBlank?: boolean | undefined;
@@ -505,7 +527,18 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
505
527
  useAsTitle?: boolean | undefined;
506
528
  placeholder?: string | undefined;
507
529
  select?: "web" | "document" | "media" | null | undefined;
508
- customtypes?: readonly string[] | undefined;
530
+ customtypes?: readonly (string | ({
531
+ id: string;
532
+ } & {
533
+ fields?: readonly (string | {
534
+ id: string;
535
+ customtypes: readonly (string | ({
536
+ id: string;
537
+ } & {
538
+ fields?: readonly string[] | undefined;
539
+ }))[];
540
+ })[] | undefined;
541
+ }))[] | undefined;
509
542
  masks?: readonly string[] | undefined;
510
543
  tags?: readonly string[] | undefined;
511
544
  allowTargetBlank?: boolean | undefined;
@@ -690,7 +723,18 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
690
723
  useAsTitle?: boolean | undefined;
691
724
  placeholder?: string | undefined;
692
725
  select?: "web" | "document" | "media" | null | undefined;
693
- customtypes?: readonly string[] | undefined;
726
+ customtypes?: readonly (string | ({
727
+ id: string;
728
+ } & {
729
+ fields?: readonly (string | {
730
+ id: string;
731
+ customtypes: readonly (string | ({
732
+ id: string;
733
+ } & {
734
+ fields?: readonly string[] | undefined;
735
+ }))[];
736
+ })[] | undefined;
737
+ }))[] | undefined;
694
738
  masks?: readonly string[] | undefined;
695
739
  tags?: readonly string[] | undefined;
696
740
  allowTargetBlank?: boolean | undefined;
@@ -865,7 +909,18 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
865
909
  useAsTitle?: boolean | undefined;
866
910
  placeholder?: string | undefined;
867
911
  select?: "web" | "document" | "media" | null | undefined;
868
- customtypes?: readonly string[] | undefined;
912
+ customtypes?: readonly (string | ({
913
+ id: string;
914
+ } & {
915
+ fields?: readonly (string | {
916
+ id: string;
917
+ customtypes: readonly (string | ({
918
+ id: string;
919
+ } & {
920
+ fields?: readonly string[] | undefined;
921
+ }))[];
922
+ })[] | undefined;
923
+ }))[] | undefined;
869
924
  masks?: readonly string[] | undefined;
870
925
  tags?: readonly string[] | undefined;
871
926
  allowTargetBlank?: boolean | undefined;
@@ -1041,7 +1096,18 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
1041
1096
  useAsTitle?: boolean | undefined;
1042
1097
  placeholder?: string | undefined;
1043
1098
  select?: "web" | "document" | "media" | null | undefined;
1044
- customtypes?: readonly string[] | undefined;
1099
+ customtypes?: readonly (string | ({
1100
+ id: string;
1101
+ } & {
1102
+ fields?: readonly (string | {
1103
+ id: string;
1104
+ customtypes: readonly (string | ({
1105
+ id: string;
1106
+ } & {
1107
+ fields?: readonly string[] | undefined;
1108
+ }))[];
1109
+ })[] | undefined;
1110
+ }))[] | undefined;
1045
1111
  masks?: readonly string[] | undefined;
1046
1112
  tags?: readonly string[] | undefined;
1047
1113
  allowTargetBlank?: boolean | undefined;
@@ -1209,7 +1275,18 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
1209
1275
  useAsTitle?: boolean | undefined;
1210
1276
  placeholder?: string | undefined;
1211
1277
  select?: "web" | "document" | "media" | null | undefined;
1212
- customtypes?: readonly string[] | undefined;
1278
+ customtypes?: readonly (string | ({
1279
+ id: string;
1280
+ } & {
1281
+ fields?: readonly (string | {
1282
+ id: string;
1283
+ customtypes: readonly (string | ({
1284
+ id: string;
1285
+ } & {
1286
+ fields?: readonly string[] | undefined;
1287
+ }))[];
1288
+ })[] | undefined;
1289
+ }))[] | undefined;
1213
1290
  masks?: readonly string[] | undefined;
1214
1291
  tags?: readonly string[] | undefined;
1215
1292
  allowTargetBlank?: boolean | undefined;
@@ -1393,7 +1470,18 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
1393
1470
  useAsTitle?: boolean | undefined;
1394
1471
  placeholder?: string | undefined;
1395
1472
  select?: "web" | "document" | "media" | null | undefined;
1396
- customtypes?: readonly string[] | undefined;
1473
+ customtypes?: readonly (string | ({
1474
+ id: string;
1475
+ } & {
1476
+ fields?: readonly (string | {
1477
+ id: string;
1478
+ customtypes: readonly (string | ({
1479
+ id: string;
1480
+ } & {
1481
+ fields?: readonly string[] | undefined;
1482
+ }))[];
1483
+ })[] | undefined;
1484
+ }))[] | undefined;
1397
1485
  masks?: readonly string[] | undefined;
1398
1486
  tags?: readonly string[] | undefined;
1399
1487
  allowTargetBlank?: boolean | undefined;
@@ -1568,7 +1656,18 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
1568
1656
  useAsTitle?: boolean | undefined;
1569
1657
  placeholder?: string | undefined;
1570
1658
  select?: "web" | "document" | "media" | null | undefined;
1571
- customtypes?: readonly string[] | undefined;
1659
+ customtypes?: readonly (string | ({
1660
+ id: string;
1661
+ } & {
1662
+ fields?: readonly (string | {
1663
+ id: string;
1664
+ customtypes: readonly (string | ({
1665
+ id: string;
1666
+ } & {
1667
+ fields?: readonly string[] | undefined;
1668
+ }))[];
1669
+ })[] | undefined;
1670
+ }))[] | undefined;
1572
1671
  masks?: readonly string[] | undefined;
1573
1672
  tags?: readonly string[] | undefined;
1574
1673
  allowTargetBlank?: boolean | undefined;
@@ -1743,7 +1842,18 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
1743
1842
  useAsTitle?: boolean | undefined;
1744
1843
  placeholder?: string | undefined;
1745
1844
  select?: "web" | "document" | "media" | null | undefined;
1746
- customtypes?: readonly string[] | undefined;
1845
+ customtypes?: readonly (string | ({
1846
+ id: string;
1847
+ } & {
1848
+ fields?: readonly (string | {
1849
+ id: string;
1850
+ customtypes: readonly (string | ({
1851
+ id: string;
1852
+ } & {
1853
+ fields?: readonly string[] | undefined;
1854
+ }))[];
1855
+ })[] | undefined;
1856
+ }))[] | undefined;
1747
1857
  masks?: readonly string[] | undefined;
1748
1858
  tags?: readonly string[] | undefined;
1749
1859
  allowTargetBlank?: boolean | undefined;
@@ -1917,7 +2027,18 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
1917
2027
  useAsTitle?: boolean | undefined;
1918
2028
  placeholder?: string | undefined;
1919
2029
  select?: "web" | "document" | "media" | null | undefined;
1920
- customtypes?: readonly string[] | undefined;
2030
+ customtypes?: readonly (string | ({
2031
+ id: string;
2032
+ } & {
2033
+ fields?: readonly (string | {
2034
+ id: string;
2035
+ customtypes: readonly (string | ({
2036
+ id: string;
2037
+ } & {
2038
+ fields?: readonly string[] | undefined;
2039
+ }))[];
2040
+ })[] | undefined;
2041
+ }))[] | undefined;
1921
2042
  masks?: readonly string[] | undefined;
1922
2043
  tags?: readonly string[] | undefined;
1923
2044
  allowTargetBlank?: boolean | undefined;