import { usePeritext } from '../context';
import { Char } from '../../constants';
export const AnchorView = (props) => {
    const { plugins } = usePeritext();
    // This zero-width non-breaking space prevents word wrapping at position where
    // anchor is inserted.
    let children = Char.ZeroLengthSpace;
    for (const plugin of plugins)
        children = plugin.anchor?.(props, children) ?? children;
    return children;
};
//# sourceMappingURL=AnchorView.js.map