@blocklet/editor 2.3.20 → 2.3.21

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.
@@ -7,6 +7,7 @@ import { $createTranslationNode } from './TranslationNode';
7
7
  import { $isExcalidrawNode } from '../../main/nodes/ExcalidrawNode';
8
8
  import { $isImageNode } from '../../main/nodes/ImageNode';
9
9
  import { $isPdfNode } from '../PdfPlugin/PdfNode';
10
+ import { $isVideoNode } from '../VideoPlugin/VideoNode';
10
11
  export class EditorTranslator {
11
12
  editor;
12
13
  options;
@@ -143,7 +144,7 @@ export class EditorTranslator {
143
144
  }
144
145
  async preprocessNodes() {
145
146
  const isSpecialNode = (node) => {
146
- return $isExcalidrawNode(node) || $isImageNode(node) || $isPdfNode(node);
147
+ return $isExcalidrawNode(node) || $isImageNode(node) || $isPdfNode(node) || $isVideoNode(node);
147
148
  };
148
149
  this.editor.update(() => {
149
150
  $findTranslatableElementNodes().forEach((node) => {
@@ -62,7 +62,7 @@ function LazyImage({ altText, className, imageRef, src, width, height, }) {
62
62
  ...(src?.endsWith('.svg') && { minWidth: 200 }),
63
63
  },
64
64
  };
65
- return (_jsx("img", { className: className || undefined, src: src, alt: altText, ref: imageRef, draggable: "false", ...imgProps }));
65
+ return (_jsx("img", { className: className || undefined, src: src, alt: altText, ref: imageRef, draggable: "false", crossOrigin: "anonymous", ...imgProps }));
66
66
  }
67
67
  export default function ImageComponent({ file, src, altText, nodeKey, width, height, maxWidth, resizable, showCaption, caption, captionsEnabled, markerState, frame, sizeMode, }) {
68
68
  const imageFrameRef = useRef(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/editor",
3
- "version": "2.3.20",
3
+ "version": "2.3.21",
4
4
  "main": "lib/index.js",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -68,7 +68,7 @@
68
68
  "ufo": "^1.5.4",
69
69
  "url-join": "^4.0.1",
70
70
  "zustand": "^4.5.5",
71
- "@blocklet/pdf": "^2.3.20"
71
+ "@blocklet/pdf": "^2.3.21"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@babel/core": "^7.25.2",