@logora/debate 0.3.8 → 0.3.10

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 (133) hide show
  1. package/dist/assets/components/argument/argument/Argument.module-gLfNRLks.css +1 -0
  2. package/dist/assets/components/dialog/dropdown/Dropdown.module-B6DdHxbY.css +1 -0
  3. package/dist/assets/components/gamification/point_box/PointBox.module-BlHdQyht.css +1 -0
  4. package/dist/assets/components/vote/vote_box/VoteBox.module-Dss3uPgM.css +1 -0
  5. package/dist/assets/components/vote/vote_button/VoteButton.module-BdTTr7vk.css +1 -0
  6. package/dist/components/argument/argument/Argument.js +15 -15
  7. package/dist/components/argument/argument/Argument.module.scss.js +30 -30
  8. package/dist/components/dialog/dropdown/Dropdown.module.scss.js +1 -1
  9. package/dist/components/gamification/point_box/PointBox.module.scss.js +1 -1
  10. package/dist/components/icons/bild_icons/index.js +102 -104
  11. package/dist/components/icons/hero_icons/index.js +66 -68
  12. package/dist/components/icons/krone_icons/index.js +98 -100
  13. package/dist/components/icons/regular_icons/index.js +22 -24
  14. package/dist/components/icons/spiegel_icons/index.js +100 -102
  15. package/dist/components/input/text_editor/TextEditor.js +108 -108
  16. package/dist/components/vote/vote_box/VoteBox.js +113 -121
  17. package/dist/components/vote/vote_box/VoteBox.module.scss.js +54 -50
  18. package/dist/components/vote/vote_button/VoteButton.module.scss.js +2 -2
  19. package/package.json +15 -14
  20. package/dist/assets/components/argument/argument/Argument.module-ynS4ZRdG.css +0 -1
  21. package/dist/assets/components/dialog/dropdown/Dropdown.module-BL67cFpj.css +0 -1
  22. package/dist/assets/components/gamification/point_box/PointBox.module-BzKRidYf.css +0 -1
  23. package/dist/assets/components/vote/vote_box/VoteBox.module-BhTSjU8w.css +0 -1
  24. package/dist/assets/components/vote/vote_button/VoteButton.module-mxq12D3_.css +0 -1
  25. package/dist/components/icons/bild_icons/Alarm.js +0 -13
  26. package/dist/components/icons/bild_icons/Announcement.js +0 -15
  27. package/dist/components/icons/bild_icons/Arrow.js +0 -6
  28. package/dist/components/icons/bild_icons/Blockquote.js +0 -6
  29. package/dist/components/icons/bild_icons/Bold.js +0 -6
  30. package/dist/components/icons/bild_icons/Camera.js +0 -9
  31. package/dist/components/icons/bild_icons/CheckCircle.js +0 -22
  32. package/dist/components/icons/bild_icons/Checkbox.js +0 -9
  33. package/dist/components/icons/bild_icons/Clock.js +0 -6
  34. package/dist/components/icons/bild_icons/Close.js +0 -6
  35. package/dist/components/icons/bild_icons/Code.js +0 -36
  36. package/dist/components/icons/bild_icons/Community.js +0 -6
  37. package/dist/components/icons/bild_icons/Document.js +0 -6
  38. package/dist/components/icons/bild_icons/Downvote.js +0 -6
  39. package/dist/components/icons/bild_icons/Facebook.js +0 -6
  40. package/dist/components/icons/bild_icons/Flag.js +0 -6
  41. package/dist/components/icons/bild_icons/Home.js +0 -6
  42. package/dist/components/icons/bild_icons/Italic.js +0 -6
  43. package/dist/components/icons/bild_icons/Link.js +0 -9
  44. package/dist/components/icons/bild_icons/Logora.js +0 -56
  45. package/dist/components/icons/bild_icons/Mail.js +0 -6
  46. package/dist/components/icons/bild_icons/MinusCircle.js +0 -21
  47. package/dist/components/icons/bild_icons/MobileMenu.js +0 -29
  48. package/dist/components/icons/bild_icons/Next.js +0 -23
  49. package/dist/components/icons/bild_icons/OpenBlank.js +0 -21
  50. package/dist/components/icons/bild_icons/OrderedList.js +0 -6
  51. package/dist/components/icons/bild_icons/Point.js +0 -25
  52. package/dist/components/icons/bild_icons/Question.js +0 -15
  53. package/dist/components/icons/bild_icons/Refresh.js +0 -9
  54. package/dist/components/icons/bild_icons/Reply.js +0 -9
  55. package/dist/components/icons/bild_icons/Search.js +0 -6
  56. package/dist/components/icons/bild_icons/Send.js +0 -6
  57. package/dist/components/icons/bild_icons/Share.js +0 -15
  58. package/dist/components/icons/bild_icons/SmallArrow.js +0 -6
  59. package/dist/components/icons/bild_icons/Source.js +0 -6
  60. package/dist/components/icons/bild_icons/Suggestion.js +0 -25
  61. package/dist/components/icons/bild_icons/Twitter.js +0 -44
  62. package/dist/components/icons/bild_icons/Underline.js +0 -6
  63. package/dist/components/icons/bild_icons/Upvote.js +0 -6
  64. package/dist/components/icons/bild_icons/User.js +0 -6
  65. package/dist/components/icons/bild_icons/Versus.js +0 -12
  66. package/dist/components/icons/bild_icons/Votebox.js +0 -15
  67. package/dist/components/icons/hero_icons/CheckCircle.js +0 -22
  68. package/dist/components/icons/hero_icons/Facebook.js +0 -6
  69. package/dist/components/icons/hero_icons/Flag.js +0 -6
  70. package/dist/components/icons/hero_icons/Logora.js +0 -56
  71. package/dist/components/icons/hero_icons/MinusCircle.js +0 -21
  72. package/dist/components/icons/hero_icons/Point.js +0 -25
  73. package/dist/components/icons/hero_icons/Twitter.js +0 -44
  74. package/dist/components/icons/hero_icons/Versus.js +0 -24
  75. package/dist/components/icons/krone_icons/Arrow.js +0 -6
  76. package/dist/components/icons/krone_icons/Blockquote.js +0 -6
  77. package/dist/components/icons/krone_icons/Bold.js +0 -6
  78. package/dist/components/icons/krone_icons/Camera.js +0 -9
  79. package/dist/components/icons/krone_icons/Check.js +0 -6
  80. package/dist/components/icons/krone_icons/CheckCircle.js +0 -22
  81. package/dist/components/icons/krone_icons/Clock.js +0 -6
  82. package/dist/components/icons/krone_icons/Close.js +0 -6
  83. package/dist/components/icons/krone_icons/Code.js +0 -36
  84. package/dist/components/icons/krone_icons/Community.js +0 -6
  85. package/dist/components/icons/krone_icons/Crown.js +0 -6
  86. package/dist/components/icons/krone_icons/Document.js +0 -6
  87. package/dist/components/icons/krone_icons/Downvote.js +0 -6
  88. package/dist/components/icons/krone_icons/Facebook.js +0 -6
  89. package/dist/components/icons/krone_icons/Flag.js +0 -6
  90. package/dist/components/icons/krone_icons/Italic.js +0 -6
  91. package/dist/components/icons/krone_icons/LightArrow.js +0 -6
  92. package/dist/components/icons/krone_icons/Link.js +0 -9
  93. package/dist/components/icons/krone_icons/Login.js +0 -30
  94. package/dist/components/icons/krone_icons/Logora.js +0 -56
  95. package/dist/components/icons/krone_icons/Mail.js +0 -6
  96. package/dist/components/icons/krone_icons/MinusCircle.js +0 -21
  97. package/dist/components/icons/krone_icons/MobileClose.js +0 -15
  98. package/dist/components/icons/krone_icons/MobileMenu.js +0 -29
  99. package/dist/components/icons/krone_icons/Next.js +0 -23
  100. package/dist/components/icons/krone_icons/OpenBlank.js +0 -21
  101. package/dist/components/icons/krone_icons/OrderedList.js +0 -6
  102. package/dist/components/icons/krone_icons/PauseCircle.js +0 -22
  103. package/dist/components/icons/krone_icons/Point.js +0 -25
  104. package/dist/components/icons/krone_icons/Refresh.js +0 -9
  105. package/dist/components/icons/krone_icons/Search.js +0 -6
  106. package/dist/components/icons/krone_icons/SmallArrow.js +0 -6
  107. package/dist/components/icons/krone_icons/Source.js +0 -6
  108. package/dist/components/icons/krone_icons/Twitter.js +0 -44
  109. package/dist/components/icons/krone_icons/Underline.js +0 -6
  110. package/dist/components/icons/krone_icons/Versus.js +0 -6
  111. package/dist/components/icons/regular_icons/Versus.js +0 -6
  112. package/dist/components/icons/spiegel_icons/Alarm.js +0 -13
  113. package/dist/components/icons/spiegel_icons/Announcement.js +0 -15
  114. package/dist/components/icons/spiegel_icons/Arrow.js +0 -6
  115. package/dist/components/icons/spiegel_icons/Camera.js +0 -9
  116. package/dist/components/icons/spiegel_icons/Check.js +0 -6
  117. package/dist/components/icons/spiegel_icons/Code.js +0 -36
  118. package/dist/components/icons/spiegel_icons/Community.js +0 -6
  119. package/dist/components/icons/spiegel_icons/Downvote.js +0 -6
  120. package/dist/components/icons/spiegel_icons/Home.js +0 -6
  121. package/dist/components/icons/spiegel_icons/Logora.js +0 -56
  122. package/dist/components/icons/spiegel_icons/MobileMenu.js +0 -29
  123. package/dist/components/icons/spiegel_icons/Next.js +0 -23
  124. package/dist/components/icons/spiegel_icons/OpenBlank.js +0 -21
  125. package/dist/components/icons/spiegel_icons/Point.js +0 -25
  126. package/dist/components/icons/spiegel_icons/Refresh.js +0 -9
  127. package/dist/components/icons/spiegel_icons/Search.js +0 -6
  128. package/dist/components/icons/spiegel_icons/Send.js +0 -6
  129. package/dist/components/icons/spiegel_icons/Source.js +0 -6
  130. package/dist/components/icons/spiegel_icons/Twitter.js +0 -44
  131. package/dist/components/icons/spiegel_icons/Upvote.js +0 -6
  132. package/dist/components/icons/spiegel_icons/User.js +0 -6
  133. package/dist/components/icons/spiegel_icons/Versus.js +0 -12
