@logora/debate 0.4.55 → 0.4.56

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.
@@ -0,0 +1 @@
1
+ ._listHeader_1shoq_3{display:flex;justify-content:space-between;align-items:center;position:relative;flex-wrap:wrap;gap:var(--space-unit, 1em)}@container (max-width: 575.98px){._listHeader_1shoq_3{flex-direction:column;align-items:flex-start}._listHeader_1shoq_3._listHeaderOneItem_1shoq_16{flex-direction:row;align-items:center;flex-wrap:nowrap!important}}._listTitle_1shoq_23{font-size:var(--font-size-extra-large, 22px);line-height:var(--line-height-tight, 1.08em);font-weight:var(--font-weight-bold, 700);font-variation-settings:var(--font-variation-bold, normal);font-family:var(--title-font-family, var(--font-family, "Montserrat"))}._listSubtitle_1shoq_31{color:var(--text-primary, #222222);font-weight:var(--font-weight-normal, 400);font-variation-settings:var(--font-variation-normal, normal);font-size:var(--font-size-normal, 16px);margin-top:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))}._rightBar_1shoq_39{display:flex;gap:var(--space-unit, 1em);flex-wrap:wrap}@container (max-width: 575.98px){._rightBar_1shoq_39{width:100%;justify-content:space-between}._rightBar_1shoq_39._rightBarOneItem_1shoq_49{justify-content:flex-end}}._rightBar_1shoq_39{flex:1 1 auto;justify-content:flex-end;align-items:center;flex-direction:row}._search_1shoq_60{flex:1;max-width:35%}@container (max-width: 575.98px){._search_1shoq_60{max-width:80%}}._tagSection_1shoq_70{position:relative;display:flex;align-items:stretch;width:100%;max-width:100%}._tagList_1shoq_78{display:flex;flex-direction:row;justify-content:flex-start;flex:1;overflow-x:auto;overflow-y:hidden;gap:var(--spacer-md, calc(var(--space-unit, 1em) * .75));scrollbar-width:none}@container (max-width: 575.98px){._tagList_1shoq_78{gap:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))}}._tagList_1shoq_78::-webkit-scrollbar{display:none}._arrow_1shoq_97{position:absolute;top:0;bottom:0;z-index:2;display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;padding:0;transition:opacity .2s ease;outline:none;background:none;line-height:0}._arrow_1shoq_97 svg{display:block}._arrow_1shoq_97:focus-visible{outline:2px solid var(--call-primary-color, #434343);outline-offset:-2px}._arrowLeft_1shoq_121{left:0;padding-left:var(--spacer-xs, calc(var(--space-unit, 1em) * .325));background:linear-gradient(to left,#ffffff 40%,transparent)!important}._arrowLeft_1shoq_121 svg{transform:rotate(90deg)}._arrowRight_1shoq_130{right:0;padding-right:var(--spacer-xs, calc(var(--space-unit, 1em) * .325));background:linear-gradient(to left,#ffffff 40%,transparent)!important}._arrowRight_1shoq_130 svg{transform:rotate(-90deg)}._arrowHidden_1shoq_139{opacity:0;pointer-events:none}._tagItem_1shoq_144{display:flex!important;color:var(--text-secondary, #5F5F5F);cursor:pointer;white-space:nowrap}._select_1shoq_151{max-width:300px}@container (max-width: 575.98px){._select_1shoq_151{max-width:300px}}
@@ -11,40 +11,40 @@ 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 = (a) => {
15
- const d = se(), j = 1, [r] = te(), H = x(null), [T, S] = N("paragraph"), [de, Q] = N(null), [V, L] = N(!1), [z, A] = N(!1), [G, D] = N(!1), v = a.hideSubmit && a.hideSourceAction && a.disableRichText, _ = re(() => {
14
+ const Ce = (r) => {
15
+ const d = se(), j = 1, [a] = te(), H = x(null), [T, S] = N("paragraph"), [de, Q] = N(null), [V, L] = N(!1), [z, A] = N(!1), [G, D] = N(!1), E = r.hideSubmit && r.hideSourceAction && r.disableRichText, _ = re(() => {
16
16
  const e = M();
17
17
  if (I(e)) {
18
- const n = e.anchor.getNode(), s = n.getKey() === "root" ? n : n.getTopLevelElementOrThrow(), u = s.getKey();
19
- if (r.getElementByKey(u) !== null)
18
+ const o = e.anchor.getNode(), s = o.getKey() === "root" ? o : o.getTopLevelElementOrThrow(), u = s.getKey();
19
+ if (a.getElementByKey(u) !== null)
20
20
  if (Q(u), B(s)) {
21
- const o = ne(n, Y), p = o ? o.getTag() : s.getTag();
21
+ const n = ne(o, Y), p = n ? n.getTag() : s.getTag();
22
22
  S(p);
23
23
  } else {
24
- const o = oe(s) ? s.getTag() : s.getType();
25
- S(o);
24
+ const n = oe(s) ? s.getTag() : s.getType();
25
+ S(n);
26
26
  }
27
27
  L(e.hasFormat("bold")), A(e.hasFormat("italic")), D(e.hasFormat("underline"));
28
28
  }
29
- }, [r]);
29
+ }, [a]);
30
30
  U(() => ie(
31
- r.registerUpdateListener(({ editorState: e }) => {
31
+ a.registerUpdateListener(({ editorState: e }) => {
32
32
  e.read(() => {
33
33
  _();
34
34
  });
35
35
  }),
36
- r.registerCommand(
36
+ a.registerCommand(
37
37
  le,
38
38
  () => (_(), !1),
39
39
  j
40
40
  )
41
- ), [r, _]);
41
+ ), [a, _]);
42
42
  const y = x(!1), c = x(null);
43
43
  U(() => () => {
44
44
  c.current && clearTimeout(c.current);
45
45
  }, []);
46
- const g = (e, n) => {
47
- e.pointerType === "touch" || e.pointerType === "pen" ? (e.preventDefault(), y.current = !0, n(), c.current && clearTimeout(c.current), c.current = setTimeout(() => {
46
+ const g = (e, o) => {
47
+ e.pointerType === "touch" || e.pointerType === "pen" ? (e.preventDefault(), y.current = !0, o(), c.current && clearTimeout(c.current), c.current = setTimeout(() => {
48
48
  y.current = !1, c.current = null;
49
49
  }, 500)) : e.preventDefault();
50
50
  }, h = (e) => {
@@ -55,46 +55,49 @@ const Ce = (a) => {
55
55
  e();
56
56
  }, C = () => {
57
57
  setTimeout(() => {
58
- r.getEditorState().read(() => {
58
+ a.getEditorState().read(() => {
59
59
  _();
60
60
  });
61
61
  }, 0);
62
62
  }, b = (e) => {
63
- r.dispatchCommand(ae, e), e === "bold" ? L((n) => !n) : e === "italic" ? A((n) => !n) : e === "underline" && D((n) => !n), C();
63
+ a.dispatchCommand(ae, e), e === "bold" ? L((o) => !o) : e === "italic" ? A((o) => !o) : e === "underline" && D((o) => !o), a.focus(() => {
64
+ const o = a.getRootElement();
65
+ o && o.focus();
66
+ }), C();
64
67
  }, X = () => {
65
- r.update(() => {
68
+ a.update(() => {
66
69
  const e = M();
67
70
  if (!I(e))
68
71
  return;
69
- const n = e.getNodes(), s = /* @__PURE__ */ new Set();
70
- for (const m of n) {
71
- let o = m;
72
- for (; o !== null && !$(o); )
73
- o = o.getParent();
74
- $(o) && s.add(o);
72
+ const o = e.getNodes(), s = /* @__PURE__ */ new Set();
73
+ for (const m of o) {
74
+ let n = m;
75
+ for (; n !== null && !$(n); )
76
+ n = n.getParent();
77
+ $(n) && s.add(n);
75
78
  }
76
79
  const u = Array.from(s).reverse();
77
80
  for (const m of u) {
78
- const o = m.getParent();
79
- if (!B(o))
81
+ const n = m.getParent();
82
+ if (!B(n))
80
83
  continue;
81
84
  const p = F(), J = m.getChildren();
82
85
  for (const w of J)
83
86
  p.append(w);
84
87
  const k = m.getNextSiblings();
85
- if (o.insertAfter(p), k.length > 0) {
86
- const w = k[0].getValue(), P = ee(o.getListType(), w);
88
+ if (n.insertAfter(p), k.length > 0) {
89
+ const w = k[0].getValue(), P = ee(n.getListType(), w);
87
90
  for (const W of k)
88
91
  P.append(W);
89
92
  p.insertAfter(P);
90
93
  }
91
- m.remove(), o.getChildrenSize() === 0 && o.remove();
94
+ m.remove(), n.getChildrenSize() === 0 && n.remove();
92
95
  }
93
96
  });
94
- }, E = () => {
95
- T !== "ol" ? r.dispatchCommand(Z) : X(), C();
97
+ }, v = () => {
98
+ T !== "ol" ? a.dispatchCommand(Z) : X(), C();
96
99
  }, O = () => {
97
- T !== "quote" ? r.update(() => {
100
+ T !== "quote" ? a.update(() => {
98
101
  const e = M();
99
102
  if (I(e))
100
103
  if (e.isCollapsed()) {
@@ -102,24 +105,24 @@ const Ce = (a) => {
102
105
  s.insertAfter(u), u.selectEnd();
103
106
  } else
104
107
  K(e, () => q());
105
- }) : r.update(() => {
108
+ }) : a.update(() => {
106
109
  const e = M();
107
110
  I(e) && K(e, () => F());
108
111
  }), C();
109
112
  };
110
- return v ? null : /* @__PURE__ */ R(
113
+ return E ? null : /* @__PURE__ */ R(
111
114
  "div",
112
115
  {
113
116
  className: l(t.toolbar, {
114
- [t.toolbarIsActive]: v ? !1 : a.isActive
117
+ [t.toolbarIsActive]: E ? !1 : r.isActive
115
118
  }),
116
119
  ref: H,
117
120
  children: [
118
- a.isActive ? !a.disableRichText && /* @__PURE__ */ R(
121
+ r.isActive ? !r.disableRichText && /* @__PURE__ */ R(
119
122
  "div",
120
123
  {
121
124
  className: l(t.iconToolbar, {
122
- [t.shortBar]: a.shortBar
125
+ [t.shortBar]: r.shortBar
123
126
  }),
124
127
  children: [
125
128
  /* @__PURE__ */ i(
@@ -220,8 +223,8 @@ const Ce = (a) => {
220
223
  /* @__PURE__ */ i(
221
224
  "button",
222
225
  {
223
- onPointerDown: (e) => g(e, () => E()),
224
- onClick: () => h(() => E()),
226
+ onPointerDown: (e) => g(e, () => v()),
227
+ onClick: () => h(() => v()),
225
228
  type: "button",
226
229
  className: l(t.toolbarItem, {
227
230
  [t.active]: T === "ol"
@@ -241,10 +244,10 @@ const Ce = (a) => {
241
244
  )
242
245
  }
243
246
  ),
244
- !a.hideSourceAction && /* @__PURE__ */ i(
247
+ !r.hideSourceAction && /* @__PURE__ */ i(
245
248
  "button",
246
249
  {
247
- onClick: a.onAddSource,
250
+ onClick: r.onAddSource,
248
251
  type: "button",
249
252
  className: t.toolbarItem,
250
253
  "aria-label": d.formatMessage({
@@ -265,12 +268,12 @@ const Ce = (a) => {
265
268
  ]
266
269
  }
267
270
  ) : null,
268
- /* @__PURE__ */ i("div", { className: t.actionButton, children: a.hideSubmit ? null : /* @__PURE__ */ i(
271
+ /* @__PURE__ */ i("div", { className: t.actionButton, children: r.hideSubmit ? null : /* @__PURE__ */ i(
269
272
  ce,
270
273
  {
271
274
  type: "button",
272
275
  "data-testid": "submit-button",
273
- handleClick: a.onSubmit,
276
+ handleClick: r.onSubmit,
274
277
  className: l(t.inputSubmitActionButton, t.submitAction),
275
278
  "aria-label": d.formatMessage({
276
279
  id: "input.text_editor.plugins.toolbar_plugin.submit_button.aria_label",
@@ -1,35 +1,35 @@
1
- import '../../../../assets/components/list/paginated_list/action_bar/ActionBar.module-DP4kPR9x.css';const t = "_listHeader_10hfs_3", s = "_listHeaderOneItem_10hfs_16", e = "_listTitle_10hfs_23", r = "_listSubtitle_10hfs_31", _ = "_rightBar_10hfs_39", a = "_rightBarOneItem_10hfs_49", i = "_search_10hfs_60", o = "_tagSection_10hfs_70", n = "_tagList_10hfs_78", h = "_arrow_10hfs_98", c = "_arrowLeft_10hfs_122", l = "_arrowRight_10hfs_131", f = "_arrowHidden_10hfs_140", g = "_tagItem_10hfs_145", d = "_select_10hfs_152", w = {
1
+ import '../../../../assets/components/list/paginated_list/action_bar/ActionBar.module-CN_P2Qad.css';const t = "_listHeader_1shoq_3", s = "_listHeaderOneItem_1shoq_16", e = "_listTitle_1shoq_23", o = "_listSubtitle_1shoq_31", r = "_rightBar_1shoq_39", _ = "_rightBarOneItem_1shoq_49", a = "_search_1shoq_60", i = "_tagSection_1shoq_70", n = "_tagList_1shoq_78", h = "_arrow_1shoq_97", c = "_arrowLeft_1shoq_121", l = "_arrowRight_1shoq_130", g = "_arrowHidden_1shoq_139", q = "_tagItem_1shoq_144", d = "_select_1shoq_151", w = {
2
2
  listHeader: t,
3
3
  listHeaderOneItem: s,
4
4
  listTitle: e,
5
- listSubtitle: r,
6
- rightBar: _,
7
- rightBarOneItem: a,
8
- search: i,
9
- tagSection: o,
5
+ listSubtitle: o,
6
+ rightBar: r,
7
+ rightBarOneItem: _,
8
+ search: a,
9
+ tagSection: i,
10
10
  tagList: n,
11
11
  arrow: h,
12
12
  arrowLeft: c,
13
13
  arrowRight: l,
14
- arrowHidden: f,
15
- tagItem: g,
14
+ arrowHidden: g,
15
+ tagItem: q,
16
16
  select: d
17
17
  };
18
18
  export {
19
19
  h as arrow,
20
- f as arrowHidden,
20
+ g as arrowHidden,
21
21
  c as arrowLeft,
22
22
  l as arrowRight,
23
23
  w as default,
24
24
  t as listHeader,
25
25
  s as listHeaderOneItem,
26
- r as listSubtitle,
26
+ o as listSubtitle,
27
27
  e as listTitle,
28
- _ as rightBar,
29
- a as rightBarOneItem,
30
- i as search,
28
+ r as rightBar,
29
+ _ as rightBarOneItem,
30
+ a as search,
31
31
  d as select,
32
- g as tagItem,
32
+ q as tagItem,
33
33
  n as tagList,
34
- o as tagSection
34
+ i as tagSection
35
35
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logora/debate",
3
- "version": "0.4.55",
3
+ "version": "0.4.56",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0",
6
6
  "description": "Design system of @Logora made with React",
@@ -1 +0,0 @@
1
- ._listHeader_10hfs_3{display:flex;justify-content:space-between;align-items:center;position:relative;flex-wrap:wrap;gap:var(--space-unit, 1em)}@container (max-width: 575.98px){._listHeader_10hfs_3{flex-direction:column;align-items:flex-start}._listHeader_10hfs_3._listHeaderOneItem_10hfs_16{flex-direction:row;align-items:center;flex-wrap:nowrap!important}}._listTitle_10hfs_23{font-size:var(--font-size-extra-large, 22px);line-height:var(--line-height-tight, 1.08em);font-weight:var(--font-weight-bold, 700);font-variation-settings:var(--font-variation-bold, normal);font-family:var(--title-font-family, var(--font-family, "Montserrat"))}._listSubtitle_10hfs_31{color:var(--text-primary, #222222);font-weight:var(--font-weight-normal, 400);font-variation-settings:var(--font-variation-normal, normal);font-size:var(--font-size-normal, 16px);margin-top:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))}._rightBar_10hfs_39{display:flex;gap:var(--space-unit, 1em);flex-wrap:wrap}@container (max-width: 575.98px){._rightBar_10hfs_39{width:100%;justify-content:space-between}._rightBar_10hfs_39._rightBarOneItem_10hfs_49{justify-content:flex-end}}._rightBar_10hfs_39{flex:1 1 auto;justify-content:flex-end;align-items:center;flex-direction:row}._search_10hfs_60{flex:1;max-width:35%}@container (max-width: 575.98px){._search_10hfs_60{max-width:80%}}._tagSection_10hfs_70{position:relative;display:flex;align-items:stretch;width:100%;max-width:100%}._tagList_10hfs_78{display:flex;flex-direction:row;justify-content:flex-start;flex:1;overflow-x:auto;overflow-y:hidden;gap:var(--spacer-md, calc(var(--space-unit, 1em) * .75));padding-bottom:var(--spacer-md, calc(var(--space-unit, 1em) * .75));scrollbar-width:none}@container (max-width: 575.98px){._tagList_10hfs_78{gap:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))}}._tagList_10hfs_78::-webkit-scrollbar{display:none}._arrow_10hfs_98{position:absolute;top:0;bottom:0;z-index:2;display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;padding:0;transition:opacity .2s ease;outline:none;background:none;line-height:0}._arrow_10hfs_98 svg{display:block}._arrow_10hfs_98:focus-visible{outline:2px solid var(--call-primary-color, #434343);outline-offset:-2px}._arrowLeft_10hfs_122{left:0;padding-left:var(--spacer-xs, calc(var(--space-unit, 1em) * .325));background:linear-gradient(to right,var(--background-color-container, white) 40%,transparent)}._arrowLeft_10hfs_122 svg{transform:rotate(90deg)}._arrowRight_10hfs_131{right:0;padding-right:var(--spacer-xs, calc(var(--space-unit, 1em) * .325));background:linear-gradient(to left,var(--background-color-container, white) 40%,transparent)}._arrowRight_10hfs_131 svg{transform:rotate(-90deg)}._arrowHidden_10hfs_140{opacity:0;pointer-events:none}._tagItem_10hfs_145{display:flex!important;color:var(--text-secondary, #5F5F5F);cursor:pointer;white-space:nowrap}._select_10hfs_152{max-width:300px}@container (max-width: 575.98px){._select_10hfs_152{max-width:300px}}