@logora/debate 0.4.52 → 0.4.54
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.
- package/dist/assets/components/input/text_editor/plugins/ToolbarPlugin.module-C48bDmk6.css +1 -0
- package/dist/components/input/text_editor/plugins/ToolbarPlugin.js +7 -7
- package/dist/components/input/text_editor/plugins/ToolbarPlugin.module.scss.js +1 -1
- package/package.json +1 -1
- package/dist/assets/components/input/text_editor/plugins/ToolbarPlugin.module-DPrYyi_2.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._toolbar_1ctze_3{display:flex!important;justify-content:space-between!important;flex-wrap:wrap;background:var(--background-color-primary, white);padding-top:var(--spacer-md, calc(var(--space-unit, 1em) * .75))!important;vertical-align:middle;align-items:flex-start;gap:var(--space-unit, 1em)}._toolbar_1ctze_3._toolbarIsActive_1ctze_13{border-top:1px solid var(--text-tertiary, #fafafa)}._iconToolbar_1ctze_17{display:flex!important;gap:var(--spacer-lg, calc(var(--space-unit, 1em) * 1.5))}._iconToolbar_1ctze_17._shortBar_1ctze_21{gap:var(--spacer-md, calc(var(--space-unit, 1em) * .75))}._toolbarItem_1ctze_25{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;border:0;background:none;padding:0!important;cursor:pointer;vertical-align:middle;touch-action:manipulation;display:flex;align-items:center;justify-content:center;outline:none}@container (max-width: 575.98px){._toolbarItem_1ctze_25{min-width:44px;min-height:44px}}._toolbarItem_1ctze_25._disabled_1ctze_46{cursor:not-allowed}._toolbarItem_1ctze_25:active,._toolbarItem_1ctze_25._active_1ctze_49{background-color:#bababa66;border-radius:50%}._toolbarItem_1ctze_25 ._format_1ctze_53{background-size:contain;display:inline-block;vertical-align:-.25em;display:flex!important}._actionButton_1ctze_60{display:flex!important;gap:var(--space-unit, 1em);margin-left:auto}._inputSubmitActionButton_1ctze_66{width:100%;height:35px;display:flex!important;justify-content:center!important;align-items:center!important;background-color:var(--call-primary-color, #434343)!important}._inputSubmitActionButton_1ctze_66._submitAction_1ctze_74 svg{fill:var(--text-light, white)!important}._inputSubmitActionButton_1ctze_66 ._inputSourceText_1ctze_77{display:none!important;margin-left:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;font-size:var(--font-size-small, 16px)}@container (min-width: 576px){._inputSubmitActionButton_1ctze_66 ._inputSourceText_1ctze_77{display:block!important}}._tooltip_1ctze_88{width:230px!important;margin-left:-117px!important}
|
|
@@ -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,
|
|
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")),
|
|
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
|
-
|
|
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" &&
|
|
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
|
|
110
|
+
return v ? null : /* @__PURE__ */ R(
|
|
111
111
|
"div",
|
|
112
112
|
{
|
|
113
113
|
className: l(t.toolbar, {
|
|
114
|
-
[t.toolbarIsActive]:
|
|
114
|
+
[t.toolbarIsActive]: v ? !1 : a.isActive
|
|
115
115
|
}),
|
|
116
116
|
ref: H,
|
|
117
117
|
children: [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../../../../assets/components/input/text_editor/plugins/ToolbarPlugin.module-
|
|
1
|
+
import '../../../../assets/components/input/text_editor/plugins/ToolbarPlugin.module-C48bDmk6.css';const t = "_toolbar_1ctze_3", o = "_toolbarIsActive_1ctze_13", c = "_iconToolbar_1ctze_17", n = "_shortBar_1ctze_21", _ = "_toolbarItem_1ctze_25", i = "_active_1ctze_49", a = "_format_1ctze_53", s = "_actionButton_1ctze_60", e = "_inputSubmitActionButton_1ctze_66", r = "_submitAction_1ctze_74", b = {
|
|
2
2
|
toolbar: t,
|
|
3
3
|
toolbarIsActive: o,
|
|
4
4
|
iconToolbar: c,
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._toolbar_1vwec_3{display:flex!important;justify-content:space-between!important;flex-wrap:wrap;background:var(--background-color-primary, white);padding-top:var(--spacer-md, calc(var(--space-unit, 1em) * .75))!important;vertical-align:middle;align-items:flex-start;gap:var(--space-unit, 1em)}._toolbar_1vwec_3._toolbarIsActive_1vwec_13{border-top:1px solid var(--text-tertiary, #fafafa)}._iconToolbar_1vwec_17{display:flex!important;gap:var(--spacer-lg, calc(var(--space-unit, 1em) * 1.5))}._iconToolbar_1vwec_17._shortBar_1vwec_21{gap:var(--spacer-md, calc(var(--space-unit, 1em) * .75))}._toolbarItem_1vwec_25{border:0;background:none;padding:0!important;cursor:pointer;vertical-align:middle;touch-action:manipulation;display:flex;align-items:center;justify-content:center;outline:none}@container (max-width: 575.98px){._toolbarItem_1vwec_25{min-width:44px;min-height:44px}}._toolbarItem_1vwec_25._disabled_1vwec_43{cursor:not-allowed}._toolbarItem_1vwec_25:active,._toolbarItem_1vwec_25._active_1vwec_46{background-color:#bababa66;border-radius:50%}._toolbarItem_1vwec_25 ._format_1vwec_50{background-size:contain;display:inline-block;vertical-align:-.25em;display:flex!important}._actionButton_1vwec_57{display:flex!important;gap:var(--space-unit, 1em);margin-left:auto}._inputSubmitActionButton_1vwec_63{width:100%;height:35px;display:flex!important;justify-content:center!important;align-items:center!important;background-color:var(--call-primary-color, #434343)!important}._inputSubmitActionButton_1vwec_63._submitAction_1vwec_71 svg{fill:var(--text-light, white)!important}._inputSubmitActionButton_1vwec_63 ._inputSourceText_1vwec_74{display:none!important;margin-left:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important;font-size:var(--font-size-small, 16px)}@container (min-width: 576px){._inputSubmitActionButton_1vwec_63 ._inputSourceText_1vwec_74{display:block!important}}._tooltip_1vwec_85{width:230px!important;margin-left:-117px!important}
|