@@ -1,91 +1,91 @@
1
- import { jsxs as d, Fragment as K, jsx as t } from "react/jsx-runtime";
2
- import { ListNode as V, ListItemNode as X } from "@lexical/list";
3
- import { OverflowNode as Y } from "@lexical/overflow";
4
- import { CharacterLimitPlugin as Z } from "@lexical/react/LexicalCharacterLimitPlugin";
5
- import { LexicalComposer as tt } from "@lexical/react/LexicalComposer";
6
- import { ContentEditable as ot } from "@lexical/react/LexicalContentEditable";
7
- import { EditorRefPlugin as et } from "@lexical/react/LexicalEditorRefPlugin";
8
- import { LexicalErrorBoundary as rt } from "@lexical/react/LexicalErrorBoundary";
9
- import { HistoryPlugin as it } from "@lexical/react/LexicalHistoryPlugin";
10
- import { ListPlugin as nt } from "@lexical/react/LexicalListPlugin";
11
- import { OnChangePlugin as st } from "@lexical/react/LexicalOnChangePlugin";
12
- import { RichTextPlugin as lt } from "@lexical/react/LexicalRichTextPlugin";
13
- import { QuoteNode as mt } from "@lexical/rich-text";
14
- import N from "classnames";
15
- import { $getRoot as ct } from "lexical";
16
- import { useState as c, useId as at, useEffect as T } from "react";
17
- import { useIntl as dt } from "react-intl";
18
- import ft from "./EditorTheme.js";
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
19
  import e from "./TextEditor.module.scss.js";
