Let $X$ be a smooth projective surface (in the category of varieties, or schemes), and let $C\subset X$ be a curve (a priori not irreducible, but the irreducible case in itself is already interesting).

There are classical notions that say when it is possible to have a morphism $X\to Y$, where $Y$ is a variety (or a scheme) which contracts $C$ (onto points) and which restricts to an isomorphism on $X\backslash C$. The matrix of intersection numbers of the components of $C$ need in particular to be negatively defined.

1) If we admit $Y$ to be an algebraic space, are the conditions weaker? (I think that the matrix has again to be negatively defined, reading Artin, "Algebraic spaces" Theorem 4.5, but are there other conditions that are weaker?)

2) If we admit $Y$ to be an algebraic stack, is the matrix again negatively defined or are there counterexamples?