eddev 0.1.40-beta-2 → 0.1.41
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.
|
@@ -16,8 +16,7 @@ declare type BlocksContext = {
|
|
|
16
16
|
current: ContentBlock;
|
|
17
17
|
};
|
|
18
18
|
export declare const BlocksContext: import("react").Context<BlocksContext | undefined>;
|
|
19
|
-
declare type
|
|
20
|
-
blocks: ContentBlock[];
|
|
19
|
+
export declare type ContentBlocksSettings = {
|
|
21
20
|
wrapBlock?: (child: ReactElement, ctx: BlocksContext) => ReactElement;
|
|
22
21
|
spacer?: (ctx: {
|
|
23
22
|
ancestors: ContentBlock[];
|
|
@@ -26,6 +25,9 @@ declare type Props = {
|
|
|
26
25
|
next: ContentBlock | null;
|
|
27
26
|
}) => ReactElement | null;
|
|
28
27
|
};
|
|
28
|
+
declare type Props = {
|
|
29
|
+
blocks: ContentBlock[];
|
|
30
|
+
} & ContentBlocksSettings;
|
|
29
31
|
export declare type GenericBlockProps = {
|
|
30
32
|
innerHTML?: string;
|
|
31
33
|
innerContent?: string[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ElementType } from "react";
|
|
2
|
+
import { ContentBlocksSettings } from ".";
|
|
2
3
|
declare type PropTypes<T extends ElementType> = {
|
|
3
4
|
/** The 'key' of this editable text value */
|
|
4
5
|
id: string;
|
|
@@ -18,6 +19,6 @@ declare type InnerBlocksProps = {
|
|
|
18
19
|
templateLock?: any;
|
|
19
20
|
template?: any;
|
|
20
21
|
renderAppender?: any;
|
|
21
|
-
};
|
|
22
|
+
} & ContentBlocksSettings;
|
|
22
23
|
export declare function InnerBlocks(props: InnerBlocksProps): JSX.Element;
|
|
23
24
|
export {};
|
package/blocks/inlineEditing.js
CHANGED
|
@@ -74,7 +74,7 @@ function InnerBlocks(props) {
|
|
|
74
74
|
}
|
|
75
75
|
else {
|
|
76
76
|
var blocks = (0, blockAttributes_1.useInnerBlocks)();
|
|
77
|
-
return (0, jsx_runtime_1.jsx)(ContentBlocks_1.ContentBlocks, { blocks: blocks }, void 0);
|
|
77
|
+
return (0, jsx_runtime_1.jsx)(ContentBlocks_1.ContentBlocks, { blocks: blocks, spacer: props.spacer, wrapBlock: props.wrapBlock }, void 0);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
exports.InnerBlocks = InnerBlocks;
|