"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormattingPane = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const ContextPane_1 = require("nice-ui/lib/4-card/ContextMenu/ContextPane");
const FormattingPane = ({ onEsc, children, ...rest }) => {
    return (React.createElement("div", { onKeyDown: onEsc
            ? (e) => {
                if (e.key === 'Escape') {
                    e.preventDefault();
                    e.stopPropagation();
                    onEsc();
                }
            }
            : void 0 },
        React.createElement(ContextPane_1.ContextPane, { ...rest, style: { width: 'calc(min(600px, max(65vw, 260px)))', ...rest.style } }, children)));
};
exports.FormattingPane = FormattingPane;
//# sourceMappingURL=FormattingPane.js.map