@logora/debate 0.4.104 → 0.4.106

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.
@@ -1,34 +1,34 @@
1
- import { jsxs as x, Fragment as it, jsx as t } from "react/jsx-runtime";
2
- import { ListNode as nt, ListItemNode as st } from "@lexical/list";
3
- import { OverflowNode as ct } from "@lexical/overflow";
4
- import { CharacterLimitPlugin as lt } from "@lexical/react/LexicalCharacterLimitPlugin";
5
- import { LexicalComposer as mt } from "@lexical/react/LexicalComposer";
6
- import { ContentEditable as at } from "@lexical/react/LexicalContentEditable";
7
- import { EditorRefPlugin as dt } from "@lexical/react/LexicalEditorRefPlugin";
8
- import { LexicalErrorBoundary as ut } from "@lexical/react/LexicalErrorBoundary";
9
- import { HistoryPlugin as ft } from "@lexical/react/LexicalHistoryPlugin";
10
- import { ListPlugin as pt } from "@lexical/react/LexicalListPlugin";
11
- import { OnChangePlugin as ht } from "@lexical/react/LexicalOnChangePlugin";
12
- import { RichTextPlugin as gt } from "@lexical/react/LexicalRichTextPlugin";
13
- import { QuoteNode as St } from "@lexical/rich-text";
1
+ import { jsxs as x, Fragment as nt, jsx as t } from "react/jsx-runtime";
2
+ import { ListNode as st, ListItemNode as ct } from "@lexical/list";
3
+ import { OverflowNode as lt } from "@lexical/overflow";
4
+ import { CharacterLimitPlugin as mt } from "@lexical/react/LexicalCharacterLimitPlugin";
5
+ import { LexicalComposer as at } from "@lexical/react/LexicalComposer";
6
+ import { ContentEditable as dt } from "@lexical/react/LexicalContentEditable";
7
+ import { EditorRefPlugin as ut } from "@lexical/react/LexicalEditorRefPlugin";
8
+ import { LexicalErrorBoundary as ft } from "@lexical/react/LexicalErrorBoundary";
9
+ import { HistoryPlugin as pt } from "@lexical/react/LexicalHistoryPlugin";
10
+ import { ListPlugin as ht } from "@lexical/react/LexicalListPlugin";
11
+ import { OnChangePlugin as gt } from "@lexical/react/LexicalOnChangePlugin";
12
+ import { RichTextPlugin as St } from "@lexical/react/LexicalRichTextPlugin";
13
+ import { QuoteNode as xt } from "@lexical/rich-text";
14
14
  import R from "classnames";
15
- import { $getRoot as xt } from "lexical";
16
- import { useState as p, useId as Pt, useRef as Ct, useEffect as w } from "react";
17
- import { useIntl as Tt } from "react-intl";
18
- import It from "./EditorTheme.js";
15
+ import { $getRoot as Pt } from "lexical";
16
+ import { useState as p, useId as Ct, useRef as Tt, useEffect as w } from "react";
17
+ import { useIntl as It } from "react-intl";
18
+ import Nt from "./EditorTheme.js";
19
19
  import i from "./TextEditor.module.scss.js";
