@uva-glass/component-library
Version:
React components UvA
78 lines (77 loc) • 2.79 kB
JavaScript
import { jsxs as f, jsx as e } from "react/jsx-runtime";
import { c as i } from "../../../../clsx-OuTLNxxd.js";
import { o as h } from "../../../../LexicalComposerContext.prod-DLlRM5wP.js";
import { ap as _, aq as y, ar as C, as as k } from "../../../../Lexical.prod-CniF7zEE.js";
import { useState as s, useEffect as m } from "react";
import { Icon as n } from "../../../Icon/Icon.js";
import "../../../Buttons/Button.js";
import "../../../Buttons/LinkButton.js";
import "@react-aria/button";
import "../../../Checkbox/Checkbox.js";
import "@react-aria/dialog";
import "@react-aria/focus";
import "@react-aria/overlays";
import "../../../OverlayCloseButton/OverlayCloseButton.js";
import "../../../GridRow/GridRow.js";
import "../../../IconButton/IconButton.js";
import "../../../Input/Input.js";
import "../../../InputField/InputField.js";
import "react-router";
import "../../../../TablePlugin-MjKuocl4.js";
import { s as r } from "../../../../RteEditor.module-oFMKEW6f.js";
import { useTranslation as x } from "../../hooks/useTranslation.js";
import "../LinkPlugin/LinkContextMenu/LinkContextMenu.js";
import "../../hooks/components/Flyout.js";
import "../../Providers/LanguageProvider.js";
import "../../../../index-B3c5pcHk.js";
import "../../../SelectListbox/SelectListbox.js";
import "../../../SelectListbox/SelectProvider.js";
import "../../../Sortable/components/SortableItem.js";
import "../../../../SortableProvider-Ck_XnBVq.js";
const Z = () => {
const o = x(), [t] = h(), [d, p] = s(!1), [l, u] = s(!1), c = () => {
t.dispatchCommand(C, void 0);
}, b = () => {
t.dispatchCommand(k, void 0);
};
return m(() => t.registerCommand(
_,
(a) => (p(a), !1),
1
), [t]), m(() => t.registerCommand(
y,
(a) => (u(a), !1),
1
), [t]), /* @__PURE__ */ f("div", { className: r["editor__toolbar-button-group"], children: [
/* @__PURE__ */ e(
"button",
{
onClick: c,
className: i(r["editor__toolbar-button"], r["editor__toolbar-button--undo"]),
"aria-label": o.aria.labels.undo,
"aria-keyshortcuts": o.aria.keyshortcuts.undo,
disabled: !d,
title: o.format.undoTooltip,
type: "button",
children: /* @__PURE__ */ e(n, { name: "StepBack", size: 24 })
}
),
/* @__PURE__ */ e(
"button",
{
onClick: b,
className: i(r["editor__toolbar-button"], r["editor__toolbar-button--redo"]),
"aria-label": o.aria.labels.redo,
"aria-keyshortcuts": o.aria.keyshortcuts.redo,
disabled: !l,
title: o.format.redoTooltip,
type: "button",
children: /* @__PURE__ */ e(n, { name: "StepForwards", size: 24 })
}
)
] });
};
export {
Z as HistoryPlugin
};
//# sourceMappingURL=HistoryPlugin.js.map