@lumir-company/editor 0.4.6 → 0.4.7

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/dist/index.mjs CHANGED
@@ -997,39 +997,48 @@ var VideoBlockCard = ({
997
997
  window.removeEventListener("mouseup", onMouseUp);
998
998
  };
999
999
  }, [resizeParams, localWidth, localHeight, onWidthChange, onHeightChange]);
1000
- const handleLeftDown = useCallback2((e) => {
1001
- e.preventDefault();
1002
- e.stopPropagation();
1003
- setResizeParams({
1004
- handleUsed: "left",
1005
- initialWidth: wrapperRef.current?.clientWidth ?? DEFAULT_VIDEO_WIDTH,
1006
- initialHeight: localHeight ?? DEFAULT_VIDEO_HEIGHT,
1007
- initialClientX: e.clientX,
1008
- initialClientY: e.clientY
1009
- });
1010
- }, [localHeight]);
1011
- const handleRightDown = useCallback2((e) => {
1012
- e.preventDefault();
1013
- e.stopPropagation();
1014
- setResizeParams({
1015
- handleUsed: "right",
1016
- initialWidth: wrapperRef.current?.clientWidth ?? DEFAULT_VIDEO_WIDTH,
1017
- initialHeight: localHeight ?? DEFAULT_VIDEO_HEIGHT,
1018
- initialClientX: e.clientX,
1019
- initialClientY: e.clientY
1020
- });
1021
- }, [localHeight]);
1022
- const handleBottomDown = useCallback2((e) => {
1023
- e.preventDefault();
1024
- e.stopPropagation();
1025
- setResizeParams({
1026
- handleUsed: "bottom",
1027
- initialWidth: wrapperRef.current?.clientWidth ?? DEFAULT_VIDEO_WIDTH,
1028
- initialHeight: localHeight ?? DEFAULT_VIDEO_HEIGHT,
1029
- initialClientX: e.clientX,
1030
- initialClientY: e.clientY
1031
- });
1032
- }, [localHeight]);
1000
+ const handleLeftDown = useCallback2(
1001
+ (e) => {
1002
+ e.preventDefault();
1003
+ e.stopPropagation();
1004
+ setResizeParams({
1005
+ handleUsed: "left",
1006
+ initialWidth: wrapperRef.current?.clientWidth ?? DEFAULT_VIDEO_WIDTH,
1007
+ initialHeight: localHeight ?? DEFAULT_VIDEO_HEIGHT,
1008
+ initialClientX: e.clientX,
1009
+ initialClientY: e.clientY
1010
+ });
1011
+ },
1012
+ [localHeight]
1013
+ );
1014
+ const handleRightDown = useCallback2(
1015
+ (e) => {
1016
+ e.preventDefault();
1017
+ e.stopPropagation();
1018
+ setResizeParams({
1019
+ handleUsed: "right",
1020
+ initialWidth: wrapperRef.current?.clientWidth ?? DEFAULT_VIDEO_WIDTH,
1021
+ initialHeight: localHeight ?? DEFAULT_VIDEO_HEIGHT,
1022
+ initialClientX: e.clientX,
1023
+ initialClientY: e.clientY
1024
+ });
1025
+ },
1026
+ [localHeight]
1027
+ );
1028
+ const handleBottomDown = useCallback2(
1029
+ (e) => {
1030
+ e.preventDefault();
1031
+ e.stopPropagation();
1032
+ setResizeParams({
1033
+ handleUsed: "bottom",
1034
+ initialWidth: wrapperRef.current?.clientWidth ?? DEFAULT_VIDEO_WIDTH,
1035
+ initialHeight: localHeight ?? DEFAULT_VIDEO_HEIGHT,
1036
+ initialClientX: e.clientX,
1037
+ initialClientY: e.clientY
1038
+ });
1039
+ },
1040
+ [localHeight]
1041
+ );
1033
1042
  const resizeCursor = resizeParams ? resizeParams.handleUsed === "bottom" ? "ns-resize" : "ew-resize" : "default";
1034
1043
  const [hovered, setHovered] = useState2(false);
1035
1044
  return /* @__PURE__ */ jsxs2(
@@ -1086,6 +1095,7 @@ var VideoBlockCard = ({
1086
1095
  {
1087
1096
  src: url,
1088
1097
  controls: true,
1098
+ controlsList: "nodownload",
1089
1099
  playsInline: true,
1090
1100
  style: {
1091
1101
  width: "100%",
@@ -1540,9 +1550,9 @@ var HtmlPreviewBlock = createReactBlockSpec3(
1540
1550
  var schema = BlockNoteSchema.create({
1541
1551
  blockSpecs: {
1542
1552
  ...defaultBlockSpecs,
1543
- video: VideoBlock,
1544
1553
  htmlPreview: HtmlPreviewBlock,
1545
- linkPreview: LinkPreviewBlock
1554
+ linkPreview: LinkPreviewBlock,
1555
+ video: VideoBlock
1546
1556
  },
1547
1557
  inlineContentSpecs: defaultInlineContentSpecs,
1548
1558
  styleSpecs: defaultStyleSpecs