On the nonlocal curvatures of surfaces with or without boundary