Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@dotcms/react

Package Overview
Dependencies
Maintainers
1
Versions
230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dotcms/react - npm Package Compare versions

Comparing version
1.1.1-next.4
to
1.1.1-next.5
+1
-1
package.json
{
"name": "@dotcms/react",
"version": "1.1.1-next.4",
"version": "1.1.1-next.5",
"peerDependencies": {

@@ -5,0 +5,0 @@ "react": ">=18",

@@ -6,3 +6,3 @@ export { DotCMSLayoutBody } from './lib/next/components/DotCMSLayoutBody/DotCMSLayoutBody';

export { DotCMSEditableText } from './lib/next/components/DotCMSEditableText/DotCMSEditableText';
export { DotCMSBlockEditorRenderer, BlockEditorRendererProps } from './lib/next/components/DotCMSBlockEditorRenderer/DotCMSBlockEditorRenderer';
export { DotCMSBlockEditorRenderer, BlockEditorRendererProps, CustomRenderer, CustomRendererProps } from './lib/next/components/DotCMSBlockEditorRenderer/DotCMSBlockEditorRenderer';
export { DotCMSLayoutBodyProps } from './lib/next/components/DotCMSLayoutBody/DotCMSLayoutBody';
import { BlockEditorNode } from '@dotcms/types';
import { CustomRenderer } from '../../DotCMSBlockEditorRenderer';
interface DotContentProps {
customRenderers: CustomRenderer;
customRenderers?: CustomRenderer;
node: BlockEditorNode;

@@ -6,0 +6,0 @@ }

@@ -1,11 +0,38 @@

import { BlockEditorContent } from '@dotcms/types';
import { BlockEditorNode } from '@dotcms/types';
/**
* Represents a Custom Renderer used by the Block Editor Component
* Props that all custom renderers must accept.
*
* @export
* @interface CustomRendererProps
* @template TData - The type of data stored in node.attrs.data (for contentlet blocks)
*/
export interface CustomRendererProps<TData = any> {
/** The full BlockEditorNode with attrs, marks, content, etc. */
node: BlockEditorNode & {
attrs?: {
data?: TData;
[key: string]: any;
};
};
/** Rendered children from nested content (if any) */
children?: React.ReactNode;
}
/**
* Custom renderer component type - must accept node and optional children.
* Can be specialized with a specific data type for node.attrs.data.
*
* @export
* @template TData - The type of contentlet data in node.attrs.data
*/
export type CustomRendererComponent<TData = any> = React.FC<CustomRendererProps<TData>>;
/**
* Map of block type names to custom renderer components.
* Use the generic parameter to type specific contentlet data.
*
* @export
* @interface CustomRenderer
*/
export type CustomRenderer<T = any> = Record<string, React.FC<T>>;
export type CustomRenderer = Record<string, CustomRendererComponent<any>>;
export interface BlockEditorRendererProps {
blocks: BlockEditorContent;
blocks: BlockEditorNode;
style?: React.CSSProperties;

@@ -20,3 +47,3 @@ className?: string;

* @param {Object} props - The component props.
* @param {BlockEditorContent} props.blocks - The blocks of content to render.
* @param {BlockEditorNode} props.blocks - The blocks of content to render.
* @param {CustomRenderer} [props.customRenderers] - Optional custom renderers for specific block types.

@@ -23,0 +50,0 @@ * @param {string} [props.className] - Optional CSS class name for the container div.

Sorry, the diff of this file is too big to display