@logora/debate 0.4.101 → 0.4.103

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,42 +1,86 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { useEffect as m } from "react";
3
- import r from "./AdUnit.module.scss.js";
4
- const v = ({
5
- id: n,
6
- adPath: s,
7
- sizes: a = [],
8
- targeting: l,
9
- enableDidomi: g = !1
1
+ import { jsx as g } from "react/jsx-runtime";
2
+ import { useRef as w, useEffect as R } from "react";
3
+ import v from "./AdUnit.module.scss.js";
4
+ const E = 3e4, x = ({
5
+ id: c,
6
+ adPath: a,
7
+ sizes: L = [],
8
+ targeting: N,
9
+ enableDidomi: I = !1,
10
+ refresh: f = !1,
11
+ refreshInterval: m = E
10
12
  }) => {
11
- if (!n || !s)
12
- return null;
13
- const e = `div-gpt-ad-${n}`;
14
- return m(() => {
15
- if (typeof window < "u" && e && s) {
16
- const o = window.googletag || (window.googletag = { cmd: [] });
17
- let i;
18
- return o.cmd.push(() => {
19
- i = o.defineSlot(s, a, e).setTargeting("origine", ["logora"]).addService(o.pubads());
20
- for (const [d, c] of Object.entries(l || {}))
21
- i.setTargeting(d, c);
22
- o.display(e), o.pubads().refresh([i]);
23
- }), () => {
24
- const d = window.googletag || { cmd: [] };
25
- d.cmd.push(() => {
26
- d.destroySlots([i]);
27
- });
28
- };
29
- }
30
- }, []), g === !0 ? /* @__PURE__ */ t(
13
+ const r = `div-gpt-ad-${c}`, o = w(null), s = w(null), p = w(!1), h = w(null);
14
+ return R(() => {
15
+ if (typeof window > "u" || !c || !a)
16
+ return;
17
+ const t = window.googletag || (window.googletag = { cmd: [] });
18
+ let b = !1;
19
+ return t.cmd.push(() => {
20
+ if (b)
21
+ return;
22
+ const n = t.pubads(), l = n.getSlots().filter((e) => e.getSlotElementId() === r);
23
+ l.length > 0 && t.destroySlots(l);
24
+ const i = t.defineSlot(a, L, r);
25
+ if (i) {
26
+ i.setTargeting("origine", ["logora"]);
27
+ for (const [e, u] of Object.entries(N || {}))
28
+ i.setTargeting(e, u);
29
+ i.setConfig({ collapseDiv: "ON_NO_FILL" }), i.addService(n), o.current = i, t.display(r), n.isInitialLoadDisabled() && n.refresh([i]);
30
+ }
31
+ }), () => {
32
+ b = !0;
33
+ const n = o.current;
34
+ o.current = null, !(typeof window > "u" || !window.googletag || !n) && window.googletag.cmd.push(() => {
35
+ window.googletag.destroySlots([n]);
36
+ });
37
+ };
38
+ }, [c, a]), R(() => {
39
+ const t = h.current, n = t !== null && t.divId === r && f === !0 && (t.refresh !== !0 || t.refreshInterval !== m);
40
+ if (h.current = { refresh: f, refreshInterval: m, divId: r }, typeof window > "u" || f !== !0 || !c || !a)
41
+ return;
42
+ const l = window.googletag || (window.googletag = { cmd: [] }), i = Math.max(m, E);
43
+ let e = !1, u = null;
44
+ const T = () => {
45
+ const d = o.current;
46
+ e || !d || l.cmd.push(() => {
47
+ e || l.pubads().refresh([d]);
48
+ });
49
+ }, y = () => {
50
+ e || s.current || (s.current = setTimeout(() => {
51
+ if (s.current = null, !(e || !o.current)) {
52
+ if (document.visibilityState !== "visible") {
53
+ p.current = !0;
54
+ return;
55
+ }
56
+ T();
57
+ }
58
+ }, i));
59
+ }, S = () => {
60
+ document.visibilityState === "visible" && p.current && !e && (p.current = !1, y());
61
+ };
62
+ return l.cmd.push(() => {
63
+ e || !o.current || (u = (d) => {
64
+ d.slot !== o.current || s.current || y();
65
+ }, l.pubads().addEventListener("impressionViewable", u), n && document.visibilityState === "visible" && y());
66
+ }), document.addEventListener("visibilitychange", S), () => {
67
+ e = !0, s.current && (clearTimeout(s.current), s.current = null), p.current = !1;
68
+ const d = u;
69
+ u = null, document.removeEventListener("visibilitychange", S), !(typeof window > "u" || !window.googletag || !d) && window.googletag.cmd.push(() => {
70
+ window.googletag.pubads().removeEventListener("impressionViewable", d);
71
+ });
72
+ };
73
+ }, [f, m, r]), !c || !a ? null : I === !0 ? /* @__PURE__ */ g(
31
74
  "script",
32
75
  {
33
76
  type: "didomi/html",
34
77
  "data-vendor": "didomi:google",
35
78
  "data-purposes": "cookies",
36
- children: /* @__PURE__ */ t("div", { className: r.adContainer, children: /* @__PURE__ */ t("div", { className: r.adUnit, id: e }) })
79
+ children: /* @__PURE__ */ g("div", { className: v.adContainer, children: /* @__PURE__ */ g("div", { className: v.adUnit, id: r }) })
37
80
  }
38
- ) : /* @__PURE__ */ t("div", { className: r.adContainer, children: /* @__PURE__ */ t("div", { className: r.adUnit, id: e }) });
81
+ ) : /* @__PURE__ */ g("div", { className: v.adContainer, children: /* @__PURE__ */ g("div", { className: v.adUnit, id: r }) });
39
82
  };
40
83
  export {
41
- v as AdUnit
84
+ x as AdUnit,
85
+ E as MIN_REFRESH_INTERVAL
42
86
  };
@@ -1,22 +1,30 @@
1
- import { useEffect as i } from "react";
2
- const n = (o = !0, s = !1, d = 8e3) => (i(() => {
3
- if (o === !0 && typeof window < "u") {
4
- if (!window.googletag?.apiReady) {
5
- const e = document.createElement("script");
6
- e.src = "https://securepubads.g.doubleclick.net/tag/js/gpt.js", e.async = !0, s === !0 && (e.type = "didomi/javascript", e.setAttribute("data-vendor-raw", "didomi:google"), e.setAttribute("data-purposes", "cookies")), document.body.appendChild(e);
7
- }
8
- const t = window.googletag || (window.googletag = { cmd: [] });
9
- t.cmd.push(() => {
10
- t.pubads().enableSingleRequest(), t.pubads().disableInitialLoad(), t.enableServices(), t.pubads().addEventListener("impressionViewable", (e) => {
11
- setTimeout(() => {
12
- t.cmd.push(() => {
13
- t.pubads().refresh([e.slot]);
14
- });
15
- }, d);
16
- });
17
- });
18
- }
1
+ import { useLayoutEffect as r, useEffect as n } from "react";
2
+ const s = "https://securepubads.g.doubleclick.net/tag/js/gpt.js", i = () => {
3
+ if (typeof window > "u" || typeof document > "u" || window.googletag && window.googletag.apiReady)
4
+ return !0;
5
+ const t = document.querySelectorAll("script[src]");
6
+ for (const e of t)
7
+ if (/\/gpt\.js(\?|$)/.test(e.src))
8
+ return !0;
9
+ return !1;
10
+ }, u = (t = !1) => {
11
+ if (i())
12
+ return !1;
13
+ const e = document.createElement("script");
14
+ return e.src = s, e.async = !0, t === !0 && (e.type = "didomi/javascript", e.setAttribute("data-vendor-raw", "didomi:google"), e.setAttribute("data-purposes", "cookies")), document.body.appendChild(e), !0;
15
+ };
16
+ let o = !1;
17
+ const c = () => {
18
+ if (typeof window > "u" || o)
19
+ return;
20
+ const t = window.googletag || (window.googletag = { cmd: [] });
21
+ o = !0, t.cmd.push(() => {
22
+ t.enableServices();
23
+ });
24
+ }, d = typeof window < "u" ? r : n, a = (t = !0, e = !1) => (d(() => {
25
+ t !== !0 || typeof window > "u" || u(e) && c();
19
26
  }, []), null);
20
27
  export {
21
- n as useGoogleAdManager
28
+ s as GPT_SRC,
29
+ a as useGoogleAdManager
22
30
  };
@@ -1,29 +1,33 @@
1
- import { jsxs as l, Fragment as p, jsx as i } from "react/jsx-runtime";
2
- import j from "react";
3
- import { AdUnit as A } from "../ad_unit/AdUnit.js";
4
- const h = ({
1
+ import { jsxs as i, Fragment as a, jsx as j } from "react/jsx-runtime";
2
+ import A from "react";
3
+ import { AdUnit as $ } from "../ad_unit/AdUnit.js";
4
+ const x = ({
5
5
  id: r,
6
6
  adPath: o,
7
- targeting: m,
8
- sizes: e,
7
+ targeting: e,
8
+ sizes: m,
9
9
  index: t,
10
- frequency: n = 3,
11
- enableDidomi: s = !1,
10
+ frequency: s = 3,
11
+ enableDidomi: f = !1,
12
+ refresh: l = !1,
13
+ refreshInterval: n,
12
14
  children: c,
13
- ...f
14
- }) => /* @__PURE__ */ l(p, { children: [
15
- j.cloneElement(c, f),
16
- r && o && (t + 1) % n === 1 && /* @__PURE__ */ i(
17
- A,
15
+ ...p
16
+ }) => /* @__PURE__ */ i(a, { children: [
17
+ A.cloneElement(c, p),
18
+ r && o && (t + 1) % s === 1 && /* @__PURE__ */ j(
19
+ $,
18
20
  {
19
21
  id: t ? `${r}-${t}` : r,
20
22
  adPath: o,
21
- targeting: m,
22
- sizes: e,
23
- enableDidomi: s
23
+ targeting: e,
24
+ sizes: m,
25
+ enableDidomi: f,
26
+ refresh: l,
27
+ refreshInterval: n
24
28
  }
25
29
  )
26
30
  ] });
27
31
  export {
28
- h as WithAd
32
+ x as WithAd
29
33
  };
@@ -1,5 +1,5 @@
1
1
  import { jsxs as C, jsx as s } from "react/jsx-runtime";
2
- import { useRef as Ye, useState as u, useEffect as p, Suspense as je, lazy as ze } from "react";
2
+ import { useRef as ke, useState as u, useEffect as p, Suspense as je, lazy as ze } from "react";
3
3
  import { useIntl as Oe, FormattedMessage as he } from "react-intl";
4
4
  import { useLocation as Je } from "react-router";
5
5
  import x from "classnames";
@@ -11,16 +11,17 @@ import { useInput as He } from "../input_provider/useInput.js";
11
11
  import { useAuth as Qe } from "../../auth/use_auth/useAuth.js";
12
12
  import { useFormValidation as Xe } from "../../forms/use_form_validation/useFormValidation.js";
13
13
  import { useResponsive as Ze } from "../../hooks/use_responsive/useResponsive.js";
14
- import { useSessionStorageState as et } from "../../hooks/use_session_storage_state/useSessionStorageState.js";
15
- import { useAuthRequired as tt } from "../../hooks/use_auth_required/useAuthRequired.js";
16
- import { useModal as nt } from "../../dialog/modal/useModal.js";
17
- import { useToast as at } from "../../dialog/toast_provider/useToast.js";
18
- import { TogglePosition as st } from "../toggle_position/TogglePosition.js";
19
- import { Avatar as it } from "../../user/avatar/Avatar.js";
20
- import { AuthorBox as ot } from "../../user/author_box/AuthorBox.js";
21
- import { TextEditor as rt } from "../text_editor/TextEditor.js";
22
- import { Icon as ut } from "../../icons/icon/Icon.js";
23
- const dt = ze(() => import("../../modal/side_modal/index.js").then((N) => ({ default: N.SideModal }))), Pt = ({
14
+ import { useScrollToEditor as et } from "../use_scroll_to_editor/useScrollToEditor.js";
15
+ import { useSessionStorageState as tt } from "../../hooks/use_session_storage_state/useSessionStorageState.js";
16
+ import { useAuthRequired as nt } from "../../hooks/use_auth_required/useAuthRequired.js";
17
+ import { useModal as at } from "../../dialog/modal/useModal.js";
18
+ import { useToast as st } from "../../dialog/toast_provider/useToast.js";
19
+ import { TogglePosition as it } from "../toggle_position/TogglePosition.js";
20
+ import { Avatar as ot } from "../../user/avatar/Avatar.js";
21
+ import { AuthorBox as rt } from "../../user/author_box/AuthorBox.js";
22
+ import { TextEditor as ut } from "../text_editor/TextEditor.js";
23
+ import { Icon as dt } from "../../icons/icon/Icon.js";
24
+ const lt = ze(() => import("../../modal/side_modal/index.js").then((N) => ({ default: N.SideModal }))), Et = ({
24
25
  argumentListId: N,
25
26
  avatarSize: pe = 48,
26
27
  disabled: J = !1,
@@ -50,12 +51,12 @@ const dt = ze(() => import("../../modal/side_modal/index.js").then((N) => ({ def
50
51
  inputContent: B,
51
52
  setInputContent: te,
52
53
  setInputRichContent: Se
53
- } = He(), { isLoggedIn: S, currentUser: d } = Qe(), { errors: E, validate: $ } = Xe(), { isMobile: m } = Ze(), Ie = Je(), ne = Ye(null), [V, k] = u([]), [q, D] = u(""), [ae, U] = u(null), [l, b] = u(null), [se, ie] = u(null), [oe, re] = u(!1), [I, ue] = u(!1), [A, de] = u({}), [xe, W] = u(!1), [Ne, Te] = u(0), [f, Le] = et(
54
+ } = He(), { isLoggedIn: S, currentUser: d } = Qe(), { errors: E, validate: $ } = Xe(), { isMobile: m } = Ze(), Ie = Je(), ne = ke(null), y = et(ne), [V, q] = u([]), [D, U] = u(""), [ae, W] = u(null), [l, b] = u(null), [se, ie] = u(null), [oe, re] = u(!1), [I, ue] = u(!1), [A, de] = u({}), [xe, Y] = u(!1), [Ne, Te] = u(0), [f, Le] = tt(
54
55
  "userSide",
55
56
  {}
56
57
  ), [g, ye] = u(
57
58
  !S && v?.actions?.disableInputForVisitor
58
- ), Y = tt(), { showModal: Fe } = nt(), { toast: j } = at() || {}, le = new URLSearchParams(
59
+ ), k = nt(), { showModal: Fe } = at(), { toast: j } = st() || {}, le = new URLSearchParams(
59
60
  typeof window < "u" ? window.location.search : Ie.search
60
61
  );
61
62
  p(() => {
@@ -68,13 +69,13 @@ const dt = ze(() => import("../../modal/side_modal/index.js").then((N) => ({ def
68
69
  let e = null;
69
70
  typeof window < "u" && (e = le.get("positionId")), w && w != a[2]?.id && a?.find((t) => t.id === w) ? b(w) : e && e != a[2]?.id ? b(e) : f && f.groupId == _ && f.positionId != a[2]?.id && b(f.positionId);
70
71
  }, [w]), p(() => {
71
- Q && W(!0);
72
+ Q && Y(!0);
72
73
  }, [Q]), p(() => {
73
- P && (O(), W(!0), y());
74
+ P && (O(), Y(!0), y());
74
75
  }, [P]), p(() => {
75
76
  if (typeof window < "u") {
76
77
  const e = be || le.get("initArgument");
77
- (e === !0 || e === "true") && (W(!0), y(), De());
78
+ (e === !0 || e === "true") && (Y(!0), y(), Ue());
78
79
  }
79
80
  }, []), p(() => {
80
81
  Z && !i && (y(), ee(!1));
@@ -82,17 +83,15 @@ const dt = ze(() => import("../../modal/side_modal/index.js").then((N) => ({ def
82
83
  B?.id && !i && (Pe(B), ee(!0));
83
84
  }, [B]);
84
85
  const Pe = (e) => {
85
- de(e), ue(!0), k(e.sources), D(e.content), U(e.rich_content), ie(e.id), y(), b(e.position?.id), JSON.parse(e.rich_content).hasOwnProperty("root") ? Se(e.rich_content) : te(e.content);
86
- }, y = () => {
87
- ne.current.scrollIntoView({ behavior: "smooth", block: "center" });
86
+ de(e), ue(!0), q(e.sources), U(e.content), W(e.rich_content), ie(e.id), y(), b(e.position?.id), JSON.parse(e.rich_content).hasOwnProperty("root") ? Se(e.rich_content) : te(e.content);
88
87
  }, me = () => {
89
- D(""), U(null), de({}), ie(null), k([]), Te((e) => e + 1), te(null);
88
+ U(""), W(null), de({}), ie(null), q([]), Te((e) => e + 1), te(null);
90
89
  }, Be = (e) => {
91
90
  b(e), ge(e);
92
91
  }, Ee = () => {
93
92
  Fe(
94
93
  /* @__PURE__ */ s(je, { fallback: null, children: /* @__PURE__ */ s(
95
- dt,
94
+ lt,
96
95
  {
97
96
  modalTitle: r.formatMessage({
98
97
  id: "modal.side_modal.modal_title",
@@ -107,11 +106,11 @@ const dt = ze(() => import("../../modal/side_modal/index.js").then((N) => ({ def
107
106
  ) })
108
107
  );
109
108
  }, $e = () => {
110
- S ? se ? qe() : !a || a?.length === 0 || !T?.find((e) => e?.id === l) && l || z && i ? ge(i && z && a[0]?.id) : Ee() : Y({ loginAction: "argument" });
109
+ S ? se ? De() : !a || a?.length === 0 || !T?.find((e) => e?.id === l) && l || z && i ? ge(i && z && a[0]?.id) : Ee() : k({ loginAction: "argument" });
111
110
  }, Ve = (e, t) => {
112
- g ? Y({ loginAction: "argument" }) : (D(e), U(t), $({ content: e }, [{ content: ["url", null] }]));
113
- }, ke = (e) => {
114
- k(e);
111
+ g ? k({ loginAction: "argument" }) : (U(e), W(t), $({ content: e }, [{ content: ["url", null] }]));
112
+ }, qe = (e) => {
113
+ q(e);
115
114
  }, fe = [
116
115
  { content: ["length", 3] },
117
116
  { content: ["required", null] },
@@ -119,7 +118,7 @@ const dt = ze(() => import("../../modal/side_modal/index.js").then((N) => ({ def
119
118
  ...!a || a?.length === 0 ? [] : [{ position_id: ["required", null] }]
120
119
  ], ge = (e) => {
121
120
  const t = e || l, c = {
122
- content: q,
121
+ content: D,
123
122
  rich_content: ae,
124
123
  group_id: _,
125
124
  ...K && { group_type: K },
@@ -151,8 +150,8 @@ const dt = ze(() => import("../../modal/side_modal/index.js").then((N) => ({ def
151
150
  const h = o.data.data.resource;
152
151
  let F = N;
153
152
  t && !m && (F = `argumentList${h.position.id}`), R?.(
154
- q,
155
- a.find((We) => We.id === t) || null
153
+ D,
154
+ a.find((Ye) => Ye.id === t) || null
156
155
  ), L.add(F, [h]), j(
157
156
  r.formatMessage({
158
157
  id: "alert.argument_create",
@@ -178,9 +177,9 @@ const dt = ze(() => import("../../modal/side_modal/index.js").then((N) => ({ def
178
177
  );
179
178
  }
180
179
  }));
181
- }, qe = () => {
180
+ }, De = () => {
182
181
  const e = {
183
- content: q,
182
+ content: D,
184
183
  rich_content: ae,
185
184
  source_ids: V?.map((t) => t.id),
186
185
  ...l && { position_id: l }
@@ -203,7 +202,7 @@ const dt = ze(() => import("../../modal/side_modal/index.js").then((N) => ({ def
203
202
  }), me();
204
203
  }
205
204
  });
206
- }, De = () => {
205
+ }, Ue = () => {
207
206
  if (!oe) {
208
207
  re(!0);
209
208
  const e = setTimeout(() => {
@@ -212,8 +211,8 @@ const dt = ze(() => import("../../modal/side_modal/index.js").then((N) => ({ def
212
211
  return () => clearTimeout(e);
213
212
  }
214
213
  }, O = () => {
215
- g ? Y({ loginAction: "argument" }) : ue(!0);
216
- }, Ue = () => {
214
+ g ? k({ loginAction: "argument" }) : ue(!0);
215
+ }, We = () => {
217
216
  const e = T.find(
218
217
  (t) => t.id === l
219
218
  );
@@ -248,7 +247,7 @@ const dt = ze(() => import("../../modal/side_modal/index.js").then((N) => ({ def
248
247
  defaultMessage: "Your position"
249
248
  }) }),
250
249
  /* @__PURE__ */ s(
251
- st,
250
+ it,
252
251
  {
253
252
  activeLabel: l === a[0].id ? 0 : l === a[1].id ? 1 : null,
254
253
  firstLabel: a[0],
@@ -273,14 +272,14 @@ const dt = ze(() => import("../../modal/side_modal/index.js").then((N) => ({ def
273
272
  [n.argumentAuthorContainerActivated]: !m && I || i
274
273
  }),
275
274
  children: !m && I || i ? /* @__PURE__ */ s(
276
- it,
275
+ ot,
277
276
  {
278
277
  avatarUrl: d.image_url,
279
278
  userName: d.full_name,
280
279
  size: pe
281
280
  }
282
281
  ) : /* @__PURE__ */ s(
283
- ot,
282
+ rt,
284
283
  {
285
284
  fullName: d?.full_name || r.formatMessage({ id: "default_author.full_name" }),
286
285
  avatarUrl: d?.image_url,
@@ -300,13 +299,13 @@ const dt = ze(() => import("../../modal/side_modal/index.js").then((N) => ({ def
300
299
  }),
301
300
  children: [
302
301
  /* @__PURE__ */ s(
303
- rt,
302
+ ut,
304
303
  {
305
304
  handleChange: (e, t) => {
306
305
  Ve(e, t);
307
306
  },
308
307
  handleSourcesChange: (e) => {
309
- ke(e);
308
+ qe(e);
310
309
  },
311
310
  placeholder: ve,
312
311
  "aria-label": r.formatMessage({
@@ -345,7 +344,7 @@ const dt = ze(() => import("../../modal/side_modal/index.js").then((N) => ({ def
345
344
  ),
346
345
  children: [
347
346
  /* @__PURE__ */ s(
348
- ut,
347
+ dt,
349
348
  {
350
349
  name: "announcement",
351
350
  className: n.warningIcon,
@@ -353,7 +352,7 @@ const dt = ze(() => import("../../modal/side_modal/index.js").then((N) => ({ def
353
352
  width: 20
354
353
  }
355
354
  ),
356
- /* @__PURE__ */ s("div", { className: n.argumentInputWarningText, children: Ue() })
355
+ /* @__PURE__ */ s("div", { className: n.argumentInputWarningText, children: We() })
357
356
  ]
358
357
  }
359
358
  ),
@@ -394,5 +393,5 @@ const dt = ze(() => import("../../modal/side_modal/index.js").then((N) => ({ def
394
393
  ] });
395
394
  };
396
395
  export {
397
- Pt as ArgumentInput
396
+ Et as ArgumentInput
398
397
  };
@@ -0,0 +1,20 @@
1
+ import { useRef as t, useCallback as c, useEffect as i } from "react";
2
+ const u = (e) => {
3
+ const r = t(null), o = c(() => {
4
+ window.cancelAnimationFrame(r.current), r.current = window.requestAnimationFrame(() => {
5
+ r.current = window.requestAnimationFrame(() => {
6
+ const n = e?.current;
7
+ n && n.scrollIntoView({ behavior: "smooth", block: "center" });
8
+ });
9
+ });
10
+ }, [e]);
11
+ return i(
12
+ () => () => {
13
+ window.cancelAnimationFrame(r.current);
14
+ },
15
+ []
16
+ ), o;
17
+ };
18
+ export {
19
+ u as useScrollToEditor
20
+ };
package/dist/index.js CHANGED
@@ -11,11 +11,11 @@ import { AdUnit as g } from "./components/ad/ad_unit/AdUnit.js";
11
11
  import { AnnouncementDialog as B } from "./components/dialog/announcement_dialog/AnnouncementDialog.js";
12
12
  import { Argument as A } from "./components/argument/argument/Argument.js";
13
13
  import { ArgumentInput as h } from "./components/input/argument_input/ArgumentInput.js";
14
- import { ArgumentSummaryBox as T } from "./components/summary/argument_summary_box/ArgumentSummaryBox.js";
14
+ import { ArgumentSummaryBox as I } from "./components/summary/argument_summary_box/ArgumentSummaryBox.js";
15
15
  import { AuthContext as P } from "./components/auth/use_auth/AuthContext.js";
16
16
  import { AuthInitializer as M } from "./components/auth/auth_initializer/AuthInitializer.js";
17
17
  import { AuthModal as b } from "./components/auth/auth_modal/AuthModal.js";
18
- import { AuthProvider as E, withAuth as R } from "./components/auth/use_auth/AuthProvider.js";
18
+ import { AuthProvider as D, withAuth as R } from "./components/auth/use_auth/AuthProvider.js";
19
19
  import { AuthProviderFactory as k } from "./components/auth/providers/AuthProviderFactory.js";
20
20
  import { AuthorBox as w } from "./components/user/author_box/AuthorBox.js";
21
21
  import { Avatar as V } from "./components/user/avatar/Avatar.js";
@@ -36,11 +36,11 @@ import { DataProviderContext as lo } from "./components/data/data_provider/DataP
36
36
  import { DebateBox as co } from "./components/debate/debate_box/DebateBox.js";
37
37
  import { DialogBox as So } from "./components/dialog/dialog_box/DialogBox.js";
38
38
  import { Drawer as Co } from "./components/dialog/drawer/Drawer.js";
39
- import { Dropdown as Io } from "./components/dialog/dropdown/Dropdown.js";
39
+ import { Dropdown as To } from "./components/dialog/dropdown/Dropdown.js";
40
40
  import { EMAIL_CONSENT_STORAGE_KEY as Lo, useAuthActions as Po } from "./components/auth/use_auth/useAuthActions.js";
41
41
  import { EmbedHeader as Mo } from "./components/embed/embed_header/EmbedHeader.js";
42
42
  import { ExpandableText as bo } from "./components/text/expandable_text/ExpandableText.js";
43
- import { FacebookLoginButton as Eo } from "./components/auth/facebook_login_button/FacebookLoginButton.js";
43
+ import { FacebookLoginButton as Do } from "./components/auth/facebook_login_button/FacebookLoginButton.js";
44
44
  import { FollowButton as Oo } from "./components/follow/follow_button/FollowButton.js";
45
45
  import { Form as No } from "./components/forms/form/form.js";
46
46
  import { FormContext as yo } from "./components/forms/form/form-context.js";
@@ -61,11 +61,11 @@ import { Link as lr } from "./components/action/link/Link.js";
61
61
  import { ListProvider as cr } from "./components/list/list_provider/ListProvider.js";
62
62
  import { Loader as Sr } from "./components/progress/loader/Loader.js";
63
63
  import { Location as Cr } from "./components/util/location/Location.js";
64
- import { LoginForm as Ir } from "./components/auth/login_form/LoginForm.js";
64
+ import { LoginForm as Tr } from "./components/auth/login_form/LoginForm.js";
65
65
  import { Message as Lr } from "./components/input/text_input/message.js";
66
66
  import { Modal as vr } from "./components/dialog/modal/Modal.js";
67
67
  import { ModalContext as Fr, ModalProvider as br } from "./components/dialog/modal/ModalProvider.js";
68
- import { NavbarButton as Er } from "./components/navbar/navbar_button/NavbarButton.js";
68
+ import { NavbarButton as Dr } from "./components/navbar/navbar_button/NavbarButton.js";
69
69
  import { NavbarModal as Or } from "./components/navbar/navbar_modal/NavbarModal.js";
70
70
  import { NotificationItem as Nr } from "./components/notification/notification_item/NotificationItem.js";
71
71
  import { NotificationMenu as yr } from "./components/notification/notification_menu/NotificationMenu.js";
@@ -86,11 +86,11 @@ import { ResponsiveProvider as le } from "./components/hooks/use_responsive/Resp
86
86
  import { SSOForm as ce } from "./components/auth/sso_form/SSOForm.js";
87
87
  import { ScrollToTop as Se } from "./components/tools/scroll_to_top/ScrollToTop.js";
88
88
  import { SearchInput as Ce } from "./components/input/search_input/SearchInput.js";
89
- import { SectionBox as Ie } from "./components/section/section_box/SectionBox.js";
89
+ import { SectionBox as Te } from "./components/section/section_box/SectionBox.js";
90
90
  import { Select as Le } from "./components/input/select/Select.js";
91
91
  import { ShareBox as ve } from "./components/share/share_box/ShareBox.js";
92
92
  import { ShareButton as Fe } from "./components/share/share_button/ShareButton.js";
93
- import { ShareModal as De } from "./components/share/share_modal/ShareModal.js";
93
+ import { ShareModal as Ee } from "./components/share/share_modal/ShareModal.js";
94
94
  import { SideModal as Re } from "./components/modal/side_modal/SideModal.js";
95
95
  import { SignupForm as ke } from "./components/auth/signup_form/SignupForm.js";
96
96
  import { SocialAuthForm as we } from "./components/auth/social_auth_form/SocialAuthForm.js";
@@ -113,11 +113,11 @@ import { TextEditor as lt } from "./components/input/text_editor/TextEditor.js";
113
113
  import { TextInput as ct } from "./components/input/text_input/TextInput.js";
114
114
  import { Toast as St } from "./components/dialog/toast/Toast.js";
115
115
  import { ToastProvider as Ct } from "./components/dialog/toast_provider/ToastProvider.js";
116
- import { Toggle as It } from "./components/input/toggle/Toggle.js";
116
+ import { Toggle as Tt } from "./components/input/toggle/Toggle.js";
117
117
  import { TogglePosition as Lt } from "./components/input/toggle_position/TogglePosition.js";
118
118
  import { Tooltip as vt } from "./components/dialog/tooltip/Tooltip.js";
119
119
  import { TopArguments as Ft } from "./components/argument/top_arguments/TopArguments.js";
120
- import { TranslatedContent as Dt } from "./components/translation/translated_content/TranslatedContent.js";
120
+ import { TranslatedContent as Et } from "./components/translation/translated_content/TranslatedContent.js";
121
121
  import { TranslationButton as Rt } from "./components/translation/translation_button/TranslationButton.js";
122
122
  import { UpDownVoteBox as kt } from "./components/vote/up_down_vote_box/UpDownVoteBox.js";
123
123
  import { UserBox as wt } from "./components/user/user_box/UserBox.js";
@@ -139,11 +139,11 @@ import { makeStorage as gx } from "./components/auth/use_auth/AuthStorage.js";
139
139
  import { uniqueBy as Bx } from "./components/util/unique_by/uniqueBy.js";
140
140
  import { useAuth as Ax } from "./components/auth/use_auth/useAuth.js";
141
141
  import { useAuthInterceptor as hx } from "./components/auth/use_auth/useAuthInterceptor.js";
142
- import { useAuthRequired as Tx } from "./components/hooks/use_auth_required/useAuthRequired.js";
142
+ import { useAuthRequired as Ix } from "./components/hooks/use_auth_required/useAuthRequired.js";
143
143
  import { useConfig as Px } from "./components/data/config_provider/useConfig.js";
144
144
  import { useCssTheme as Mx } from "./components/hooks/use_css_theme/useCssTheme.js";
145
145
  import { useData as bx } from "./components/data/data_provider/useData.js";
146
- import { useDataProvider as Ex } from "./components/data/data_provider/useDataProvider.js";
146
+ import { useDataProvider as Dx } from "./components/data/data_provider/useDataProvider.js";
147
147
  import { useDeleteContent as Ox } from "./components/user_content/use_delete_content/useDeleteContent.js";
148
148
  import { useFollow as Nx } from "./components/follow/use_follow/useFollow.js";
149
149
  import { useFontLoader as yx } from "./components/hooks/use_font_loader/useFontLoader.js";
@@ -161,22 +161,23 @@ import { useReportContent as mm } from "./components/user_content/use_report_con
161
161
  import { useResponsive as fm } from "./components/hooks/use_responsive/useResponsive.js";
162
162
  import { useRichContent as am } from "./components/argument/argument/useRichContent.js";
163
163
  import { useRoutes as sm } from "./components/data/config_provider/useRoutes.js";
164
- import { useSessionStorageState as dm } from "./components/hooks/use_session_storage_state/useSessionStorageState.js";
165
- import { useToast as gm } from "./components/dialog/toast_provider/useToast.js";
166
- import { useVote as Bm } from "./components/vote/use_vote/useVote.js";
167
- import { utf8ToBase64url as Am } from "./components/auth/use_auth/base64.js";
168
- import { withConfig as hm } from "./components/data/config_provider/withConfig.js";
164
+ import { useScrollToEditor as dm } from "./components/input/use_scroll_to_editor/useScrollToEditor.js";
165
+ import { useSessionStorageState as gm } from "./components/hooks/use_session_storage_state/useSessionStorageState.js";
166
+ import { useToast as Bm } from "./components/dialog/toast_provider/useToast.js";
167
+ import { useVote as Am } from "./components/vote/use_vote/useVote.js";
168
+ import { utf8ToBase64url as hm } from "./components/auth/use_auth/base64.js";
169
+ import { withConfig as Im } from "./components/data/config_provider/withConfig.js";
169
170
  export {
170
171
  d as ActionBar,
171
172
  g as AdUnit,
172
173
  B as AnnouncementDialog,
173
174
  A as Argument,
174
175
  h as ArgumentInput,
175
- T as ArgumentSummaryBox,
176
+ I as ArgumentSummaryBox,
176
177
  P as AuthContext,
177
178
  M as AuthInitializer,
178
179
  b as AuthModal,
179
- E as AuthProvider,
180
+ D as AuthProvider,
180
181
  k as AuthProviderFactory,
181
182
  w as AuthorBox,
182
183
  V as Avatar,
@@ -199,11 +200,11 @@ export {
199
200
  co as DebateBox,
200
201
  So as DialogBox,
201
202
  Co as Drawer,
202
- Io as Dropdown,
203
+ To as Dropdown,
203
204
  Lo as EMAIL_CONSENT_STORAGE_KEY,
204
205
  Mo as EmbedHeader,
205
206
  bo as ExpandableText,
206
- Eo as FacebookLoginButton,
207
+ Do as FacebookLoginButton,
207
208
  Oo as FollowButton,
208
209
  No as Form,
209
210
  yo as FormContext,
@@ -225,12 +226,12 @@ export {
225
226
  cr as ListProvider,
226
227
  Sr as Loader,
227
228
  Cr as Location,
228
- Ir as LoginForm,
229
+ Tr as LoginForm,
229
230
  Lr as Message,
230
231
  vr as Modal,
231
232
  Fr as ModalContext,
232
233
  br as ModalProvider,
233
- Er as NavbarButton,
234
+ Dr as NavbarButton,
234
235
  Or as NavbarModal,
235
236
  Nr as NotificationItem,
236
237
  yr as NotificationMenu,
@@ -251,11 +252,11 @@ export {
251
252
  ce as SSOForm,
252
253
  Se as ScrollToTop,
253
254
  Ce as SearchInput,
254
- Ie as SectionBox,
255
+ Te as SectionBox,
255
256
  Le as Select,
256
257
  ve as ShareBox,
257
258
  Fe as ShareButton,
258
- De as ShareModal,
259
+ Ee as ShareModal,
259
260
  Re as SideModal,
260
261
  ke as SignupForm,
261
262
  we as SocialAuthForm,
@@ -278,11 +279,11 @@ export {
278
279
  ct as TextInput,
279
280
  St as Toast,
280
281
  Ct as ToastProvider,
281
- It as Toggle,
282
+ Tt as Toggle,
282
283
  Lt as TogglePosition,
283
284
  vt as Tooltip,
284
285
  Ft as TopArguments,
285
- Dt as TranslatedContent,
286
+ Et as TranslatedContent,
286
287
  Rt as TranslationButton,
287
288
  kt as UpDownVoteBox,
288
289
  wt as UserBox,
@@ -320,11 +321,11 @@ export {
320
321
  Ax as useAuth,
321
322
  Po as useAuthActions,
322
323
  hx as useAuthInterceptor,
323
- Tx as useAuthRequired,
324
+ Ix as useAuthRequired,
324
325
  Px as useConfig,
325
326
  Mx as useCssTheme,
326
327
  bx as useData,
327
- Ex as useDataProvider,
328
+ Dx as useDataProvider,
328
329
  Ox as useDeleteContent,
329
330
  Nx as useFollow,
330
331
  yx as useFontLoader,
@@ -343,11 +344,12 @@ export {
343
344
  fm as useResponsive,
344
345
  am as useRichContent,
345
346
  sm as useRoutes,
346
- dm as useSessionStorageState,
347
- gm as useToast,
347
+ dm as useScrollToEditor,
348
+ gm as useSessionStorageState,
349
+ Bm as useToast,
348
350
  ax as useTranslatedContent,
349
- Bm as useVote,
350
- Am as utf8ToBase64url,
351
+ Am as useVote,
352
+ hm as utf8ToBase64url,
351
353
  R as withAuth,
352
- hm as withConfig
354
+ Im as withConfig
353
355
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logora/debate",
3
- "version": "0.4.101",
3
+ "version": "0.4.103",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0",
6
6
  "description": "Design system of @Logora made with React",