@dotcms/react 1.7.1-next.2379 → 26.7.27-1
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/lib/next/components/DotCMSBlockEditorRenderer/components/BlockEditorBlock.esm.js +5 -0
- package/lib/next/components/DotCMSBlockEditorRenderer/components/blocks/Audio.esm.js +29 -0
- package/package.json +3 -3
- package/src/lib/next/components/DotCMSBlockEditorRenderer/components/blocks/Audio.d.ts +11 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { BlockEditorDefaultBlocks } from '@dotcms/types/internal';
|
|
3
3
|
import { getUVEState } from '@dotcms/uve';
|
|
4
|
+
import { DotCMSAudio } from './blocks/Audio.esm.js';
|
|
4
5
|
import { CodeBlock, BlockQuote } from './blocks/Code.esm.js';
|
|
5
6
|
import { DotContent } from './blocks/DotContent.esm.js';
|
|
6
7
|
import { GridBlock } from './blocks/GridBlock.esm.js';
|
|
@@ -113,6 +114,10 @@ const BlockEditorBlock = ({
|
|
|
113
114
|
return jsx(DotCMSVideo, {
|
|
114
115
|
node: node
|
|
115
116
|
}, key);
|
|
117
|
+
case BlockEditorDefaultBlocks.DOT_AUDIO:
|
|
118
|
+
return jsx(DotCMSAudio, {
|
|
119
|
+
node: node
|
|
120
|
+
}, key);
|
|
116
121
|
case BlockEditorDefaultBlocks.TABLE:
|
|
117
122
|
return jsx(TableRenderer, {
|
|
118
123
|
content: (_node$content = node.content) != null ? _node$content : [],
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Renders an audio component for displaying audio files. Mirrors {@link DotCMSVideo}
|
|
5
|
+
* but without poster/width/height, which are not meaningful for audio.
|
|
6
|
+
*
|
|
7
|
+
* @param props - The properties for the audio component.
|
|
8
|
+
* @returns The rendered audio component.
|
|
9
|
+
*/
|
|
10
|
+
const DotCMSAudio = ({
|
|
11
|
+
node
|
|
12
|
+
}) => {
|
|
13
|
+
const {
|
|
14
|
+
src,
|
|
15
|
+
mimeType
|
|
16
|
+
} = node.attrs;
|
|
17
|
+
return jsxs("audio", {
|
|
18
|
+
controls: true,
|
|
19
|
+
preload: "metadata",
|
|
20
|
+
children: [jsx("source", {
|
|
21
|
+
src: src,
|
|
22
|
+
type: mimeType
|
|
23
|
+
}), "Your browser does not support the ", jsx("code", {
|
|
24
|
+
children: "audio"
|
|
25
|
+
}), " element."]
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { DotCMSAudio };
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotcms/react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "26.07.27-01",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": ">=18",
|
|
6
6
|
"react-dom": ">=18"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@dotcms/uve": "
|
|
10
|
-
"@dotcms/client": "
|
|
9
|
+
"@dotcms/uve": "26.07.27-01",
|
|
10
|
+
"@dotcms/client": "26.07.27-01",
|
|
11
11
|
"@tinymce/tinymce-react": "6.2.1"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BlockEditorNode } from '@dotcms/types';
|
|
2
|
+
/**
|
|
3
|
+
* Renders an audio component for displaying audio files. Mirrors {@link DotCMSVideo}
|
|
4
|
+
* but without poster/width/height, which are not meaningful for audio.
|
|
5
|
+
*
|
|
6
|
+
* @param props - The properties for the audio component.
|
|
7
|
+
* @returns The rendered audio component.
|
|
8
|
+
*/
|
|
9
|
+
export declare const DotCMSAudio: ({ node }: {
|
|
10
|
+
node: BlockEditorNode;
|
|
11
|
+
}) => import("react/jsx-runtime").JSX.Element;
|