@logora/debate 0.3.87 → 0.3.89

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.
Files changed (58) hide show
  1. package/dist/assets/components/argument/argument/Argument.module-gLfNRLks.css +1 -0
  2. package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-BnTr5IaF.css +1 -0
  3. package/dist/assets/components/input/text_editor/{TextEditor.module-CxuSL3l3.css → TextEditor.module-DePSfOvG.css} +1 -1
  4. package/dist/assets/components/list/paginated_list/action_bar/ActionBar.module-pxwFC_Y2.css +1 -0
  5. package/dist/assets/components/proposal/proposal_box/ProposalBox.module-T4ms_LQ7.css +1 -0
  6. package/dist/assets/components/section/section_box/SectionBox.module-DUeUtdWr.css +1 -0
  7. package/dist/assets/components/source/context_source_list/ContextSourceList.module-D6X_0dB7.css +1 -0
  8. package/dist/assets/components/source/source_list_item/SourceListItem.module-mTxHhXPV.css +1 -0
  9. package/dist/assets/components/summary/summary/Summary.module-DjfmUlkW.css +1 -0
  10. package/dist/assets/components/summary/summary_box/SummaryBox.module-DQVkA8l7.css +1 -0
  11. package/dist/assets/components/vote/vote_box/VoteBox.module-CDrqb2SZ.css +1 -0
  12. package/dist/components/argument/argument/Argument.js +106 -111
  13. package/dist/components/argument/argument/Argument.module.scss.js +31 -31
  14. package/dist/components/consultation/consultation_box/ConsultationBox.js +111 -80
  15. package/dist/components/consultation/consultation_box/ConsultationBox.module.scss.js +29 -31
  16. package/dist/components/dialog/dropdown/Dropdown.js +28 -35
  17. package/dist/components/icons/spiegel_icons/index.js +46 -46
  18. package/dist/components/icons/stern_icons/index.js +70 -100
  19. package/dist/components/input/argument_input/ArgumentInput.js +197 -201
  20. package/dist/components/input/select/Select.js +19 -19
  21. package/dist/components/input/text_editor/TextEditor.js +129 -143
  22. package/dist/components/input/text_editor/TextEditor.module.scss.js +5 -5
  23. package/dist/components/input/text_editor/plugins/FocusPlugin.js +8 -12
  24. package/dist/components/input/text_editor/plugins/SetContentPlugin.js +13 -13
  25. package/dist/components/input/text_editor/plugins/SetRichContentPlugin.js +10 -10
  26. package/dist/components/input/text_editor/plugins/ToolbarPlugin.js +72 -70
  27. package/dist/components/list/paginated_list/PaginatedList.js +125 -131
  28. package/dist/components/list/paginated_list/action_bar/ActionBar.js +50 -53
  29. package/dist/components/list/paginated_list/action_bar/ActionBar.module.scss.js +16 -18
  30. package/dist/components/notification/notification_menu/NotificationMenu.js +22 -23
  31. package/dist/components/proposal/proposal_box/ProposalBox.js +59 -70
  32. package/dist/components/proposal/proposal_box/ProposalBox.module.scss.js +10 -14
  33. package/dist/components/section/section_box/SectionBox.js +10 -10
  34. package/dist/components/section/section_box/SectionBox.module.scss.js +9 -9
  35. package/dist/components/source/context_source_box/ContextSourceBox.js +7 -7
  36. package/dist/components/source/context_source_list/ContextSourceList.js +13 -10
  37. package/dist/components/source/context_source_list/ContextSourceList.module.scss.js +12 -14
  38. package/dist/components/source/source_list_item/SourceListItem.js +28 -42
  39. package/dist/components/source/source_list_item/SourceListItem.module.scss.js +6 -8
  40. package/dist/components/source/source_modal/SourceModal.js +15 -15
  41. package/dist/components/summary/summary/Summary.js +63 -41
  42. package/dist/components/summary/summary/Summary.module.scss.js +6 -10
  43. package/dist/components/summary/summary_box/SummaryBox.module.scss.js +9 -9
  44. package/dist/components/vote/vote_box/VoteBox.js +143 -122
  45. package/dist/components/vote/vote_box/VoteBox.module.scss.js +48 -50
  46. package/package.json +1 -1
  47. package/dist/assets/components/argument/argument/Argument.module-QZdPjj_i.css +0 -1
  48. package/dist/assets/components/consultation/consultation_box/ConsultationBox.module-DjNiVt-p.css +0 -1
  49. package/dist/assets/components/list/paginated_list/action_bar/ActionBar.module-DvwCbS9k.css +0 -1
  50. package/dist/assets/components/proposal/proposal_box/ProposalBox.module-Dm8XDnr1.css +0 -1
  51. package/dist/assets/components/section/section_box/SectionBox.module-qQs4B6bf.css +0 -1
  52. package/dist/assets/components/source/context_source_list/ContextSourceList.module-DUPbI-wb.css +0 -1
  53. package/dist/assets/components/source/source_list_item/SourceListItem.module-fm_uHuY4.css +0 -1
  54. package/dist/assets/components/summary/summary/Summary.module-2bnx3egy.css +0 -1
  55. package/dist/assets/components/summary/summary_box/SummaryBox.module-Dr9PevSJ.css +0 -1
  56. package/dist/assets/components/vote/vote_box/VoteBox.module-D5sSSHpi.css +0 -1
  57. package/dist/components/icons/spiegel_icons/Downvote.js +0 -6
  58. package/dist/components/icons/spiegel_icons/Upvote.js +0 -6
