@logora/debate 0.4.52 → 0.4.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@ import t from "./ToolbarPlugin.module.scss.js";
12
12
  import { Icon as f } from "../../../icons/icon/Icon.js";
13
13
  import { Button as ce } from "../../../action/button/Button.js";
14
14
  const Ce = (a) => {
15
- const d = se(), j = 1, [r] = te(), H = x(null), [T, S] = N("paragraph"), [de, Q] = N(null), [V, L] = N(!1), [z, A] = N(!1), [G, v] = N(!1), D = a.hideSubmit && a.hideSourceAction && a.disableRichText, _ = re(() => {
15
+ const d = se(), j = 1, [r] = te(), H = x(null), [T, S] = N("paragraph"), [de, Q] = N(null), [V, L] = N(!1), [z, A] = N(!1), [G, D] = N(!1), v = a.hideSubmit && a.hideSourceAction && a.disableRichText, _ = re(() => {
16
16
  const e = M();
17
17
  if (I(e)) {
18
18
  const n = e.anchor.getNode(), s = n.getKey() === "root" ? n : n.getTopLevelElementOrThrow(), u = s.getKey();
@@ -24,7 +24,7 @@ const Ce = (a) => {
24
24
  const o = oe(s) ? s.getTag() : s.getType();
25
25
  S(o);
26
26
  }
27
- L(e.hasFormat("bold")), A(e.hasFormat("italic")), v(e.hasFormat("underline"));
27
+ L(e.hasFormat("bold")), A(e.hasFormat("italic")), D(e.hasFormat("underline"));
28
28
  }
29
29
  }, [r]);
30
30
  U(() => ie(
@@ -44,9 +44,9 @@ const Ce = (a) => {
44
44
  c.current && clearTimeout(c.current);
45
45
  }, []);
46
46
  const g = (e, n) => {
47
- (e.pointerType === "touch" || e.pointerType === "pen") && (e.preventDefault(), y.current = !0, n(), c.current && clearTimeout(c.current), c.current = setTimeout(() => {
47
+ e.pointerType === "touch" || e.pointerType === "pen" ? (e.preventDefault(), y.current = !0, n(), c.current && clearTimeout(c.current), c.current = setTimeout(() => {
48
48
  y.current = !1, c.current = null;
49
- }, 500));
49
+ }, 500)) : e.preventDefault();
50
50
  }, h = (e) => {
51
51
  if (y.current) {
52
52
  y.current = !1, c.current && (clearTimeout(c.current), c.current = null);
@@ -60,7 +60,7 @@ const Ce = (a) => {
60
60
  });
61
61
  }, 0);
62
62
  }, b = (e) => {
63
- r.dispatchCommand(ae, e), e === "bold" ? L((n) => !n) : e === "italic" ? A((n) => !n) : e === "underline" && v((n) => !n), C();
63
+ r.dispatchCommand(ae, e), e === "bold" ? L((n) => !n) : e === "italic" ? A((n) => !n) : e === "underline" && D((n) => !n), C();
64
64
  }, X = () => {
65
65
  r.update(() => {
66
66
  const e = M();
@@ -107,11 +107,11 @@ const Ce = (a) => {
107
107
  I(e) && K(e, () => F());
108
108
  }), C();
109
109
  };
110
- return D ? null : /* @__PURE__ */ R(
110
+ return v ? null : /* @__PURE__ */ R(
111
111
  "div",
112
112
  {
113
113
  className: l(t.toolbar, {
114
- [t.toolbarIsActive]: D ? !1 : a.isActive
114
+ [t.toolbarIsActive]: v ? !1 : a.isActive
115
115
  }),
116
116
  ref: H,
117
117
  children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logora/debate",
3
- "version": "0.4.52",
3
+ "version": "0.4.53",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0",
6
6
  "description": "Design system of @Logora made with React",