@prismicio/editor-fields 0.4.1 → 0.4.4

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 (36) hide show
  1. package/dist/EditorConfig.d.ts +5 -0
  2. package/dist/NestableWidgetSwitch.d.ts +3 -4
  3. package/dist/SectionEditor.d.ts +3 -4
  4. package/dist/fields/EmbedField/EmbedField.d.ts +3 -3
  5. package/dist/fields/GeoPointField.d.ts +11 -0
  6. package/dist/fields/ImageField/{CroppedDialog/index.d.ts → CropperDialog/CropperDialog.d.ts} +1 -1
  7. package/dist/fields/ImageField/{CroppedDialog → CropperDialog}/croppedImage.d.ts +1 -1
  8. package/dist/fields/ImageField/CropperDialog/index.d.ts +1 -0
  9. package/dist/fields/ImageField/ImageField.d.ts +12 -0
  10. package/dist/fields/ImageField/MediaPicker/MediaLibrary/MediaLibrary.d.ts +17 -0
  11. package/dist/fields/ImageField/MediaPicker/MediaLibrary/index.d.ts +1 -0
  12. package/dist/fields/ImageField/MediaPicker/MediaLibrary/mediaLibraryData.d.ts +124 -0
  13. package/dist/fields/ImageField/MediaPicker/MediaPicker.d.ts +2 -2
  14. package/dist/fields/ImageField/MediaPicker/{UnsplashLibrary.d.ts → UnsplashLibrary/UnsplashLibrary.d.ts} +1 -1
  15. package/dist/fields/ImageField/MediaPicker/UnsplashLibrary/index.d.ts +1 -0
  16. package/dist/fields/ImageField/MediaPicker/mediaPickerData.d.ts +26 -0
  17. package/dist/fields/ImageField/index.d.ts +1 -12
  18. package/dist/fields/KeyTextField.d.ts +3 -4
  19. package/dist/fields/LinkField/LinkField.d.ts +11 -0
  20. package/dist/fields/LinkField/LinkFieldActions.d.ts +5 -2
  21. package/dist/fields/LinkField/index.d.ts +2 -12
  22. package/dist/fields/LinkField/useLinkField.d.ts +17 -0
  23. package/dist/fields/RichTextField/RichTextField.d.ts +2 -2
  24. package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +4 -4
  25. package/dist/fields/RichTextField/coreExtensions/Placeholder.d.ts +7 -2
  26. package/dist/fields/RichTextField/globalExtensions/TextDirection.d.ts +3 -3
  27. package/dist/fields/externalLinks.d.ts +2 -0
  28. package/dist/index.es.js +20443 -19690
  29. package/dist/index.umd.js +39 -43
  30. package/dist/slices/SharedSliceEditor.d.ts +3 -4
  31. package/dist/zones/SliceZoneEditor.d.ts +3 -4
  32. package/dist/zones/StaticZoneEditor.d.ts +3 -4
  33. package/package.json +24 -21
  34. package/dist/fields/ImageField/MediaPicker/MediaLibrary.d.ts +0 -1
  35. /package/dist/fields/ImageField/MediaPicker/{unsplashData.d.ts → UnsplashLibrary/unsplashData.d.ts} +0 -0
  36. /package/dist/fields/ImageField/{imageField.d.ts → imageFieldUtils.d.ts} +0 -0
@@ -1,8 +1,7 @@
1
1
  import type { SharedSliceContent } from "@prismicio/types-internal/lib/content";
2
2
  import type { SharedSlice } from "@prismicio/types-internal/lib/customtypes";
3
- import { type FC } from "react";
4
3
  import { EditorConfig } from "../EditorConfig";