20
- import { AutoSavePlugin as ut } from "./plugins/AutoSavePlugin.js";
21
- import { FocusPlugin as pt } from "./plugins/FocusPlugin.js";
22
- import { MaxLengthPlugin as ht } from "./plugins/MaxLengthPlugin.js";
23
- import { ResetPlugin as gt } from "./plugins/ResetPlugin.js";
24
- import { SetContentPlugin as St } from "./plugins/SetContentPlugin.js";
25
- import { SetRichContentPlugin as xt } from "./plugins/SetRichContentPlugin.js";
26
- import { ToolbarPlugin as Ct } from "./plugins/ToolbarPlugin.js";
27
- import { useModal as Pt } from "../../dialog/modal/useModal.js";
28
- import { SourceModal as vt } from "../../source/source_modal/SourceModal.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
29
  import { SourceListItem as Et } from "../../source/source_list_item/SourceListItem.js";
30
- const Yt = ({
31
- placeholder: f,
32
- onSubmit: u,
30
+ const M = (l) => l?.replace(/ /g, " "), to = ({
31
+ placeholder: l,
32
+ onSubmit: p,
33
33
  sources: r,
34
- hideSubmit: I = !1,
35
- hideSourceAction: M = !1,
36
- onActivation: p,
37
- disabled: y = !1,
38
- handleChange: h,
39
- handleSourcesChange: g,
40
- shortBar: b = !1,
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
41
  active: S = !1,
42
- maxLength: l,
43
- disableRichText: R = !1,
44
- editorRef: A,
45
- uid: x,
46
- allowedDomains: C = [],
47
- hideCharCount: L = !1,
48
- disableAutoActivate: w = !1,
49
- ..._
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
50
50
  }) => {
51
- const [n, B] = c(!1), [F, O] = c(""), [U, j] = c(""), [s, a] = c([]), { showModal: k } = Pt(), P = dt(), v = at();
52
- T(() => {
53
- r && r.length > 0 && a(r);
54
- }, [r]), T(() => {
55
- g && s.length > 0 && g(s);
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
56
  }, [s]);
57
- const E = () => {
58
- n || (B(!0), p && p());
59
- }, H = {
60
- editable: !y,
61
- theme: ft,
57
+ const N = () => {
58
+ n || (U(!0), h && h());
59
+ }, Q = {
60
+ editable: !w,
61
+ theme: pt,
62
62
  onError(o) {
63
63
  console.error("TextEditor error:", o);
64
64
  },
65
- nodes: [V, X, mt, Y]
66
- }, J = () => {
67
- E();
68
- }, Q = (o) => {
65
+ nodes: [Y, Z, at, tt]
66
+ }, W = () => {
67
+ N();
68
+ }, $ = (o) => {
69
69
  o.read(() => {
70
- const i = ct().getTextContent(), m = JSON.stringify(o);
71
- O(i), j(m), h && h(i, m);
70
+ const i = dt().getTextContent(), m = M(i), f = JSON.stringify(o), E = M(f);
71
+ k(m), H(E), g && g(m, E);
72
72
  });
73
- }, W = (o) => {
74
- const i = F, m = U, G = s;
75
- u && (o.preventDefault(), u(i, m, G)), a([]);
76
- }, $ = () => {
77
- k(
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
78
  /* @__PURE__ */ t(
79
- vt,
79
+ Nt,
80
80
  {
81
- onAddSource: q,
82
- allowedSources: C
81
+ onAddSource: G,
82
+ allowedSources: P
83
83
  }
84
84
  )
85
85
  );
86
- }, q = (o) => {
87
- a([...s, o]);
88
- }, z = (o, i) => /* @__PURE__ */ t(
86
+ }, G = (o) => {
87
+ d([...s, o]);
88
+ }, K = (o, i) => /* @__PURE__ */ t(
89
89
  Et,
90
90
  {
91
91
  publisher: o.publisher,
@@ -94,78 +94,78 @@ const Yt = ({
94
94
  index: i
95
95
  },
96
96
  i
97
- ), D = () => /* @__PURE__ */ t("div", { className: e.editorPlaceholder, children: f });
98
- return /* @__PURE__ */ d(K, { children: [
99
- /* @__PURE__ */ t(tt, { initialConfig: H, children: /* @__PURE__ */ t("div", { className: e.editorContainer, onClick: J, children: /* @__PURE__ */ d(
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(
100
100
  "div",
101
101
  {
102
- className: N(e.editorInner, {
102
+ className: I(e.editorInner, {
103
103
  [e.editorInnerInactive]: !n && !S
104
104
  }),
105
105
  children: [
106
106
  /* @__PURE__ */ t(
107
- lt,
107
+ mt,
108
108
  {
109
109
  contentEditable: /* @__PURE__ */ t(
110
- ot,
110
+ rt,
111
111
  {
112
- className: N(e.editorInput, {
112
+ className: I(e.editorInput, {
113
113
  [e.editorInputInactive]: !n
114
114
  }),
115
- ..._
115
+ ...O
116
116
  }
117
117
  ),
118
- placeholder: f && /* @__PURE__ */ t(D, {}),
119
- ErrorBoundary: rt
118
+ placeholder: l && /* @__PURE__ */ t(V, {}),
119
+ ErrorBoundary: nt
120
120
  }
121
121
  ),
122
122
  /* @__PURE__ */ t(
123
- Ct,
123
+ Tt,
124
124
  {
125
- hideSourceAction: M,
126
- hideSubmit: I,
127
- disableRichText: R,
128
- shortBar: b,
129
- onSubmit: W,
130
- onAddSource: $,
125
+ hideSourceAction: R,
126
+ hideSubmit: y,
127
+ disableRichText: L,
128
+ shortBar: A,
129
+ onSubmit: q,
130
+ onAddSource: D,
131
131
  isActive: n || S,
132
- sourceTooltip: C?.length > 0 && P.formatMessage({
132
+ sourceTooltip: P?.length > 0 && T.formatMessage({
133
133
  id: "input.allowed_domains_tooltip",
134
134
  defaultMessage: "With the new source function, you can add links to your article."
135
135
  })
136
136
  }
137
137
  ),
138
- n && l && !L && /* @__PURE__ */ d("div", { className: e.charactersCount, children: [
139
- /* @__PURE__ */ t(Z, { maxLength: l }),
138
+ n && c && !B && /* @__PURE__ */ u("div", { className: e.charactersCount, children: [
139
+ /* @__PURE__ */ t(ot, { maxLength: c }),
140
140
  " ",
141
- P.formatMessage({
141
+ T.formatMessage({
142
142
  id: "input.remaining_chars",
143
143
  defaultMessage: "remaining characters"
144
144
  })
145
145
  ] }),
146
- /* @__PURE__ */ t(nt, {}),
147
- /* @__PURE__ */ t(it, {}),
148
- /* @__PURE__ */ t(st, { onChange: Q, ignoreSelectionChange: !0 }),
146
+ /* @__PURE__ */ t(lt, {}),
147
+ /* @__PURE__ */ t(st, {}),
148
+ /* @__PURE__ */ t(ct, { onChange: $, ignoreSelectionChange: !0 }),
149
149
  /* @__PURE__ */ t(
150
- ut,
150
+ ht,
151
151
  {
152
- onSetContent: w ? () => {
153
- } : E,
154
- storageUid: x || v
152
+ onSetContent: F ? () => {
153
+ } : N,
154
+ storageUid: C || v
155
155
  }
156
156
  ),
157
- /* @__PURE__ */ t(St, {}),
158
- /* @__PURE__ */ t(xt, {}),
159
- /* @__PURE__ */ t(pt, {}),
160
- l && /* @__PURE__ */ t(ht, { maxLength: l }),
161
- /* @__PURE__ */ t(gt, { storageUid: x || v }),
162
- /* @__PURE__ */ t(et, { editorRef: A })
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: _ })
163
163
  ]
164
164
  }
165
165
  ) }) }),
166
- r && r.length !== 0 ? /* @__PURE__ */ t("div", { className: e.sourcesBox, children: /* @__PURE__ */ t("div", { className: e.sourceList, children: r.map(z) }) }) : null
166
+ r && r.length !== 0 ? /* @__PURE__ */ t("div", { className: e.sourcesBox, children: /* @__PURE__ */ t("div", { className: e.sourceList, children: r.map(K) }) }) : null
167
167
  ] });
168
168
  };
169
169
  export {
170
- Yt as TextEditor
170
+ to as TextEditor
171
171
  };