@prismicio/editor-fields 0.4.26 → 0.4.27
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 +7 -3
- package/dist/SlicePrimaryWidgetSwitch.d.ts +12 -0
- package/dist/core/imageUtils.d.ts +1 -1
- package/dist/core/service/document.d.ts +38 -0
- package/dist/index.cjs.js +30 -30
- package/dist/index.es.js +15457 -15276
- package/dist/zones/RepeatableZoneEditor.d.ts +8 -3
- package/dist/zones/SlicePrimaryZoneEditor.d.ts +13 -0
- package/package.json +4 -4
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type GroupItemContent } from "@prismicio/types-internal/lib/content";
|
|
3
3
|
import type { NestableWidget } from "@prismicio/types-internal/lib/customtypes";
|
|
4
|
-
|
|
4
|
+
type RepeatableZoneEditorProps = {
|
|
5
5
|
id: string;
|
|
6
6
|
readOnly: boolean;
|
|
7
|
-
title?: string;
|
|
8
7
|
/**
|
|
9
8
|
* If set, the Zone is limited to no more than 0 or 1 item.
|
|
10
9
|
* Defaults to true.
|
|
@@ -13,6 +12,12 @@ interface RepeatableZoneEditorProps {
|
|
|
13
12
|
repeatableZone: Readonly<Record<string, NestableWidget>>;
|
|
14
13
|
content: GroupItemContent[] | undefined;
|
|
15
14
|
onContentChange: (content: GroupItemContent[]) => void;
|
|
16
|
-
}
|
|
15
|
+
} & ({
|
|
16
|
+
title: string;
|
|
17
|
+
addItemButtonTitle: string;
|
|
18
|
+
} | {
|
|
19
|
+
title?: undefined;
|
|
20
|
+
addItemButtonTitle?: undefined;
|
|
21
|
+
});
|
|
17
22
|
export declare function RepeatableZoneEditor(props: RepeatableZoneEditorProps): JSX.Element | null;
|
|
18
23
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type SlicePrimaryContent } from "@prismicio/types-internal/lib/content";
|
|
3
|
+
import type { SlicePrimaryWidget } from "@prismicio/types-internal/lib/customtypes";
|
|
4
|
+
type SlicePrimaryZoneContent = Readonly<Record<string, SlicePrimaryContent>>;
|
|
5
|
+
interface SlicePrimaryZoneEditorProps {
|
|
6
|
+
id: string;
|
|
7
|
+
readOnly: boolean;
|
|
8
|
+
slicePrimaryZone: Readonly<Record<string, SlicePrimaryWidget>>;
|
|
9
|
+
content: SlicePrimaryZoneContent;
|
|
10
|
+
onContentChange: (content: SlicePrimaryZoneContent) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function SlicePrimaryZoneEditor(props: SlicePrimaryZoneEditorProps): JSX.Element;
|
|
13
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
3
|
"@floating-ui/react-dom-interactions": "0.9.3",
|
|
4
|
-
"@prismicio/editor-support": "0.4.
|
|
4
|
+
"@prismicio/editor-support": "0.4.27",
|
|
5
5
|
"@prismicio/richtext": "2.1.1",
|
|
6
|
-
"@prismicio/types-internal": "2.
|
|
6
|
+
"@prismicio/types-internal": "2.4.1",
|
|
7
7
|
"@tiptap/core": "2.3.0",
|
|
8
8
|
"@tiptap/extension-bold": "2.3.0",
|
|
9
9
|
"@tiptap/extension-bullet-list": "2.3.0",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"module": "./dist/index.es.js",
|
|
64
64
|
"name": "@prismicio/editor-fields",
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"@prismicio/editor-ui": "^0.4.
|
|
66
|
+
"@prismicio/editor-ui": "^0.4.27",
|
|
67
67
|
"react": "18",
|
|
68
68
|
"react-dom": "18"
|
|
69
69
|
},
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"sideEffects": false,
|
|
81
81
|
"stableVersion": "0.0.0",
|
|
82
82
|
"types": "./dist/index.d.ts",
|
|
83
|
-
"version": "0.4.
|
|
83
|
+
"version": "0.4.27"
|
|
84
84
|
}
|