@rulab/adminjs-components 0.2.2 → 0.2.3

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.
@@ -44,6 +44,11 @@ export const Editor = ({ property, record, resource, onChange, onChangeAdmin, ed
44
44
  const init = async () => {
45
45
  const { default: EditorJS } = await import("@editorjs/editorjs");
46
46
  const tools = { ...EDITOR_TOOLS };
47
+ if (typeof window !== "undefined") {
48
+ // @ts-ignore
49
+ const videoModule = await import("simple-video-editorjs");
50
+ tools.video = videoModule.default ?? videoModule;
51
+ }
47
52
  if (uploadAction && resourceId) {
48
53
  const { default: ImageTool } = await import("@editorjs/image");
49
54
  const api = new ApiClient();
@@ -26,5 +26,4 @@ export declare const EDITOR_TOOLS: {
26
26
  inlineToolbar: boolean;
27
27
  };
28
28
  audioPlayer: any;
29
- video: any;
30
29
  };
@@ -5,8 +5,6 @@ import Quote from "@editorjs/quote";
5
5
  import Table from "@editorjs/table";
6
6
  // @ts-ignore
7
7
  import AudioPlayer from "editorjs-audio-player";
8
- // @ts-ignore
9
- import SimpleVideo from "simple-video-editorjs";
10
8
  export const EDITOR_TOOLS = {
11
9
  paragraph: {
12
10
  class: Paragraph,
@@ -33,5 +31,4 @@ export const EDITOR_TOOLS = {
33
31
  inlineToolbar: true,
34
32
  },
35
33
  audioPlayer: AudioPlayer,
36
- video: SimpleVideo,
37
34
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rulab/adminjs-components",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Prebuilt AdminJS features for common UI needs.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",