5
- declare type SharedSliceEditorProps = Readonly<{
4
+ interface Props {
6
5
  config: EditorConfig;
7
6
  content: SharedSliceContent;
8
7
  id?: string;
@@ -11,6 +10,6 @@ declare type SharedSliceEditorProps = Readonly<{
11
10
  onContentChange: (content: SharedSliceContent) => void;
12
11
  readOnly?: boolean;
13
12
  sharedSlice: SharedSlice;
14
- }>;
15
- export declare const SharedSliceEditor: FC<SharedSliceEditorProps>;
13
+ }
14
+ export declare function SharedSliceEditor(props: Props): JSX.Element | null;
16
15
  export {};
@@ -1,13 +1,12 @@
1
1
  import { SlicesContent } from "@prismicio/types-internal/lib/content";
2
2
  import type { StaticSlices } from "@prismicio/types-internal/lib/customtypes";
3
- import type { FC } from "react";
4
- declare type SliceZoneEditorProps = Readonly<{
3
+ interface SliceZoneEditorProps {
5
4
  id: string;
6
5
  readOnly: boolean;
7
6
  selectionId?: string;
8
7
  sliceZone: StaticSlices;
9
8
  content: SlicesContent | undefined;
10
9
  onContentChange: (content: SlicesContent) => void;
11
- }>;
12
- export declare const SliceZoneEditor: FC<SliceZoneEditorProps>;
10
+ }
11
+ export declare function SliceZoneEditor(props: SliceZoneEditorProps): JSX.Element;
13
12
  export {};
@@ -1,11 +1,10 @@
1
- import { type FC } from "react";
2
1
  import type { StaticZone, StaticZoneContent } from "./StaticZone";
3
- declare type StaticZoneEditorProps = Readonly<{
2
+ interface StaticZoneEditorProps {
4
3
  id: string;
5
4
  readOnly: boolean;
6
5
  staticZone: StaticZone;
7
6
  content: StaticZoneContent;
8
7
  onContentChange: (content: StaticZoneContent) => void;
9
- }>;
10
- export declare const StaticZoneEditor: FC<StaticZoneEditorProps>;
8
+ }
9
+ export declare function StaticZoneEditor(props: StaticZoneEditorProps): JSX.Element | null;
11
10
  export {};
package/package.json CHANGED
@@ -3,24 +3,25 @@
3
3
  "@floating-ui/react-dom-interactions": "0.9.3",
4
4
  "@prismicio/editor-support": "0.4.1",
5
5
  "@prismicio/richtext": "2.1.1",
6
- "@prismicio/types-internal": "2.0.0-alpha.8",
7
- "@tiptap/core": "2.0.0-beta.217",
8
- "@tiptap/extension-bold": "2.0.0-beta.217",
9
- "@tiptap/extension-bullet-list": "2.0.0-beta.217",
10
- "@tiptap/extension-code-block": "2.0.0-beta.217",
11
- "@tiptap/extension-document": "2.0.0-beta.217",
12
- "@tiptap/extension-hard-break": "2.0.0-beta.217",
13
- "@tiptap/extension-heading": "2.0.0-beta.217",
14
- "@tiptap/extension-italic": "2.0.0-beta.217",
15
- "@tiptap/extension-link": "2.0.0-beta.217",
16
- "@tiptap/extension-list-item": "2.0.0-beta.217",
17
- "@tiptap/extension-ordered-list": "2.0.0-beta.217",
18
- "@tiptap/extension-paragraph": "2.0.0-beta.217",
19
- "@tiptap/extension-placeholder": "2.0.0-beta.217",
20
- "@tiptap/extension-text": "2.0.0-beta.217",
21
- "@tiptap/pm": "2.0.0-beta.217",
22
- "@tiptap/react": "2.0.0-beta.217",
23
- "@tiptap/suggestion": "2.0.0-beta.217",
6
+ "@prismicio/types-internal": "2.0.0",
7
+ "@tiptap/core": "2.0.3",
8
+ "@tiptap/extension-bold": "2.0.3",
9
+ "@tiptap/extension-bullet-list": "2.0.3",
10
+ "@tiptap/extension-code-block": "2.0.3",
11
+ "@tiptap/extension-document": "2.0.3",
12
+ "@tiptap/extension-hard-break": "2.0.3",
13
+ "@tiptap/extension-heading": "2.0.3",
14
+ "@tiptap/extension-history": "2.0.3",
15
+ "@tiptap/extension-italic": "2.0.3",
16
+ "@tiptap/extension-link": "2.0.3",
17
+ "@tiptap/extension-list-item": "2.0.3",
18
+ "@tiptap/extension-ordered-list": "2.0.3",
19
+ "@tiptap/extension-paragraph": "2.0.3",
20
+ "@tiptap/extension-placeholder": "2.0.3",
21
+ "@tiptap/extension-text": "2.0.3",
22
+ "@tiptap/pm": "2.0.3",
23
+ "@tiptap/react": "2.0.3",
24
+ "@tiptap/suggestion": "2.0.3",
24
25
  "clsx": "1.2.1",
25
26
  "fp-ts": "2.12.3",
26
27
  "io-ts": "2.2.18",
@@ -29,11 +30,13 @@
29
30
  "newtype-ts": "",
30
31
  "prosemirror-model": "1.19.0",
31
32
  "tslib": "2.4.0",
33
+ "uuid": "9.0.0",
32
34
  "zod": "3.21.4"
33
35
  },
34
36
  "devDependencies": {
35
37
  "@types/react": "18.0.18",
36
- "@vitejs/plugin-react-swc": "3.1.0",
38
+ "@types/uuid": "9.0.2",
39
+ "@vitejs/plugin-react": "4.0.3",
37
40
  "eslint": "8.23.0",
38
41
  "eslint-config-prettier": "8.5.0",
39
42
  "eslint-plugin-jsx-a11y": "6.6.1",
@@ -61,7 +64,7 @@
61
64
  "module": "./dist/index.es.js",
62
65
  "name": "@prismicio/editor-fields",
63
66
  "peerDependencies": {
64
- "@prismicio/editor-ui": "0.4.1",
67
+ "@prismicio/editor-ui": "^0.4.4",
65
68
  "react": "18",
66
69
  "react-dom": "18"
67
70
  },
@@ -78,5 +81,5 @@
78
81
  "sideEffects": false,
79
82
  "stableVersion": "0.0.0",
80
83
  "types": "./dist/index.d.ts",
81
- "version": "0.4.1"
84
+ "version": "0.4.4"
82
85
  }
@@ -1 +0,0 @@
1
- export declare const MediaLibrary: () => JSX.Element;