@prismicio/editor-fields 0.4.61 → 0.4.62-alpha.jp-table-render-default-layout.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 (31) hide show
  1. package/dist/core/MediaLibrary/components/MediaLibraryDropzone.d.ts +3 -2
  2. package/dist/core/MediaLibrary/hooks/useMediaLibraryUpload.d.ts +33 -0
  3. package/dist/core/MediaLibrary/index.d.ts +0 -1
  4. package/dist/core/service/customType.d.ts +66 -0
  5. package/dist/core/service/document.d.ts +1518 -0
  6. package/dist/fields/ImageField/Components/ImageFieldCard.d.ts +1 -1
  7. package/dist/fields/ImageField/Components/ImageFieldDropZone.d.ts +9 -0
  8. package/dist/fields/ImageField/useImageField.d.ts +30 -0
  9. package/dist/fields/ImageField/useImageFieldImageUpload.d.ts +37 -0
  10. package/dist/fields/RichTextField/RichTextField.d.ts +6 -5
  11. package/dist/fields/RichTextField/extensions/Bold/BoldModel.d.ts +2 -2
  12. package/dist/fields/RichTextField/extensions/Image/useImageView.d.ts +30 -0
  13. package/dist/fields/RichTextField/extensions/Italic/ItalicModel.d.ts +2 -2
  14. package/dist/fields/RichTextField/extensions/Label/LabelModel.d.ts +2 -2
  15. package/dist/fields/RichTextField/extensions/Link/LinkModel.d.ts +2 -2
  16. package/dist/fields/RichTextField/extensions/Table/Table.d.ts +2 -0
  17. package/dist/fields/RichTextField/extensions/extensions.d.ts +4 -3
  18. package/dist/fields/RichTextField/models/EditorExtension.d.ts +34 -20
  19. package/dist/fields/RichTextField/models/RichTextConfig.d.ts +3 -2
  20. package/dist/fields/RichTextField/types.d.ts +37 -0
  21. package/dist/fields/TableField/TableField.d.ts +12 -0
  22. package/dist/fields/TableField/index.d.ts +1 -0
  23. package/dist/fields/utils.d.ts +2 -2
  24. package/dist/index.cjs.js +56 -53
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.es.js +29767 -25219
  27. package/dist/slices/utils.d.ts +138 -0
  28. package/package.json +9 -5
  29. package/dist/constants/localStorage.d.ts +0 -1
  30. package/dist/core/MediaLibrary/components/NewMediaLibraryFeaturesBanner.d.ts +0 -6
  31. package/dist/fields/RichTextField/extensions/Image/ImageLinkControl.d.ts +0 -0
