UNPKG

@frontify/fondue

Version:
45 lines (44 loc) 1.38 kB
var u = Object.defineProperty; var l = (e, n, t) => n in e ? u(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t; var o = (e, n, t) => l(e, typeof n != "symbol" ? n + "" : n, t); import { createPluginFactory as m } from "@udecode/plate-core"; import { Plugin as a } from "../Plugin.es.js"; import { ColumnBreakButton as s } from "./ColumnBreakButton/index.es.js"; import { onKeyDownColumnBreak as r } from "./onKeyDownColumnBreak.es.js"; import { useColumnBreakHandler as i } from "./useColumnBreakHandler.es.js"; const c = "breakAfterColumn", g = "normal"; class y extends a { constructor(t) { super("break-after-plugin", { button: s, ...t }); o(this, "columns"); o(this, "gap"); o(this, "customClass"); this.columns = (t == null ? void 0 : t.columns) ?? 1, this.gap = (t == null ? void 0 : t.gap) ?? g, this.customClass = t == null ? void 0 : t.customClass; } plugins() { return [k(this.columns, this.gap, this.customClass)]; } } const k = (e, n, t) => m({ key: c, handlers: { onKeyDown: r }, useHooks: i, options: { columns: e, gap: n, customClass: t, hotkey: ["shift+ctrl+enter"] } })(); export { y as BreakAfterPlugin, g as GAP_DEFAULT, c as KEY_ELEMENT_BREAK_AFTER_COLUMN, k as createColumnBreakPlugin }; //# sourceMappingURL=createColumnBreakPlugin.es.js.map