@@ -1,10 +1,10 @@
1
- import { jsx as c, jsxs as f } from "react/jsx-runtime";
1
+ import { jsx as c, jsxs as u } from "react/jsx-runtime";
2
2
  import h from "classnames";
3
3
  import { useState as b, useEffect as p } from "react";
4
- import t from "./Select.module.scss.js";
4
+ import r from "./Select.module.scss.js";
5
5
  import { Dropdown as k } from "../../dialog/dropdown/Dropdown.js";
6
6
  import { Icon as y } from "../../icons/icon/Icon.js";
7
- const N = ({
7
+ const I = ({
8
8
  options: a,
9
9
  defaultOption: n,
10
10
  onChange: s,
@@ -13,7 +13,7 @@ const N = ({
13
13
  className: m,
14
14
  horizontalPosition: v = "left"
15
15
  }) => {
16
- const d = n ? a.filter((e) => e.name === n)[0] : a[0], [u, l] = b(d);
16
+ const d = n ? a.filter((e) => e.name === n)[0] : a[0], [f, l] = b(d);
17
17
  p(() => {
18
18
  i === !0 && l(d);
19
19
  }, [i]), p(() => {
@@ -22,29 +22,29 @@ const N = ({
22
22
  const w = (e) => {
23
23
  l(e), s && s(e);
24
24
  }, x = (e) => {
25
- const r = e.currentTarget;
25
+ const t = e.currentTarget;
26
26
  switch (e.key) {
27
27
  case "Enter":
28
28
  case " ":
29
- e.preventDefault(), r.click();
29
+ e.preventDefault(), t.click();
30
30
  break;
31
31
  case "ArrowDown":
32
- e.preventDefault(), r.nextElementSibling?.focus();
32
+ e.preventDefault(), t.nextElementSibling?.focus();
33
33
  break;
34
34
  case "ArrowUp":
35
- e.preventDefault(), r.previousElementSibling?.focus();
35
+ e.preventDefault(), t.previousElementSibling?.focus();
36
36
  break;
37
37
  }
38
38
  }, D = (e) => {
39
- const r = u?.name === e.name;
39
+ const t = f?.name === e.name;
40
40
  return e.name !== "" && /* @__PURE__ */ c(
41
41
  "div",
42
42
  {
43
43
  role: "option",
44
- "aria-selected": r,
44
+ "aria-selected": t,
45
45
  tabIndex: 0,
46
- className: h(t.selectOption, {
47
- [t.selectOptionActive]: r
46
+ className: h(r.selectOption, {
47
+ [r.selectOptionActive]: t
48
48
  }),
49
49
  value: e.value,
50
50
  "data-tid": e.dataTid,
@@ -55,22 +55,22 @@ const N = ({
55
55
  e.value
56
56
  );
57
57
  };
58
- return /* @__PURE__ */ c("div", { className: t.selectContainer, children: /* @__PURE__ */ f(k, { horizontalPosition: v, closeOnContentClick: !0, children: [
59
- /* @__PURE__ */ f(
58
+ return /* @__PURE__ */ c("div", { className: r.selectContainer, children: /* @__PURE__ */ u(k, { horizontalPosition: v, children: [
59
+ /* @__PURE__ */ u(
60
60
  "div",
61
61
  {
62
- className: h(t.selectInput, {
62
+ className: h(r.selectInput, {
63
63
  [m]: m,
64
- [t.disabled]: o
64
+ [r.disabled]: o
65
65
  }),
66
66
  children: [
67
- /* @__PURE__ */ c("span", { className: t.currentOptionText, children: u?.text }),
67
+ /* @__PURE__ */ c("span", { className: r.currentOptionText, children: f?.text }),
68
68
  " ",
69
69
  /* @__PURE__ */ c(
70
70
  y,
71
71
  {
72
72
  name: "lightArrow",
73
- className: t.arrowDown,
73
+ className: r.arrowDown,
74
74
  height: 10,
75
75
  width: 10
76
76
  }
@@ -82,5 +82,5 @@ const N = ({
82
82
  ] }) });
83
83
  };
84
84
  export {
85
- N as Select
85
+ I as Select
86
86
  };
@@ -1,185 +1,171 @@
1
- import { jsxs as S, Fragment as oe, jsx as e } from "react/jsx-runtime";
2
- import { ListNode as re, ListItemNode as ie } from "@lexical/list";
3
- import { OverflowNode as ne } from "@lexical/overflow";
4
- import { CharacterLimitPlugin as se } from "@lexical/react/LexicalCharacterLimitPlugin";
5
- import { LexicalComposer as ce } from "@lexical/react/LexicalComposer";
6
- import { ContentEditable as le } from "@lexical/react/LexicalContentEditable";
7
- import { EditorRefPlugin as me } from "@lexical/react/LexicalEditorRefPlugin";
8
- import { LexicalErrorBoundary as ae } from "@lexical/react/LexicalErrorBoundary";
9
- import { HistoryPlugin as de } from "@lexical/react/LexicalHistoryPlugin";
10
- import { ListPlugin as ue } from "@lexical/react/LexicalListPlugin";
11
- import { OnChangePlugin as fe } from "@lexical/react/LexicalOnChangePlugin";
12
- import { RichTextPlugin as pe } from "@lexical/react/LexicalRichTextPlugin";
13
- import { QuoteNode as he } from "@lexical/rich-text";
14
- import b from "classnames";
15
- import { $getRoot as ge } from "lexical";
16
- import { useState as f, useId as Se, useRef as xe, useEffect as M } from "react";
17
- import { useIntl as Ce } from "react-intl";
18
- import Pe from "./EditorTheme.js";
19
- import i from "./TextEditor.module.scss.js";
20
- import { AutoSavePlugin as Te } from "./plugins/AutoSavePlugin.js";
21
- import { FocusPlugin as Ne } from "./plugins/FocusPlugin.js";
22
- import { MaxLengthPlugin as ve } from "./plugins/MaxLengthPlugin.js";
23
- import { ResetPlugin as Ee } from "./plugins/ResetPlugin.js";
24
- import { SetContentPlugin as Ie } from "./plugins/SetContentPlugin.js";
25
- import { SetRichContentPlugin as Re } from "./plugins/SetRichContentPlugin.js";
26
- import { ToolbarPlugin as be } from "./plugins/ToolbarPlugin.js";
27
- import { useModal as Me } from "../../dialog/modal/useModal.js";
28
- import { SourceModal as ye } from "../../source/source_modal/SourceModal.js";
29
- import { SourceListItem as we } from "../../source/source_list_item/SourceListItem.js";
30
- const y = (l) => l?.replace(/ /g, " "), st = ({
1
+ import { jsxs as u, Fragment as X, jsx as t } from "react/jsx-runtime";
2
+ import { ListNode as Y, ListItemNode as Z } from "@lexical/list";
3
+ import { OverflowNode as tt } from "@lexical/overflow";
4
+ import { CharacterLimitPlugin as ot } from "@lexical/react/LexicalCharacterLimitPlugin";
5
+ import { LexicalComposer as et } from "@lexical/react/LexicalComposer";
6
+ import { ContentEditable as rt } from "@lexical/react/LexicalContentEditable";
7
+ import { EditorRefPlugin as it } from "@lexical/react/LexicalEditorRefPlugin";
8
+ import { LexicalErrorBoundary as nt } from "@lexical/react/LexicalErrorBoundary";
9
+ import { HistoryPlugin as st } from "@lexical/react/LexicalHistoryPlugin";
10
+ import { ListPlugin as lt } from "@lexical/react/LexicalListPlugin";
11
+ import { OnChangePlugin as ct } from "@lexical/react/LexicalOnChangePlugin";
12
+ import { RichTextPlugin as mt } from "@lexical/react/LexicalRichTextPlugin";
13
+ import { QuoteNode as at } from "@lexical/rich-text";
14
+ import I from "classnames";
15
+ import { $getRoot as dt } from "lexical";
16
+ import { useState as a, useId as ft, useEffect as b } from "react";
17
+ import { useIntl as ut } from "react-intl";
18
+ import pt from "./EditorTheme.js";
19
+ import e from "./TextEditor.module.scss.js";
20
+ import { AutoSavePlugin as ht } from "./plugins/AutoSavePlugin.js";
21
+ import { FocusPlugin as gt } from "./plugins/FocusPlugin.js";
22
+ import { MaxLengthPlugin as xt } from "./plugins/MaxLengthPlugin.js";
23
+ import { ResetPlugin as St } from "./plugins/ResetPlugin.js";
24
+ import { SetContentPlugin as Ct } from "./plugins/SetContentPlugin.js";
25
+ import { SetRichContentPlugin as Pt } from "./plugins/SetRichContentPlugin.js";
26
+ import { ToolbarPlugin as Tt } from "./plugins/ToolbarPlugin.js";
27
+ import { useModal as vt } from "../../dialog/modal/useModal.js";
28
+ import { SourceModal as Nt } from "../../source/source_modal/SourceModal.js";
29
+ import { SourceListItem as Et } from "../../source/source_list_item/SourceListItem.js";
30
+ const M = (l) => l?.replace(/ /g, " "), to = ({
31
31
  placeholder: l,
32
- initialContent: w,
33
- initialRichContent: L,
34
- onSubmit: x,
35
- sources: p,
36
- hideSubmit: _ = !1,
37
- hideSourceAction: A = !1,
38
- onActivation: n,
39
- disabled: B = !1,
40
- handleChange: C,
41
- handleSourcesChange: h,
42
- shortBar: O = !1,
43
- active: g = !1,
44
- maxLength: m,
45
- disableRichText: U = !1,
46
- editorRef: j,
47
- uid: P,
48
- allowedDomains: T = [],
49
- hideCharCount: k = !1,
50
- disableAutoActivate: z = !1,
51
- autoFocus: a = !1,
52
- ...H
32
+ onSubmit: p,
33
+ sources: r,
34
+ hideSubmit: y = !1,
35
+ hideSourceAction: R = !1,
36
+ onActivation: h,
37
+ disabled: w = !1,
38
+ handleChange: g,
39
+ handleSourcesChange: x,
40
+ shortBar: A = !1,
41
+ active: S = !1,
42
+ maxLength: c,
43
+ disableRichText: L = !1,
44
+ editorRef: _,
45
+ uid: C,
46
+ allowedDomains: P = [],
47
+ hideCharCount: B = !1,
48
+ disableAutoActivate: F = !1,
49
+ ...O
53
50
  }) => {
54
- const [s, J] = f(a || g), [Q, W] = f(""), [$, q] = f(""), [d, u] = f([]), { showModal: D } = Me(), N = Ce(), v = Se(), E = xe(!1);
55
- M(() => {
56
- a && !E.current && n && (E.current = !0, n());
57
- }, [a, n]), M(() => {
58
- p && u(p);
59
- }, [p]);
60
- const I = () => {
61
- s || (J(!0), n && n());
62
- }, F = {
63
- editable: !B,
64
- theme: Pe,
65
- onError(t) {
66
- console.error("TextEditor error:", t);
51
+ const [n, U] = a(!1), [j, k] = a(""), [z, H] = a(""), [s, d] = a([]), { showModal: J } = vt(), T = ut(), v = ft();
52
+ b(() => {
53
+ r && r.length > 0 && d(r);
54
+ }, [r]), b(() => {
55
+ x && s.length > 0 && x(s);
56
+ }, [s]);
57
+ const N = () => {
58
+ n || (U(!0), h && h());
59
+ }, Q = {
60
+ editable: !w,
61
+ theme: pt,
62
+ onError(o) {
63
+ console.error("TextEditor error:", o);
67
64
  },
68
- nodes: [re, ie, he, ne]
69
- }, G = () => {
70
- I();
71
- }, K = (t) => {
72
- t.read(() => {
73
- const o = ge().getTextContent(), r = y(o), c = JSON.stringify(t), R = y(c);
74
- W(r), q(R), C && C(r, R);
65
+ nodes: [Y, Z, at, tt]
66
+ }, W = () => {
67
+ N();
68
+ }, $ = (o) => {
69
+ o.read(() => {
70
+ const i = dt().getTextContent(), m = M(i), f = JSON.stringify(o), E = M(f);
71
+ k(m), H(E), g && g(m, E);
75
72
  });
76
- }, V = (t) => {
77
- const o = Q, r = $, c = d;
78
- x && (t.preventDefault(), x(o, r, c)), u([]), h?.([]);
79
- }, X = () => {
80
- D(
81
- /* @__PURE__ */ e(
82
- ye,
73
+ }, q = (o) => {
74
+ const i = j, m = z, f = s;
75
+ p && (o.preventDefault(), p(i, m, f)), d([]);
76
+ }, D = () => {
77
+ J(
78
+ /* @__PURE__ */ t(
79
+ Nt,
83
80
  {
84
- onAddSource: Y,
85
- allowedSources: T
81
+ onAddSource: G,
82
+ allowedSources: P
86
83
  }
87
84
  )
88
85
  );
89
- }, Y = (t) => {
90
- u((o) => {
91
- const r = [...o, t];
92
- return h?.(r), r;
93
- });
94
- }, Z = (t) => {
95
- u((o) => {
96
- const r = o.filter(
97
- (c) => c.source_url !== t.source_url
98
- );
99
- return h?.(r), r;
100
- });
101
- }, ee = (t, o) => /* @__PURE__ */ e(
102
- we,
86
+ }, G = (o) => {
87
+ d([...s, o]);
88
+ }, K = (o, i) => /* @__PURE__ */ t(
89
+ Et,
103
90
  {
104
- publisher: t.publisher,
105
- url: t.source_url,
106
- title: t.title,
107
- index: o,
108
- onRemove: () => Z(t)
91
+ publisher: o.publisher,
92
+ url: o.source_url,
93
+ title: o.title,
94
+ index: i
109
95
  },
110
- o
111
- ), te = () => /* @__PURE__ */ e("div", { className: i.editorPlaceholder, children: l });
112
- return /* @__PURE__ */ S(oe, { children: [
113
- /* @__PURE__ */ e(ce, { initialConfig: F, children: /* @__PURE__ */ e("div", { className: i.editorContainer, onClick: G, children: /* @__PURE__ */ S(
96
+ i
97
+ ), V = () => /* @__PURE__ */ t("div", { className: e.editorPlaceholder, children: l });
98
+ return /* @__PURE__ */ u(X, { children: [
99
+ /* @__PURE__ */ t(et, { initialConfig: Q, children: /* @__PURE__ */ t("div", { className: e.editorContainer, onClick: W, children: /* @__PURE__ */ u(
114
100
  "div",
115
101
  {
116
- className: b(i.editorInner, {
117
- [i.editorInnerInactive]: !s && !g
102
+ className: I(e.editorInner, {
103
+ [e.editorInnerInactive]: !n && !S
118
104
  }),
119
105
  children: [
120
- /* @__PURE__ */ e(
121
- pe,
106
+ /* @__PURE__ */ t(
107
+ mt,
122
108
  {
123
- contentEditable: /* @__PURE__ */ e(
124
- le,
109
+ contentEditable: /* @__PURE__ */ t(
110
+ rt,
125
111
  {
126
- className: b(i.editorInput, {
127
- [i.editorInputInactive]: !s
112
+ className: I(e.editorInput, {
113
+ [e.editorInputInactive]: !n
128
114
  }),
129
- ...H
115
+ ...O
130
116
  }
131
117
  ),
132
- placeholder: l && /* @__PURE__ */ e(te, {}),
133
- ErrorBoundary: ae
118
+ placeholder: l && /* @__PURE__ */ t(V, {}),
119
+ ErrorBoundary: nt
134
120
  }
135
121
  ),
136
- /* @__PURE__ */ e(
137
- be,
122
+ /* @__PURE__ */ t(
123
+ Tt,
138
124
  {
139
- hideSourceAction: A,
140
- hideSubmit: _,
141
- disableRichText: U,
142
- shortBar: O,
143
- onSubmit: V,
144
- onAddSource: X,
145
- isActive: s || g,
146
- sourceTooltip: T?.length > 0 && N.formatMessage({
125
+ hideSourceAction: R,
126
+ hideSubmit: y,
127
+ disableRichText: L,
128
+ shortBar: A,
129
+ onSubmit: q,
130
+ onAddSource: D,
131
+ isActive: n || S,
132
+ sourceTooltip: P?.length > 0 && T.formatMessage({
147
133
  id: "input.allowed_domains_tooltip",
148
134
  defaultMessage: "With the new source function, you can add links to your article."
149
135
  })
150
136
  }
151
137
  ),
152
- s && m && !k && /* @__PURE__ */ S("div", { className: i.charactersCount, children: [
153
- /* @__PURE__ */ e(se, { maxLength: m }),
138
+ n && c && !B && /* @__PURE__ */ u("div", { className: e.charactersCount, children: [
139
+ /* @__PURE__ */ t(ot, { maxLength: c }),
154
140
  " ",
155
- N.formatMessage({
141
+ T.formatMessage({
156
142
  id: "input.remaining_chars",
157
143
  defaultMessage: "remaining characters"
158
144
  })
159
145
  ] }),
160
- /* @__PURE__ */ e(ue, {}),
161
- /* @__PURE__ */ e(de, {}),
162
- /* @__PURE__ */ e(fe, { onChange: K, ignoreSelectionChange: !0 }),
163
- /* @__PURE__ */ e(
164
- Te,
146
+ /* @__PURE__ */ t(lt, {}),
147
+ /* @__PURE__ */ t(st, {}),
148
+ /* @__PURE__ */ t(ct, { onChange: $, ignoreSelectionChange: !0 }),
149
+ /* @__PURE__ */ t(
150
+ ht,
165
151
  {
166
- onSetContent: z ? () => {
167
- } : I,
168
- storageUid: P || v
152
+ onSetContent: F ? () => {
153
+ } : N,
154
+ storageUid: C || v
169
155
  }
170
156
  ),
171
- /* @__PURE__ */ e(Ie, { content: w }),
172
- /* @__PURE__ */ e(Re, { richContent: L }),
173
- /* @__PURE__ */ e(Ne, { autoFocus: a }),
174
- m && /* @__PURE__ */ e(ve, { maxLength: m }),
175
- /* @__PURE__ */ e(Ee, { storageUid: P || v }),
176
- /* @__PURE__ */ e(me, { editorRef: j })
157
+ /* @__PURE__ */ t(Ct, {}),
158
+ /* @__PURE__ */ t(Pt, {}),
159
+ /* @__PURE__ */ t(gt, {}),
160
+ c && /* @__PURE__ */ t(xt, { maxLength: c }),
161
+ /* @__PURE__ */ t(St, { storageUid: C || v }),
162
+ /* @__PURE__ */ t(it, { editorRef: _ })
177
163
  ]
178
164
  }
179
165
  ) }) }),
180
- d && d.length !== 0 ? /* @__PURE__ */ e("div", { className: i.sourcesBox, children: /* @__PURE__ */ e("div", { className: i.sourceList, children: d.map(ee) }) }) : null
166
+ r && r.length !== 0 ? /* @__PURE__ */ t("div", { className: e.sourcesBox, children: /* @__PURE__ */ t("div", { className: e.sourceList, children: r.map(K) }) }) : null
181
167
  ] });
182
168
  };
183
169
  export {
184
- st as TextEditor
170
+ to as TextEditor
185
171
  };
@@ -1,4 +1,4 @@
1
- import '../../../assets/components/input/text_editor/TextEditor.module-CxuSL3l3.css';const t = "_ltr_1k7lj_3", e = "_editorContainer_1k7lj_7", o = "_editorInner_1k7lj_14", r = "_editorInnerInactive_1k7lj_18", i = "_editorPlaceholder_1k7lj_23", n = "_editorInput_1k7lj_35", d = "_editorInputInactive_1k7lj_46", _ = "_editorTextBold_1k7lj_51", s = "_editorTextItalic_1k7lj_55", l = "_editorTextUnderline_1k7lj_59", c = "_editorTextStrikethrough_1k7lj_63", a = "_editorTextUnderlineStrikethrough_1k7lj_67", I = "_editorParagraph_1k7lj_71", k = "_editorQuote_1k7lj_81", u = "_editorListOl_1k7lj_91", h = "_editorListItem_1k7lj_98", j = "_editorNestedListItem_1k7lj_105", x = "_sourcesBox_1k7lj_118", T = "_sourceList_1k7lj_129", L = "_charactersCount_1k7lj_140", p = {
1
+ import '../../../assets/components/input/text_editor/TextEditor.module-DePSfOvG.css';const t = "_ltr_1m7ly_3", e = "_editorContainer_1m7ly_7", o = "_editorInner_1m7ly_14", r = "_editorInnerInactive_1m7ly_18", i = "_editorPlaceholder_1m7ly_23", n = "_editorInput_1m7ly_35", d = "_editorInputInactive_1m7ly_46", _ = "_editorTextBold_1m7ly_51", s = "_editorTextItalic_1m7ly_55", l = "_editorTextUnderline_1m7ly_59", c = "_editorTextStrikethrough_1m7ly_63", a = "_editorTextUnderlineStrikethrough_1m7ly_67", I = "_editorParagraph_1m7ly_71", m = "_editorQuote_1m7ly_81", u = "_editorListOl_1m7ly_91", h = "_editorListItem_1m7ly_98", y = "_editorNestedListItem_1m7ly_105", x = "_sourcesBox_1m7ly_118", T = "_sourceList_1m7ly_129", L = "_charactersCount_1m7ly_140", p = {
2
2
  ltr: t,
3
3
  editorContainer: e,
4
4
  editorInner: o,
@@ -12,10 +12,10 @@ import '../../../assets/components/input/text_editor/TextEditor.module-CxuSL3l3.
12
12
  editorTextStrikethrough: c,
13
13
  editorTextUnderlineStrikethrough: a,
14
14
  editorParagraph: I,
15
- editorQuote: k,
15
+ editorQuote: m,
16
16
  editorListOl: u,
17
17
  editorListItem: h,
18
- editorNestedListItem: j,
18
+ editorNestedListItem: y,
19
19
  sourcesBox: x,
20
20
  sourceList: T,
21
21
  charactersCount: L
@@ -30,10 +30,10 @@ export {
30
30
  d as editorInputInactive,
31
31
  h as editorListItem,
32
32
  u as editorListOl,
33
- j as editorNestedListItem,
33
+ y as editorNestedListItem,
34
34
  I as editorParagraph,
35
35
  i as editorPlaceholder,
36
- k as editorQuote,
36
+ m as editorQuote,
37
37
  _ as editorTextBold,
38
38
  s as editorTextItalic,
39
39
  c as editorTextStrikethrough,
@@ -1,18 +1,14 @@
1
- import { useLexicalComposerContext as u } from "@lexical/react/LexicalComposerContext";
2
- import { useRef as c, useEffect as s } from "react";
3
- import { useInput as f } from "../../input_provider/useInput.js";
4
- const E = ({ autoFocus: t = !1 }) => {
5
- const [o] = u(), { focus: e } = f(), r = c(!1);
6
- return s(() => {
7
- e && o.focus(() => {
1
+ import { useLexicalComposerContext as e } from "@lexical/react/LexicalComposerContext";
2
+ import { useEffect as r } from "react";
3
+ import { useInput as n } from "../../input_provider/useInput.js";
4
+ const f = () => {
5
+ const [o] = e(), { focus: t } = n();
6
+ return r(() => {
7
+ t && o.focus(() => {
8
8
  o.getRootElement().focus();
9
9
  });
10
- }, [e, o]), s(() => {
11
- t && !r.current && (r.current = !0, o.focus(() => {
12
- o.getRootElement().focus();
13
- }));
14
10
  }, [t, o]), null;
15
11
  };
16
12
  export {
17
- E as FocusPlugin
13
+ f as FocusPlugin
18
14
  };
@@ -1,18 +1,18 @@
1
- import { useLexicalComposerContext as s } from "@lexical/react/LexicalComposerContext";
2
- import { $getRoot as a, $createParagraphNode as c, $createTextNode as u } from "lexical";
3
- import { useEffect as f } from "react";
4
- import { useInput as m } from "../../input_provider/useInput.js";
5
- const x = ({ content: e }) => {
6
- const [p] = s(), { inputContent: o, setInputContent: i } = m(), t = e || (typeof o == "string" ? o : void 0);
7
- return f(() => {
8
- typeof t == "string" && t && p.update(() => {
9
- const n = a();
10
- n.clear();
11
- const r = c();
12
- r.append(u(t)), n.append(r), !e && o && i(null);
1
+ import { useLexicalComposerContext as p } from "@lexical/react/LexicalComposerContext";
2
+ import { $getRoot as u, $createParagraphNode as a, $createTextNode as c } from "lexical";
3
+ import { useEffect as s } from "react";
4
+ import { useInput as i } from "../../input_provider/useInput.js";
5
+ const C = () => {
6
+ const [n] = p(), { inputContent: t, setInputContent: r } = i();
7
+ return s(() => {
8
+ t && n.update(() => {
9
+ const e = u();
10
+ e.clear();
11
+ const o = a();
12
+ o.append(c(t)), e.append(o), r(null);
13
13
  });
14
14
  }, [t]), null;
15
15
  };
16
16
  export {
17
- x as SetContentPlugin
17
+ C as SetContentPlugin
18
18
  };
@@ -1,14 +1,14 @@
1
- import { useLexicalComposerContext as s } from "@lexical/react/LexicalComposerContext";
2
- import { useEffect as u } from "react";
3
- import { useInput as c } from "../../input_provider/useInput.js";
4
- const m = ({ richContent: e }) => {
5
- const [t] = s(), { inputRichContent: n, setInputRichContent: i } = c(), o = e || n;
6
- return u(() => {
7
- o && t.update(() => {
8
- const r = t.parseEditorState(o);
9
- t.setEditorState(r), !e && n && i(null);
1
+ import { useLexicalComposerContext as r } from "@lexical/react/LexicalComposerContext";
2
+ import { useEffect as i } from "react";
3
+ import { useInput as s } from "../../input_provider/useInput.js";
4
+ const m = () => {
5
+ const [t] = r(), { inputRichContent: e, setInputRichContent: o } = s();
6
+ return i(() => {
7
+ e && t.update(() => {
8
+ const n = t.parseEditorState(e);
9
+ t.setEditorState(n), o(null);
10
10
  });
11
- }, [o]), null;
11
+ }, [e]), null;
12
12
  };
13
13
  export {
14
14
  m as SetRichContentPlugin