20
- import { AutoSavePlugin as Nt } from "./plugins/AutoSavePlugin.js";
21
- import { FocusPlugin as vt } from "./plugins/FocusPlugin.js";
22
- import { IOSInsertParagraphFallbackPlugin as Et } from "./plugins/IOSInsertParagraphFallbackPlugin.js";
23
- import { MaxLengthPlugin as bt } from "./plugins/MaxLengthPlugin.js";
24
- import { ResetPlugin as Mt } from "./plugins/ResetPlugin.js";
25
- import { SetContentPlugin as Rt } from "./plugins/SetContentPlugin.js";
26
- import { SetRichContentPlugin as wt } from "./plugins/SetRichContentPlugin.js";
27
- import { ToolbarPlugin as Lt } from "./plugins/ToolbarPlugin.js";
28
- import { useModal as _t } from "../../dialog/modal/useModal.js";
29
- import { SourceModal as yt } from "../../source/source_modal/SourceModal.js";
30
- import { SourceListItem as At } from "../../source/source_list_item/SourceListItem.js";
31
- const L = (l) => l?.replace(/ /g, " "), ae = ({
20
+ import { AutoSavePlugin as vt } from "./plugins/AutoSavePlugin.js";
21
+ import { FocusPlugin as Et } from "./plugins/FocusPlugin.js";
22
+ import { IOSInsertParagraphFallbackPlugin as bt } from "./plugins/IOSInsertParagraphFallbackPlugin.js";
23
+ import { MaxLengthPlugin as Mt } from "./plugins/MaxLengthPlugin.js";
24
+ import { ResetPlugin as Rt } from "./plugins/ResetPlugin.js";
25
+ import { SetContentPlugin as wt } from "./plugins/SetContentPlugin.js";
26
+ import { SetRichContentPlugin as Lt } from "./plugins/SetRichContentPlugin.js";
27
+ import { ToolbarPlugin as _t } from "./plugins/ToolbarPlugin.js";
28
+ import { useModal as yt } from "../../dialog/modal/useModal.js";
29
+ import { SourceModal as At } from "../../source/source_modal/SourceModal.js";
30
+ import { SourceListItem as Ot } from "../../source/source_list_item/SourceListItem.js";
31
+ const L = (l) => l?.replace(/ /g, " "), de = ({
32
32
  placeholder: l,
33
33
  initialContent: _,
34
34
  initialRichContent: y,
@@ -52,68 +52,69 @@ const L = (l) => l?.replace(/ /g, " "), ae = ({
52
52
  autoFocus: a = !1,
53
53
  isReply: d = !1,
54
54
  resetSignal: H,
55
- ...J
55
+ submitting: J = !1,
56
+ ...Q
56
57
  }) => {
57
- const [s, Q] = p(a || S), [W, $] = p(""), [q, D] = p(""), [u, f] = p([]), { showModal: G } = _t(), N = Tt(), v = Pt(), E = Ct(!1);
58
+ const [s, W] = p(a || S), [$, q] = p(""), [D, G] = p(""), [u, f] = p([]), { showModal: K } = yt(), N = It(), v = Ct(), E = Tt(!1);
58
59
  w(() => {
59
60
  a && !E.current && n && (E.current = !0, n());
60
61
  }, [a, n]), w(() => {
61
62
  h && f(h);
62
63
  }, [h]);
63
64
  const b = () => {
64
- s || (Q(!0), n && n());
65
- }, K = {
65
+ s || (W(!0), n && n());
66
+ }, V = {
66
67
  editable: !k,
67
- theme: It,
68
+ theme: Nt,
68
69
  onError(e) {
69
70
  console.error("TextEditor error:", e);
70
71
  },
71
- nodes: [nt, st, St, ct]
72
- }, V = () => {
72
+ nodes: [st, ct, xt, lt]
73
+ }, X = () => {
73
74
  b();
74
- }, X = (e) => {
75
+ }, Y = (e) => {
75
76
  e.read(() => {
76
- const o = xt().getTextContent(), r = L(o), c = JSON.stringify(e), M = L(c);
77
- $(r), D(M), C && C(r, M);
77
+ const o = Pt().getTextContent(), r = L(o), c = JSON.stringify(e), M = L(c);
78
+ q(r), G(M), C && C(r, M);
78
79
  });
79
- }, Y = (e) => {
80
- const o = W, r = q, c = u;
80
+ }, Z = (e) => {
81
+ const o = $, r = D, c = u;
81
82
  P && (e.preventDefault(), P(o, r, c)), f([]), g?.([]);
82
- }, Z = () => {
83
- G(
83
+ }, tt = () => {
84
+ K(
84
85
  /* @__PURE__ */ t(
85
- yt,
86
+ At,
86
87
  {
87
- onAddSource: tt,
88
+ onAddSource: et,
88
89
  allowedSources: I
89
90
  }
90
91
  )
91
92
  );
92
- }, tt = (e) => {
93
+ }, et = (e) => {
93
94
  f((o) => {
94
95
  const r = [...o, e];
95
96
  return g?.(r), r;
96
97
  });
97
- }, et = (e) => {
98
+ }, ot = (e) => {
98
99
  f((o) => {
99
100
  const r = o.filter(
100
101
  (c) => c.source_url !== e.source_url
101
102
  );
102
103
  return g?.(r), r;
103
104
  });
104
- }, ot = (e, o) => /* @__PURE__ */ t(
105
- At,
105
+ }, rt = (e, o) => /* @__PURE__ */ t(
106
+ Ot,
106
107
  {
107
108
  publisher: e.publisher,
108
109
  url: e.source_url,
109
110
  title: e.title,
110
111
  index: o,
111
- onRemove: () => et(e)
112
+ onRemove: () => ot(e)
112
113
  },
113
114
  o
114
- ), rt = () => /* @__PURE__ */ t("div", { className: i.editorPlaceholder, children: l });
115
- return /* @__PURE__ */ x(it, { children: [
116
- /* @__PURE__ */ t(mt, { initialConfig: K, children: /* @__PURE__ */ t("div", { className: i.editorContainer, onClick: V, children: /* @__PURE__ */ x(
115
+ ), it = () => /* @__PURE__ */ t("div", { className: i.editorPlaceholder, children: l });
116
+ return /* @__PURE__ */ x(nt, { children: [
117
+ /* @__PURE__ */ t(at, { initialConfig: V, children: /* @__PURE__ */ t("div", { className: i.editorContainer, onClick: X, children: /* @__PURE__ */ x(
117
118
  "div",
118
119
  {
119
120
  className: R(i.editorInner, {
@@ -121,30 +122,31 @@ const L = (l) => l?.replace(/ /g, " "), ae = ({
121
122
  }),
122
123
  children: [
123
124
  /* @__PURE__ */ t(
124
- gt,
125
+ St,
125
126
  {
126
127
  contentEditable: /* @__PURE__ */ t(
127
- at,
128
+ dt,
128
129
  {
129
130
  className: R(i.editorInput, {
130
131
  [i.editorInputInactive]: !s
131
132
  }),
132
- ...J
133
+ ...Q
133
134
  }
134
135
  ),
135
- placeholder: l && /* @__PURE__ */ t(rt, {}),
136
- ErrorBoundary: ut
136
+ placeholder: l && /* @__PURE__ */ t(it, {}),
137
+ ErrorBoundary: ft
137
138
  }
138
139
  ),
139
140
  /* @__PURE__ */ t(
140
- Lt,
141
+ _t,
141
142
  {
142
143
  hideSourceAction: O,
144
+ submitting: J,
143
145
  hideSubmit: A,
144
146
  disableRichText: U,
145
147
  shortBar: B,
146
- onSubmit: Y,
147
- onAddSource: Z,
148
+ onSubmit: Z,
149
+ onAddSource: tt,
148
150
  isActive: s || S,
149
151
  sourceTooltip: I?.length > 0 && N.formatMessage({
150
152
  id: "input.allowed_domains_tooltip",
@@ -153,37 +155,37 @@ const L = (l) => l?.replace(/ /g, " "), ae = ({
153
155
  }
154
156
  ),
155
157
  s && m && !z && /* @__PURE__ */ x("div", { className: i.charactersCount, children: [
156
- /* @__PURE__ */ t(lt, { maxLength: m }),
158
+ /* @__PURE__ */ t(mt, { maxLength: m }),
157
159
  " ",
158
160
  N.formatMessage({
159
161
  id: "input.remaining_chars",
160
162
  defaultMessage: "remaining characters"
161
163
  })
162
164
  ] }),
165
+ /* @__PURE__ */ t(ht, {}),
163
166
  /* @__PURE__ */ t(pt, {}),
164
- /* @__PURE__ */ t(ft, {}),
165
- /* @__PURE__ */ t(ht, { onChange: X, ignoreSelectionChange: !0 }),
167
+ /* @__PURE__ */ t(gt, { onChange: Y, ignoreSelectionChange: !0 }),
166
168
  /* @__PURE__ */ t(
167
- Nt,
169
+ vt,
168
170
  {
169
171
  onSetContent: F ? () => {
170
172
  } : b,
171
173
  storageUid: T || v
172
174
  }
173
175
  ),
174
- /* @__PURE__ */ t(Rt, { content: _, isReply: d }),
175
- /* @__PURE__ */ t(wt, { richContent: y, isReply: d }),
176
- /* @__PURE__ */ t(vt, { autoFocus: a, isReply: d }),
177
- /* @__PURE__ */ t(Et, {}),
178
- m && /* @__PURE__ */ t(bt, { maxLength: m }),
179
- /* @__PURE__ */ t(Mt, { storageUid: T || v, resetSignal: H, isReply: d }),
180
- /* @__PURE__ */ t(dt, { editorRef: j })
176
+ /* @__PURE__ */ t(wt, { content: _, isReply: d }),
177
+ /* @__PURE__ */ t(Lt, { richContent: y, isReply: d }),
178
+ /* @__PURE__ */ t(Et, { autoFocus: a, isReply: d }),
179
+ /* @__PURE__ */ t(bt, {}),
180
+ m && /* @__PURE__ */ t(Mt, { maxLength: m }),
181
+ /* @__PURE__ */ t(Rt, { storageUid: T || v, resetSignal: H, isReply: d }),
182
+ /* @__PURE__ */ t(ut, { editorRef: j })
181
183
  ]
182
184
  }
183
185
  ) }) }),
184
- u && u.length !== 0 ? /* @__PURE__ */ t("div", { className: i.sourcesBox, children: /* @__PURE__ */ t("div", { className: i.sourceList, children: u.map(ot) }) }) : null
186
+ u && u.length !== 0 ? /* @__PURE__ */ t("div", { className: i.sourcesBox, children: /* @__PURE__ */ t("div", { className: i.sourceList, children: u.map(rt) }) }) : null
185
187
  ] });
186
188
  };
187
189
  export {
188
- ae as TextEditor
190
+ de as TextEditor
189
191
  };
@@ -1,9 +1,9 @@
1
- import { jsxs as B, jsx as i } from "react/jsx-runtime";
1
+ import { jsxs as B, jsx as n } from "react/jsx-runtime";
2
2
  import { $isListNode as $, ListNode as Y, INSERT_ORDERED_LIST_COMMAND as Z, $isListItemNode as q, $createListNode as ee } from "@lexical/list";
3
3
  import { useLexicalComposerContext as te } from "@lexical/react/LexicalComposerContext";
4
4
  import { $isHeadingNode as oe, $createQuoteNode as K } from "@lexical/rich-text";
5
5
  import { $setBlocksType as F } from "@lexical/selection";
6
- import { $getNearestNodeOfType as ne, mergeRegister as ie } from "@lexical/utils";
6
+ import { $getNearestNodeOfType as ie, mergeRegister as ne } from "@lexical/utils";
7
7
  import l from "classnames";
8
8
  import { $getSelection as M, $isRangeSelection as I, SELECTION_CHANGE_COMMAND as le, FORMAT_TEXT_COMMAND as ae, $createParagraphNode as U } from "lexical";
9
9
  import { useRef as D, useState as N, useCallback as re, useEffect as j } from "react";
@@ -11,35 +11,35 @@ import { useIntl as se } from "react-intl";
11
11
  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
- const Ce = (r) => {
15
- const d = se(), H = 1, [a] = te(), Q = D(null), [T, C] = N("paragraph"), [de, E] = N(null), [V, k] = N(!1), [z, w] = N(!1), [G, x] = N(!1), v = r.hideSubmit && r.hideSourceAction && r.disableRichText, _ = re(() => {
14
+ const Ce = (a) => {
15
+ const d = se(), H = 1, [r] = te(), Q = D(null), [T, C] = N("paragraph"), [de, E] = N(null), [V, k] = N(!1), [z, w] = N(!1), [G, x] = N(!1), v = a.hideSubmit && a.hideSourceAction && a.disableRichText, _ = re(() => {
16
16
  const e = M();
17
17
  if (I(e)) {
18
18
  const o = e.anchor.getNode(), s = o.getKey() === "root" ? o : o.getTopLevelElementOrThrow(), u = s.getKey();
19
- if (a.getElementByKey(u) !== null)
19
+ if (r.getElementByKey(u) !== null)
20
20
  if (E(u), $(s)) {
21
- const n = ne(o, Y), p = n ? n.getTag() : s.getTag();
21
+ const i = ie(o, Y), p = i ? i.getTag() : s.getTag();
22
22
  C(p);
23
23
  } else {
24
- const n = oe(s) ? s.getTag() : s.getType();
25
- C(n);
24
+ const i = oe(s) ? s.getTag() : s.getType();
25
+ C(i);
26
26
  }
27
27
  k(e.hasFormat("bold")), w(e.hasFormat("italic")), x(e.hasFormat("underline"));
28
28
  } else
29
29
  E(null), C("paragraph"), k(!1), w(!1), x(!1);
30
- }, [a]);
31
- j(() => ie(
32
- a.registerUpdateListener(({ editorState: e }) => {
30
+ }, [r]);
31
+ j(() => ne(
32
+ r.registerUpdateListener(({ editorState: e }) => {
33
33
  e.read(() => {
34
34
  _();
35
35
  });
36
36
  }),
37
- a.registerCommand(
37
+ r.registerCommand(
38
38
  le,
39
39
  () => (_(), !1),
40
40
  H
41
41
  )
42
- ), [a, _]);
42
+ ), [r, _]);
43
43
  const y = D(!1), c = D(null);
44
44
  j(() => () => {
45
45
  c.current && clearTimeout(c.current);
@@ -56,49 +56,49 @@ const Ce = (r) => {
56
56
  e();
57
57
  }, S = () => {
58
58
  setTimeout(() => {
59
- a.getEditorState().read(() => {
59
+ r.getEditorState().read(() => {
60
60
  _();
61
61
  });
62
62
  }, 0);
63
63
  }, b = (e) => {
64
- a.dispatchCommand(ae, e), e === "bold" ? k((o) => !o) : e === "italic" ? w((o) => !o) : e === "underline" && x((o) => !o), a.focus(() => {
65
- const o = a.getRootElement();
64
+ r.dispatchCommand(ae, e), e === "bold" ? k((o) => !o) : e === "italic" ? w((o) => !o) : e === "underline" && x((o) => !o), r.focus(() => {
65
+ const o = r.getRootElement();
66
66
  o && o.focus();
67
67
  }), S();
68
68
  }, X = () => {
69
- a.update(() => {
69
+ r.update(() => {
70
70
  const e = M();
71
71
  if (!I(e))
72
72
  return;
73
73
  const o = e.getNodes(), s = /* @__PURE__ */ new Set();
74
74
  for (const m of o) {
75
- let n = m;
76
- for (; n !== null && !q(n); )
77
- n = n.getParent();
78
- q(n) && s.add(n);
75
+ let i = m;
76
+ for (; i !== null && !q(i); )
77
+ i = i.getParent();
78
+ q(i) && s.add(i);
79
79
  }
80
80
  const u = Array.from(s).reverse();
81
81
  for (const m of u) {
82
- const n = m.getParent();
83
- if (!$(n))
82
+ const i = m.getParent();
83
+ if (!$(i))
84
84
  continue;
85
85
  const p = U(), J = m.getChildren();
86
86
  for (const A of J)
87
87
  p.append(A);
88
88
  const L = m.getNextSiblings();
89
- if (n.insertAfter(p), L.length > 0) {
90
- const A = L[0].getValue(), R = ee(n.getListType(), A);
89
+ if (i.insertAfter(p), L.length > 0) {
90
+ const A = L[0].getValue(), R = ee(i.getListType(), A);
91
91
  for (const W of L)
92
92
  R.append(W);
93
93
  p.insertAfter(R);
94
94
  }
95
- m.remove(), n.getChildrenSize() === 0 && n.remove();
95
+ m.remove(), i.getChildrenSize() === 0 && i.remove();
96
96
  }
97
97
  });
98
98
  }, O = () => {
99
- T !== "ol" ? a.dispatchCommand(Z) : X(), S();
99
+ T !== "ol" ? r.dispatchCommand(Z) : X(), S();
100
100
  }, P = () => {
101
- T !== "quote" ? a.update(() => {
101
+ T !== "quote" ? r.update(() => {
102
102
  const e = M();
103
103
  if (I(e))
104
104
  if (e.isCollapsed()) {
@@ -106,7 +106,7 @@ const Ce = (r) => {
106
106
  s.insertAfter(u), u.selectEnd();
107
107
  } else
108
108
  F(e, () => K());
109
- }) : a.update(() => {
109
+ }) : r.update(() => {
110
110
  const e = M();
111
111
  I(e) && F(e, () => U());
112
112
  }), S();
@@ -115,18 +115,18 @@ const Ce = (r) => {
115
115
  "div",
116
116
  {
117
117
  className: l(t.toolbar, {
118
- [t.toolbarIsActive]: v ? !1 : r.isActive
118
+ [t.toolbarIsActive]: v ? !1 : a.isActive
119
119
  }),
120
120
  ref: Q,
121
121
  children: [
122
- r.isActive ? !r.disableRichText && /* @__PURE__ */ B(
122
+ a.isActive ? !a.disableRichText && /* @__PURE__ */ B(
123
123
  "div",
124
124
  {
125
125
  className: l(t.iconToolbar, {
126
- [t.shortBar]: r.shortBar
126
+ [t.shortBar]: a.shortBar
127
127
  }),
128
128
  children: [
129
- /* @__PURE__ */ i(
129
+ /* @__PURE__ */ n(
130
130
  "button",
131
131
  {
132
132
  onPointerDown: (e) => g(e, () => b("bold")),
@@ -138,7 +138,7 @@ const Ce = (r) => {
138
138
  id: "input.text_editor.plugins.toolbar_plugin.bold.aria_label",
139
139
  defaultMessage: "Make text bold"
140
140
  }),
141
- children: /* @__PURE__ */ i(
141
+ children: /* @__PURE__ */ n(
142
142
  f,
143
143
  {
144
144
  name: "bold",
@@ -149,7 +149,7 @@ const Ce = (r) => {
149
149
  )
150
150
  }
151
151
  ),
152
- /* @__PURE__ */ i(
152
+ /* @__PURE__ */ n(
153
153
  "button",
154
154
  {
155
155
  onPointerDown: (e) => g(e, () => b("italic")),
@@ -162,7 +162,7 @@ const Ce = (r) => {
162
162
  id: "input.text_editor.plugins.toolbar_plugin.italic.aria_label",
163
163
  defaultMessage: "Make text italic"
164
164
  }),
165
- children: /* @__PURE__ */ i(
165
+ children: /* @__PURE__ */ n(
166
166
  f,
167
167
  {
168
168
  name: "italic",
@@ -173,7 +173,7 @@ const Ce = (r) => {
173
173
  )
174
174
  }
175
175
  ),
176
- /* @__PURE__ */ i(
176
+ /* @__PURE__ */ n(
177
177
  "button",
178
178
  {
179
179
  onPointerDown: (e) => g(e, () => b("underline")),
@@ -186,7 +186,7 @@ const Ce = (r) => {
186
186
  id: "input.text_editor.plugins.toolbar_plugin.underline.aria_label",
187
187
  defaultMessage: "Underline text"
188
188
  }),
189
- children: /* @__PURE__ */ i(
189
+ children: /* @__PURE__ */ n(
190
190
  f,
191
191
  {
192
192
  name: "underline",
@@ -197,7 +197,7 @@ const Ce = (r) => {
197
197
  )
198
198
  }
199
199
  ),
200
- /* @__PURE__ */ i(
200
+ /* @__PURE__ */ n(
201
201
  "button",
202
202
  {
203
203
  onPointerDown: (e) => g(e, () => P()),
@@ -210,7 +210,7 @@ const Ce = (r) => {
210
210
  id: "input.text_editor.plugins.toolbar_plugin.blockquote.aria_label",
211
211
  defaultMessage: "Add a blockquote"
212
212
  }),
213
- children: /* @__PURE__ */ i(
213
+ children: /* @__PURE__ */ n(
214
214
  f,
215
215
  {
216
216
  name: "blockquote",
@@ -221,7 +221,7 @@ const Ce = (r) => {
221
221
  )
222
222
  }
223
223
  ),
224
- /* @__PURE__ */ i(
224
+ /* @__PURE__ */ n(
225
225
  "button",
226
226
  {
227
227
  onPointerDown: (e) => g(e, () => O()),
@@ -234,7 +234,7 @@ const Ce = (r) => {
234
234
  id: "input.text_editor.plugins.toolbar_plugin.numbered_list.aria_label",
235
235
  defaultMessage: "Insert a numbered list"
236
236
  }),
237
- children: /* @__PURE__ */ i(
237
+ children: /* @__PURE__ */ n(
238
238
  f,
239
239
  {
240
240
  name: "orderedList",
@@ -245,17 +245,17 @@ const Ce = (r) => {
245
245
  )
246
246
  }
247
247
  ),
248
- !r.hideSourceAction && /* @__PURE__ */ i(
248
+ !a.hideSourceAction && /* @__PURE__ */ n(
249
249
  "button",
250
250
  {
251
- onClick: r.onAddSource,
251
+ onClick: a.onAddSource,
252
252
  type: "button",
253
253
  className: t.toolbarItem,
254
254
  "aria-label": d.formatMessage({
255
255
  id: "input.text_editor.plugins.toolbar_plugin.add_link.aria_label",
256
256
  defaultMessage: "Add hyperlink"
257
257
  }),
258
- children: /* @__PURE__ */ i(
258
+ children: /* @__PURE__ */ n(
259
259
  f,
260
260
  {
261
261
  name: "link",
@@ -269,18 +269,20 @@ const Ce = (r) => {
269
269
  ]
270
270
  }
271
271
  ) : null,
272
- /* @__PURE__ */ i("div", { className: t.actionButton, children: r.hideSubmit ? null : /* @__PURE__ */ i(
272
+ /* @__PURE__ */ n("div", { className: t.actionButton, children: a.hideSubmit ? null : /* @__PURE__ */ n(
273
273
  ce,
274
274
  {
275
275
  type: "button",
276
276
  "data-testid": "submit-button",
277
- handleClick: r.onSubmit,
277
+ handleClick: a.onSubmit,
278
+ disabled: a.submitting,
279
+ "aria-busy": a.submitting ? "true" : "false",
278
280
  className: l(t.inputSubmitActionButton, t.submitAction),
279
281
  "aria-label": d.formatMessage({
280
282
  id: "input.text_editor.plugins.toolbar_plugin.submit_button.aria_label",
281
283
  defaultMessage: "Send message"
282
284
  }),
283
- children: /* @__PURE__ */ i(f, { name: "send", width: 20, height: 20 })
285
+ children: /* @__PURE__ */ n(f, { name: "send", width: 20, height: 20 })
284
286
  }
285
287
  ) })
286
288
  ]
@@ -1,28 +1,28 @@
1
- import '../../../assets/components/vote/vote_box/VoteBox.module-DZcJagif.css';const o = "_voteBox_yn95k_3", t = "_voteResultsBox_yn95k_11", e = "_voteResults_yn95k_11", n = "_voteProgressHeader_yn95k_22", s = "_voteProgressHeaderAgainst_yn95k_35", _ = "_voteResultsNumberVoters_yn95k_39", u = "_voteBoxFooter_yn95k_47", v = "_voteFooterActions_yn95k_56", c = "_voteBoxActions_yn95k_62", i = "_voteBoxActionsBody_yn95k_72", B = "_voteBoxActionsBodyColumn_yn95k_80", l = "_voteAction_yn95k_84", r = "_buttonAlignLeft_yn95k_94", y = "_voteButton_yn95k_98", d = "_textAlignLeft_yn95k_109", x = "_voteBoxShowResultContainer_yn95k_113", A = "_voteBoxShowResult_yn95k_113", k = "_boldShowResult_yn95k_137", a = "_outlined_yn95k_143", b = "_voteButtonThesis_yn95k_150", R = "_voteButtonThesisSynthesisMobile_yn95k_162", g = "_voteBoxActionsBodyOutlined_yn95k_201", h = "_voteBoxActionsBodyFilledNeutral_yn95k_240", m = "_voteActionButton_yn95k_253", w = "_sideIcon_yn95k_273", C = "_progress_yn95k_278", N = "_progressBar_yn95k_284", S = "_voteCommentCounts_yn95k_301", f = "_debateNumberItem_yn95k_309", F = "_debateNumberLabel_yn95k_318", I = "_showResultButton_yn95k_322", L = "_voteResultInfoText_yn95k_335", T = {
1
+ import '../../../assets/components/vote/vote_box/VoteBox.module-OmU1GLQG.css';const o = "_voteBox_3jamb_3", t = "_voteResultsBox_3jamb_11", e = "_voteResults_3jamb_11", s = "_voteProgressHeader_3jamb_22", n = "_voteProgressHeaderAgainst_3jamb_35", _ = "_voteResultsNumberVoters_3jamb_39", u = "_voteBoxFooter_3jamb_47", v = "_voteFooterActions_3jamb_56", a = "_voteBoxActions_3jamb_62", c = "_voteBoxActionsBody_3jamb_72", i = "_voteBoxActionsBodyColumn_3jamb_80", B = "_voteAction_3jamb_84", b = "_buttonAlignLeft_3jamb_94", l = "_voteButton_3jamb_98", r = "_textAlignLeft_3jamb_109", m = "_voteBoxShowResultContainer_3jamb_113", d = "_voteBoxShowResult_3jamb_113", x = "_boldShowResult_3jamb_137", A = "_outlined_3jamb_143", j = "_voteButtonThesis_3jamb_150", R = "_voteButtonThesisSynthesisMobile_3jamb_162", g = "_voteBoxActionsBodyOutlined_3jamb_201", h = "_voteBoxActionsBodyFilledNeutral_3jamb_240", y = "_voteActionButton_3jamb_253", w = "_sideIcon_3jamb_273", C = "_progress_3jamb_278", N = "_progressBar_3jamb_284", S = "_voteCommentCounts_3jamb_301", f = "_debateNumberItem_3jamb_310", F = "_debateNumberLabel_3jamb_320", I = "_showResultButton_3jamb_324", L = "_voteResultInfoText_3jamb_337", T = {
2
2
  voteBox: o,
3
3
  voteResultsBox: t,
4
4
  voteResults: e,
5
- voteProgressHeader: n,
6
- voteProgressHeaderAgainst: s,
5
+ voteProgressHeader: s,
6
+ voteProgressHeaderAgainst: n,
7
7
  voteResultsNumberVoters: _,
8
8
  voteBoxFooter: u,
9
9
  voteFooterActions: v,
10
- voteBoxActions: c,
11
- voteBoxActionsBody: i,
12
- voteBoxActionsBodyColumn: B,
13
- voteAction: l,
14
- buttonAlignLeft: r,
15
- voteButton: y,
16
- textAlignLeft: d,
17
- voteBoxShowResultContainer: x,
18
- voteBoxShowResult: A,
19
- boldShowResult: k,
20
- outlined: a,
21
- voteButtonThesis: b,
10
+ voteBoxActions: a,
11
+ voteBoxActionsBody: c,
12
+ voteBoxActionsBodyColumn: i,
13
+ voteAction: B,
14
+ buttonAlignLeft: b,
15
+ voteButton: l,
16
+ textAlignLeft: r,
17
+ voteBoxShowResultContainer: m,
18
+ voteBoxShowResult: d,
19
+ boldShowResult: x,
20
+ outlined: A,
21
+ voteButtonThesis: j,
22
22
  voteButtonThesisSynthesisMobile: R,
23
23
  voteBoxActionsBodyOutlined: g,
24
24
  voteBoxActionsBodyFilledNeutral: h,
25
- voteActionButton: m,
25
+ voteActionButton: y,
26
26
  sideIcon: w,
27
27
  progress: C,
28
28
  progressBar: N,
@@ -33,35 +33,35 @@ import '../../../assets/components/vote/vote_box/VoteBox.module-DZcJagif.css';co
33
33
  voteResultInfoText: L
34
34
  };
35
35
  export {
36
- k as boldShowResult,
37
- r as buttonAlignLeft,
36
+ x as boldShowResult,
37
+ b as buttonAlignLeft,
38
38
  f as debateNumberItem,
39
39
  F as debateNumberLabel,
40
40
  T as default,
41
- a as outlined,
41
+ A as outlined,
42
42
  C as progress,
43
43
  N as progressBar,
44
44
  I as showResultButton,
45
45
  w as sideIcon,
46
- d as textAlignLeft,
47
- l as voteAction,
48
- m as voteActionButton,
46
+ r as textAlignLeft,
47
+ B as voteAction,
48
+ y as voteActionButton,
49
49
  o as voteBox,
50
- c as voteBoxActions,
51
- i as voteBoxActionsBody,
52
- B as voteBoxActionsBodyColumn,
50
+ a as voteBoxActions,
51
+ c as voteBoxActionsBody,
52
+ i as voteBoxActionsBodyColumn,
53
53
  h as voteBoxActionsBodyFilledNeutral,
54
54
  g as voteBoxActionsBodyOutlined,
55
55
  u as voteBoxFooter,
56
- A as voteBoxShowResult,
57
- x as voteBoxShowResultContainer,
58
- y as voteButton,
59
- b as voteButtonThesis,
56
+ d as voteBoxShowResult,
57
+ m as voteBoxShowResultContainer,
58
+ l as voteButton,
59
+ j as voteButtonThesis,
60
60
  R as voteButtonThesisSynthesisMobile,
61
61
  S as voteCommentCounts,
62
62
  v as voteFooterActions,
63
- n as voteProgressHeader,
64
- s as voteProgressHeaderAgainst,
63
+ s as voteProgressHeader,
64
+ n as voteProgressHeaderAgainst,
65
65
  L as voteResultInfoText,
66
66
  e as voteResults,
67
67
  t as voteResultsBox,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logora/debate",
3
- "version": "0.4.104",
3
+ "version": "0.4.106",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0",
6
6
  "description": "Design system of @Logora made with React",