@@ -1,5 +1,6 @@
1
- import type { PropsWithChildren } from "react";
2
- interface MediaLibraryDropzoneProps extends PropsWithChildren {
1
+ import type { ReactNode } from "react";
2
+ interface MediaLibraryDropzoneProps {
3
+ children: ReactNode;
3
4
  }
4
5
  export declare function MediaLibraryDropzone(props: MediaLibraryDropzoneProps): JSX.Element;
5
6
  export {};
@@ -1,3 +1,4 @@
1
+ import { type EditorConfig } from "../../../EditorConfig";
1
2
  import { type MediaAsset } from "../hooks/mediaLibraryData";
2
3
  export type UploadFile = NewUploadFile | UploadedFile;
3
4
  interface NewUploadFile {
@@ -32,4 +33,36 @@ export declare function useMediaLibraryUpload(args: UseMediaLibraryUploadArgs):
32
33
  onFilesSelected: (files: File[]) => void;
33
34
  onRetry: (failedFile: UploadFile) => void;
34
35
  };
36
+ export declare function uploadMedia(params: {
37
+ file: File;
38
+ config: EditorConfig;
39
+ }): Promise<{
40
+ tags: {
41
+ name: string;
42
+ id: string;
43
+ created_at: number;
44
+ last_modified: number;
45
+ count: number;
46
+ uploader_id?: string | undefined;
47
+ }[];
48
+ id: string;
49
+ url: string;
50
+ kind: string;
51
+ size: number;
52
+ last_modified: number;
53
+ filename: string;
54
+ width?: number | undefined;
55
+ height?: number | undefined;
56
+ credits?: string | undefined;
57
+ alt?: string | undefined;
58
+ notes?: string | undefined;
59
+ uploader_id?: string | undefined;
60
+ extension?: string | undefined;
61
+ search_highlight?: {
62
+ credits?: string | undefined;
63
+ alt?: string | undefined;
64
+ notes?: string | undefined;
65
+ filename?: string | undefined;
66
+ } | undefined;
67
+ }>;
35
68
  export {};
@@ -1,2 +1 @@
1
- export { NewMediaLibraryFeaturesBanner } from "./components/NewMediaLibraryFeaturesBanner";
2
1
  export { MediaLibrary } from "./MediaLibrary";
@@ -218,6 +218,12 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
218
218
  config?: {
219
219
  label?: string | null | undefined;
220
220
  } | undefined;
221
+ }) | ({
222
+ type: "Table";
223
+ } & {
224
+ config?: {
225
+ label?: string | null | undefined;
226
+ } | undefined;
221
227
  }) | ({
222
228
  type: "Text";
223
229
  } & {
@@ -387,6 +393,12 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
387
393
  config?: {
388
394
  label?: string | null | undefined;
389
395
  } | undefined;
396
+ }) | ({
397
+ type: "Table";
398
+ } & {
399
+ config?: {
400
+ label?: string | null | undefined;
401
+ } | undefined;
390
402
  }) | ({
391
403
  type: "Text";
392
404
  } & {
@@ -556,6 +568,12 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
556
568
  config?: {
557
569
  label?: string | null | undefined;
558
570
  } | undefined;
571
+ }) | ({
572
+ type: "Table";
573
+ } & {
574
+ config?: {
575
+ label?: string | null | undefined;
576
+ } | undefined;
559
577
  }) | ({
560
578
  type: "Text";
561
579
  } & {
@@ -735,6 +753,12 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
735
753
  config?: {
736
754
  label?: string | null | undefined;
737
755
  } | undefined;
756
+ }) | ({
757
+ type: "Table";
758
+ } & {
759
+ config?: {
760
+ label?: string | null | undefined;
761
+ } | undefined;
738
762
  }) | ({
739
763
  type: "Text";
740
764
  } & {
@@ -904,6 +928,12 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
904
928
  config?: {
905
929
  label?: string | null | undefined;
906
930
  } | undefined;
931
+ }) | ({
932
+ type: "Table";
933
+ } & {
934
+ config?: {
935
+ label?: string | null | undefined;
936
+ } | undefined;
907
937
  }) | ({
908
938
  type: "Text";
909
939
  } & {
@@ -1074,6 +1104,12 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
1074
1104
  config?: {
1075
1105
  label?: string | null | undefined;
1076
1106
  } | undefined;
1107
+ }) | ({
1108
+ type: "Table";
1109
+ } & {
1110
+ config?: {
1111
+ label?: string | null | undefined;
1112
+ } | undefined;
1077
1113
  }) | ({
1078
1114
  type: "Text";
1079
1115
  } & {
@@ -1236,6 +1272,12 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
1236
1272
  config?: {
1237
1273
  label?: string | null | undefined;
1238
1274
  } | undefined;
1275
+ }) | ({
1276
+ type: "Table";
1277
+ } & {
1278
+ config?: {
1279
+ label?: string | null | undefined;
1280
+ } | undefined;
1239
1281
  }) | ({
1240
1282
  type: "Text";
1241
1283
  } & {
@@ -1414,6 +1456,12 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
1414
1456
  config?: {
1415
1457
  label?: string | null | undefined;
1416
1458
  } | undefined;
1459
+ }) | ({
1460
+ type: "Table";
1461
+ } & {
1462
+ config?: {
1463
+ label?: string | null | undefined;
1464
+ } | undefined;
1417
1465
  }) | ({
1418
1466
  type: "Text";
1419
1467
  } & {
@@ -1583,6 +1631,12 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
1583
1631
  config?: {
1584
1632
  label?: string | null | undefined;
1585
1633
  } | undefined;
1634
+ }) | ({
1635
+ type: "Table";
1636
+ } & {
1637
+ config?: {
1638
+ label?: string | null | undefined;
1639
+ } | undefined;
1586
1640
  }) | ({
1587
1641
  type: "Text";
1588
1642
  } & {
@@ -1752,6 +1806,12 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
1752
1806
  config?: {
1753
1807
  label?: string | null | undefined;
1754
1808
  } | undefined;
1809
+ }) | ({
1810
+ type: "Table";
1811
+ } & {
1812
+ config?: {
1813
+ label?: string | null | undefined;
1814
+ } | undefined;
1755
1815
  }) | ({
1756
1816
  type: "Text";
1757
1817
  } & {
@@ -1920,6 +1980,12 @@ export declare function useStaticCustomType(args: CustomTypeOptionsArgs): import
1920
1980
  config?: {
1921
1981
  label?: string | null | undefined;
1922
1982
  } | undefined;
1983
+ }) | ({
1984
+ type: "Table";
1985
+ } & {
1986
+ config?: {
1987
+ label?: string | null | undefined;
1988
+ } | undefined;
1923
1989
  }) | ({
1924
1990
  type: "Text";
1925
1991
  } & {