@dotcms/uve 1.1.1-next.4 → 1.1.1-next.5
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/package.json +1 -1
- package/public.cjs.js +14 -11
- package/public.esm.js +14 -11
- package/src/lib/editor/internal.d.ts +14 -11
package/package.json
CHANGED
package/public.cjs.js
CHANGED
|
@@ -696,17 +696,20 @@ function setBounds(bounds) {
|
|
|
696
696
|
});
|
|
697
697
|
}
|
|
698
698
|
/**
|
|
699
|
-
* Validates the structure of a Block Editor
|
|
700
|
-
*
|
|
701
|
-
* This function checks
|
|
702
|
-
*
|
|
703
|
-
*
|
|
704
|
-
*
|
|
705
|
-
*
|
|
706
|
-
*
|
|
707
|
-
*
|
|
708
|
-
*
|
|
709
|
-
*
|
|
699
|
+
* Validates the structure of a Block Editor node.
|
|
700
|
+
*
|
|
701
|
+
* This function performs validation checks on a BlockEditorNode object to ensure:
|
|
702
|
+
* - The node exists and is a valid object
|
|
703
|
+
* - The node has a 'doc' type
|
|
704
|
+
* - The node has a valid content array containing at least one block
|
|
705
|
+
* - Each block in the content array:
|
|
706
|
+
* - Has a valid string type property
|
|
707
|
+
* - Has valid object attributes (if present)
|
|
708
|
+
* - Has valid nested content (if present)
|
|
709
|
+
*
|
|
710
|
+
* @param {BlockEditorNode} blocks - The BlockEditorNode structure to validate
|
|
711
|
+
* @returns {BlockEditorState} The validation result
|
|
712
|
+
* @property {string | null} BlockEditorState.error - Error message if validation fails, null if valid
|
|
710
713
|
*/
|
|
711
714
|
const isValidBlocks = blocks => {
|
|
712
715
|
if (!blocks) {
|
package/public.esm.js
CHANGED
|
@@ -694,17 +694,20 @@ function setBounds(bounds) {
|
|
|
694
694
|
});
|
|
695
695
|
}
|
|
696
696
|
/**
|
|
697
|
-
* Validates the structure of a Block Editor
|
|
698
|
-
*
|
|
699
|
-
* This function checks
|
|
700
|
-
*
|
|
701
|
-
*
|
|
702
|
-
*
|
|
703
|
-
*
|
|
704
|
-
*
|
|
705
|
-
*
|
|
706
|
-
*
|
|
707
|
-
*
|
|
697
|
+
* Validates the structure of a Block Editor node.
|
|
698
|
+
*
|
|
699
|
+
* This function performs validation checks on a BlockEditorNode object to ensure:
|
|
700
|
+
* - The node exists and is a valid object
|
|
701
|
+
* - The node has a 'doc' type
|
|
702
|
+
* - The node has a valid content array containing at least one block
|
|
703
|
+
* - Each block in the content array:
|
|
704
|
+
* - Has a valid string type property
|
|
705
|
+
* - Has valid object attributes (if present)
|
|
706
|
+
* - Has valid nested content (if present)
|
|
707
|
+
*
|
|
708
|
+
* @param {BlockEditorNode} blocks - The BlockEditorNode structure to validate
|
|
709
|
+
* @returns {BlockEditorState} The validation result
|
|
710
|
+
* @property {string | null} BlockEditorState.error - Error message if validation fails, null if valid
|
|
708
711
|
*/
|
|
709
712
|
const isValidBlocks = blocks => {
|
|
710
713
|
if (!blocks) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BlockEditorNode } from '@dotcms/types';
|
|
2
2
|
import { BlockEditorState, DotCMSContainerBound } from '@dotcms/types/internal';
|
|
3
3
|
/**
|
|
4
4
|
* Sets the bounds of the containers in the editor.
|
|
@@ -8,16 +8,19 @@ import { BlockEditorState, DotCMSContainerBound } from '@dotcms/types/internal';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function setBounds(bounds: DotCMSContainerBound[]): void;
|
|
10
10
|
/**
|
|
11
|
-
* Validates the structure of a Block Editor
|
|
11
|
+
* Validates the structure of a Block Editor node.
|
|
12
12
|
*
|
|
13
|
-
* This function checks
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
13
|
+
* This function performs validation checks on a BlockEditorNode object to ensure:
|
|
14
|
+
* - The node exists and is a valid object
|
|
15
|
+
* - The node has a 'doc' type
|
|
16
|
+
* - The node has a valid content array containing at least one block
|
|
17
|
+
* - Each block in the content array:
|
|
18
|
+
* - Has a valid string type property
|
|
19
|
+
* - Has valid object attributes (if present)
|
|
20
|
+
* - Has valid nested content (if present)
|
|
17
21
|
*
|
|
18
|
-
* @param {
|
|
19
|
-
* @returns {BlockEditorState}
|
|
20
|
-
* @property {
|
|
21
|
-
* @property {string | null} BlockEditorState.error - Error message if invalid, null if valid
|
|
22
|
+
* @param {BlockEditorNode} blocks - The BlockEditorNode structure to validate
|
|
23
|
+
* @returns {BlockEditorState} The validation result
|
|
24
|
+
* @property {string | null} BlockEditorState.error - Error message if validation fails, null if valid
|
|
22
25
|
*/
|
|
23
|
-
export declare const isValidBlocks: (blocks:
|
|
26
|
+
export declare const isValidBlocks: (blocks: BlockEditorNode) => BlockEditorState;
|