@prismicio/editor-fields 0.4.2 → 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.
- package/dist/EditorConfig.d.ts +1 -0
- package/dist/NestableWidgetSwitch.d.ts +3 -4
- package/dist/SectionEditor.d.ts +3 -4
- package/dist/fields/EmbedField/EmbedField.d.ts +3 -3
- package/dist/fields/GeoPointField.d.ts +11 -0
- package/dist/fields/ImageField/{CroppedDialog/index.d.ts → CropperDialog/CropperDialog.d.ts} +1 -1
- package/dist/fields/ImageField/{CroppedDialog → CropperDialog}/croppedImage.d.ts +1 -1
- package/dist/fields/ImageField/CropperDialog/index.d.ts +1 -0
- package/dist/fields/ImageField/ImageField.d.ts +12 -0
- package/dist/fields/ImageField/MediaPicker/MediaLibrary/MediaLibrary.d.ts +13 -2
- package/dist/fields/ImageField/MediaPicker/MediaLibrary/mediaLibraryData.d.ts +62 -38
- package/dist/fields/ImageField/MediaPicker/MediaPicker.d.ts +2 -2
- package/dist/fields/ImageField/MediaPicker/mediaPickerData.d.ts +26 -0
- package/dist/fields/ImageField/index.d.ts +1 -12
- package/dist/fields/KeyTextField.d.ts +3 -4
- package/dist/fields/LinkField/LinkField.d.ts +11 -0
- package/dist/fields/LinkField/LinkFieldActions.d.ts +5 -2
- package/dist/fields/LinkField/index.d.ts +2 -12
- package/dist/fields/LinkField/useLinkField.d.ts +17 -0
- package/dist/fields/RichTextField/RichTextField.d.ts +2 -2
- package/dist/fields/RichTextField/coreExtensions/ListItem.d.ts +4 -4
- package/dist/fields/RichTextField/coreExtensions/Placeholder.d.ts +7 -2
- package/dist/fields/RichTextField/globalExtensions/TextDirection.d.ts +3 -3
- package/dist/fields/externalLinks.d.ts +2 -0
- package/dist/index.es.js +19754 -19081
- package/dist/index.umd.js +39 -43
- package/dist/slices/SharedSliceEditor.d.ts +3 -4
- package/dist/zones/SliceZoneEditor.d.ts +3 -4
- package/dist/zones/StaticZoneEditor.d.ts +3 -4
- package/package.json +24 -21
- package/dist/fields/ImageField/MediaPicker/MediaLibrary.d.ts +0 -1
- package/dist/fields/ImageField/MediaPicker/UnsplashLibrary.d.ts +0 -6
- package/dist/fields/ImageField/MediaPicker/unsplashData.d.ts +0 -115
- /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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
7
|
-
"@tiptap/core": "2.0.
|
|
8
|
-
"@tiptap/extension-bold": "2.0.
|
|
9
|
-
"@tiptap/extension-bullet-list": "2.0.
|
|
10
|
-
"@tiptap/extension-code-block": "2.0.
|
|
11
|
-
"@tiptap/extension-document": "2.0.
|
|
12
|
-
"@tiptap/extension-hard-break": "2.0.
|
|
13
|
-
"@tiptap/extension-heading": "2.0.
|
|
14
|
-
"@tiptap/extension-
|
|
15
|
-
"@tiptap/extension-
|
|
16
|
-
"@tiptap/extension-
|
|
17
|
-
"@tiptap/extension-
|
|
18
|
-
"@tiptap/extension-
|
|
19
|
-
"@tiptap/extension-
|
|
20
|
-
"@tiptap/extension-
|
|
21
|
-
"@tiptap/
|
|
22
|
-
"@tiptap/
|
|
23
|
-
"@tiptap/
|
|
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
|
-
"@
|
|
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.
|
|
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.
|
|
84
|
+
"version": "0.4.4"
|
|
82
85
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const MediaLibrary: () => JSX.Element;
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { TypeOf } from "zod";
|
|
2
|
-
declare const unsplashImage: import("zod").ZodObject<{
|
|
3
|
-
id: import("zod").ZodString;
|
|
4
|
-
width: import("zod").ZodNumber;
|
|
5
|
-
height: import("zod").ZodNumber;
|
|
6
|
-
urls: import("zod").ZodObject<{
|
|
7
|
-
full: import("zod").ZodString;
|
|
8
|
-
small: import("zod").ZodEffects<import("zod").ZodString, string, string>;
|
|
9
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
10
|
-
small: string;
|
|
11
|
-
full: string;
|
|
12
|
-
}, {
|
|
13
|
-
small: string;
|
|
14
|
-
full: string;
|
|
15
|
-
}>;
|
|
16
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
17
|
-
id: string;
|
|
18
|
-
width: number;
|
|
19
|
-
height: number;
|
|
20
|
-
urls: {
|
|
21
|
-
small: string;
|
|
22
|
-
full: string;
|
|
23
|
-
};
|
|
24
|
-
}, {
|
|
25
|
-
id: string;
|
|
26
|
-
width: number;
|
|
27
|
-
height: number;
|
|
28
|
-
urls: {
|
|
29
|
-
small: string;
|
|
30
|
-
full: string;
|
|
31
|
-
};
|
|
32
|
-
}>;
|
|
33
|
-
export declare const unsplashSearchApiType: import("zod").ZodEffects<import("zod").ZodObject<{
|
|
34
|
-
results: import("zod").ZodArray<import("zod").ZodObject<{
|
|
35
|
-
id: import("zod").ZodString;
|
|
36
|
-
width: import("zod").ZodNumber;
|
|
37
|
-
height: import("zod").ZodNumber;
|
|
38
|
-
urls: import("zod").ZodObject<{
|
|
39
|
-
full: import("zod").ZodString;
|
|
40
|
-
small: import("zod").ZodEffects<import("zod").ZodString, string, string>;
|
|
41
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
42
|
-
small: string;
|
|
43
|
-
full: string;
|
|
44
|
-
}, {
|
|
45
|
-
small: string;
|
|
46
|
-
full: string;
|
|
47
|
-
}>;
|
|
48
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
49
|
-
id: string;
|
|
50
|
-
width: number;
|
|
51
|
-
height: number;
|
|
52
|
-
urls: {
|
|
53
|
-
small: string;
|
|
54
|
-
full: string;
|
|
55
|
-
};
|
|
56
|
-
}, {
|
|
57
|
-
id: string;
|
|
58
|
-
width: number;
|
|
59
|
-
height: number;
|
|
60
|
-
urls: {
|
|
61
|
-
small: string;
|
|
62
|
-
full: string;
|
|
63
|
-
};
|
|
64
|
-
}>, "many">;
|
|
65
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
66
|
-
results: {
|
|
67
|
-
id: string;
|
|
68
|
-
width: number;
|
|
69
|
-
height: number;
|
|
70
|
-
urls: {
|
|
71
|
-
small: string;
|
|
72
|
-
full: string;
|
|
73
|
-
};
|
|
74
|
-
}[];
|
|
75
|
-
}, {
|
|
76
|
-
results: {
|
|
77
|
-
id: string;
|
|
78
|
-
width: number;
|
|
79
|
-
height: number;
|
|
80
|
-
urls: {
|
|
81
|
-
small: string;
|
|
82
|
-
full: string;
|
|
83
|
-
};
|
|
84
|
-
}[];
|
|
85
|
-
}>, {
|
|
86
|
-
id: string;
|
|
87
|
-
width: number;
|
|
88
|
-
height: number;
|
|
89
|
-
urls: {
|
|
90
|
-
small: string;
|
|
91
|
-
full: string;
|
|
92
|
-
};
|
|
93
|
-
}[], {
|
|
94
|
-
results: {
|
|
95
|
-
id: string;
|
|
96
|
-
width: number;
|
|
97
|
-
height: number;
|
|
98
|
-
urls: {
|
|
99
|
-
small: string;
|
|
100
|
-
full: string;
|
|
101
|
-
};
|
|
102
|
-
}[];
|
|
103
|
-
}>;
|
|
104
|
-
export declare type UnplashSearchApi = TypeOf<typeof unsplashSearchApiType>;
|
|
105
|
-
export declare type UnsplashImage = TypeOf<typeof unsplashImage>;
|
|
106
|
-
export declare function useUnsplashSearch(baseUrl: string, term: string): {
|
|
107
|
-
id: string;
|
|
108
|
-
width: number;
|
|
109
|
-
height: number;
|
|
110
|
-
urls: {
|
|
111
|
-
small: string;
|
|
112
|
-
full: string;
|
|
113
|
-
};
|
|
114
|
-
}[];
|
|
115
|
-
export {};
|
|
File without changes
|