@logora/debate 0.3.109 → 0.3.111

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
+ ._tabsWrapper_9pezl_3{position:relative;display:flex;align-items:stretch;width:100%;max-width:100%}._navTabs_9pezl_11{display:flex;flex-wrap:nowrap;gap:var(--spacer-xs, calc(var(--space-unit, 1em) * .325));white-space:nowrap;padding-left:0;margin-top:0;margin-bottom:0;border-bottom:none!important;list-style:none;flex:1}@container (max-width: 575.98px){._navTabs_9pezl_11{font-size:var(--font-size-normal, 16px);gap:var(--space-unit, 1em)}}._navTabs_9pezl_11{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none}._navTabs_9pezl_11::-webkit-scrollbar{display:none}._arrow_9pezl_39{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-color:var(--background-color-secondary, #E8E8E8)!important;line-height:0}._arrow_9pezl_39 svg{display:block}._arrow_9pezl_39:focus-visible{outline:2px solid var(--call-primary-color, #434343);outline-offset:-2px}._arrowLeft_9pezl_63{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_9pezl_63 svg{transform:rotate(90deg)}._arrowRight_9pezl_72{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_9pezl_72 svg{transform:rotate(-90deg)}._arrowHidden_9pezl_81{opacity:0;pointer-events:none}._navItem_9pezl_86{cursor:pointer}._navLink_9pezl_90{display:block;position:relative;padding:var(--spacer-md, calc(var(--space-unit, 1em) * .75)) var(--spacer-md, calc(var(--space-unit, 1em) * .75));border:none!important;color:var(--text-primary, #222222);outline:0}._navLink_9pezl_90:hover,._navLink_9pezl_90:focus{text-decoration:none;color:var(--text-primary, #222222)!important;background:transparent}._navLink_9pezl_90._disabled_9pezl_103{color:var(--darkest-text-tertiary, #c7c7c7);pointer-events:none;cursor:default}._navLink_9pezl_90:after{content:"";background-color:var(--text-primary, #222222);height:2px;position:absolute;width:100%;left:0;bottom:0;z-index:1;transition:transform .25s ease 0s;transform:scaleX(0)}._navLink_9pezl_90._active_9pezl_120{color:var(--text-primary, #222222)!important;background:transparent;font-weight:var(--font-weight-bold, 700)}._navLink_9pezl_90._active_9pezl_120:after{transform:scaleX(1)}
@@ -1,10 +1,6 @@
1
- import { jsxs as l, jsx as e } from "react/jsx-runtime";
1
+ import { jsx as e } from "react/jsx-runtime";
2
2
  import "react";
3
- const h = (i) => /* @__PURE__ */ l("svg", { ...i, viewBox: "0 0 34 35", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
4
- /* @__PURE__ */ e("rect", { width: "34", height: "35", rx: "17", fill: "white" }),
5
- /* @__PURE__ */ e("rect", { width: "34", height: "35", rx: "17", fill: "#D70026" }),
6
- /* @__PURE__ */ e("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M22.923 11.3652L9.0284 16.537L13.6573 19.295L17.739 15.0921C17.946 14.8791 18.2268 14.7595 18.5195 14.7596C18.8122 14.7598 19.0929 14.8796 19.2998 15.0927C19.5067 15.3058 19.6229 15.5949 19.6228 15.8962C19.6227 16.1975 19.5063 16.4864 19.2993 16.6994L15.2165 20.9022L17.8979 25.6662L22.923 11.3652ZM23.2794 8.81629C24.598 8.32445 25.8758 9.63982 25.398 10.9972L19.5696 27.587C19.0907 28.9478 17.2855 29.1137 16.5804 27.8608L13.0306 21.5474L6.89765 17.8933C5.68055 17.1674 5.84165 15.3091 7.16358 14.8161L23.2794 8.81629Z", fill: "white" })
7
- ] });
3
+ const L = (l) => /* @__PURE__ */ e("svg", { ...l, viewBox: "0 0 34 35", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M22.923 11.3652L9.0284 16.537L13.6573 19.295L17.739 15.0921C17.946 14.8791 18.2268 14.7595 18.5195 14.7596C18.8122 14.7598 19.0929 14.8796 19.2998 15.0927C19.5067 15.3058 19.6229 15.5949 19.6228 15.8962C19.6227 16.1975 19.5063 16.4864 19.2993 16.6994L15.2165 20.9022L17.8979 25.6662L22.923 11.3652ZM23.2794 8.81629C24.598 8.32445 25.8758 9.63982 25.398 10.9972L19.5696 27.587C19.0907 28.9478 17.2855 29.1137 16.5804 27.8608L13.0306 21.5474L6.89765 17.8933C5.68055 17.1674 5.84165 15.3091 7.16358 14.8161L23.2794 8.81629Z", fill: "currentColor" }) });
8
4
  export {
9
- h as Send
5
+ L as Send
10
6
  };
@@ -1,30 +1,30 @@
1
1
  import { jsxs as y, jsx as o } from "react/jsx-runtime";
2
- import { $isListNode as $, ListNode as q, INSERT_ORDERED_LIST_COMMAND as K, REMOVE_LIST_COMMAND as F } from "@lexical/list";
3
- import { useLexicalComposerContext as P } from "@lexical/react/LexicalComposerContext";
4
- import { $isHeadingNode as U, $createQuoteNode as C } from "@lexical/rich-text";
5
- import { $setBlocksType as k } from "@lexical/selection";
2
+ import { $isListNode as q, ListNode as $, INSERT_ORDERED_LIST_COMMAND as K, REMOVE_LIST_COMMAND as F } from "@lexical/list";
3
+ import { useLexicalComposerContext as U } from "@lexical/react/LexicalComposerContext";
4
+ import { $isHeadingNode as P, $createQuoteNode as k } from "@lexical/rich-text";
5
+ import { $setBlocksType as C } from "@lexical/selection";
6
6
  import { $getNearestNodeOfType as j, mergeRegister as H } from "@lexical/utils";
7
7
  import a from "classnames";
8
- import { $getSelection as N, $isRangeSelection as _, SELECTION_CHANGE_COMMAND as Q, FORMAT_TEXT_COMMAND as G, $createParagraphNode as V } from "lexical";
8
+ import { $getSelection as N, $isRangeSelection as M, SELECTION_CHANGE_COMMAND as Q, FORMAT_TEXT_COMMAND as G, $createParagraphNode as V } from "lexical";
9
9
  import { useRef as X, useState as u, useCallback as z, useEffect as J } from "react";
10
10
  import { useIntl as W } from "react-intl";
11
11
  import e from "./ToolbarPlugin.module.scss.js";
12
12
  import { Icon as r } from "../../../icons/icon/Icon.js";
13
13
  import { Button as Y } from "../../../action/button/Button.js";
14
14
  const ge = (i) => {
15
- const s = W(), x = 1, [l] = P(), E = X(null), [b, M] = u("paragraph"), [Z, I] = u(null), [S, v] = u(!1), [A, w] = u(!1), [L, D] = u(!1), T = i.hideSubmit && i.hideSourceAction && i.disableRichText, g = z(() => {
15
+ const s = W(), x = 1, [l] = U(), E = X(null), [b, _] = u("paragraph"), [Z, I] = u(null), [A, S] = u(!1), [v, w] = u(!1), [L, D] = u(!1), T = i.hideSubmit && i.hideSourceAction && i.disableRichText, g = z(() => {
16
16
  const t = N();
17
- if (_(t)) {
17
+ if (M(t)) {
18
18
  const c = t.anchor.getNode(), n = c.getKey() === "root" ? c : c.getTopLevelElementOrThrow(), m = n.getKey();
19
19
  if (l.getElementByKey(m) !== null)
20
- if (I(m), $(n)) {
21
- const f = j(c, q), B = f ? f.getTag() : n.getTag();
22
- M(B);
20
+ if (I(m), q(n)) {
21
+ const f = j(c, $), B = f ? f.getTag() : n.getTag();
22
+ _(B);
23
23
  } else {
24
- const f = U(n) ? n.getTag() : n.getType();
25
- M(f);
24
+ const f = P(n) ? n.getTag() : n.getType();
25
+ _(f);
26
26
  }
27
- v(t.hasFormat("bold")), w(t.hasFormat("italic")), D(t.hasFormat("underline"));
27
+ S(t.hasFormat("bold")), w(t.hasFormat("italic")), D(t.hasFormat("underline"));
28
28
  }
29
29
  }, [l]);
30
30
  J(() => H(
@@ -42,9 +42,11 @@ const ge = (i) => {
42
42
  const d = (t) => {
43
43
  t.preventDefault();
44
44
  }, h = () => {
45
- Promise.resolve().then(() => {
46
- l.getEditorState().read(() => {
47
- g();
45
+ queueMicrotask(() => {
46
+ requestAnimationFrame(() => {
47
+ l.getEditorState().read(() => {
48
+ g();
49
+ });
48
50
  });
49
51
  });
50
52
  }, p = (t) => {
@@ -54,15 +56,15 @@ const ge = (i) => {
54
56
  }, R = () => {
55
57
  b !== "quote" ? l.update(() => {
56
58
  const t = N();
57
- if (_(t))
59
+ if (M(t))
58
60
  if (t.isCollapsed()) {
59
- const n = t.anchor.getNode().getTopLevelElementOrThrow(), m = C();
61
+ const n = t.anchor.getNode().getTopLevelElementOrThrow(), m = k();
60
62
  n.insertAfter(m), m.selectEnd();
61
63
  } else
62
- k(t, () => C());
64
+ C(t, () => k());
63
65
  }) : l.update(() => {
64
66
  const t = N();
65
- _(t) && k(t, () => V());
67
+ M(t) && C(t, () => V());
66
68
  }), h();
67
69
  };
68
70
  return T ? null : /* @__PURE__ */ y(
@@ -88,7 +90,7 @@ const ge = (i) => {
88
90
  p("bold");
89
91
  },
90
92
  type: "button",
91
- className: a(e.toolbarItem, { [e.active]: S }),
93
+ className: a(e.toolbarItem, { [e.active]: A }),
92
94
  "data-testid": "format-bold",
93
95
  "aria-label": s.formatMessage({
94
96
  id: "input.text_editor.plugins.toolbar_plugin.bold.aria_label",
@@ -114,7 +116,7 @@ const ge = (i) => {
114
116
  },
115
117
  type: "button",
116
118
  className: a(e.toolbarItem, {
117
- [e.active]: A
119
+ [e.active]: v
118
120
  }),
119
121
  "aria-label": s.formatMessage({
120
122
  id: "input.text_editor.plugins.toolbar_plugin.italic.aria_label",
@@ -1,22 +1,22 @@
1
- import '../../../assets/components/navigation/tabs/Tabs.module-CYpmMK3l.css';const a = "_tabsWrapper_14x1i_3", r = "_navTabs_14x1i_11", t = "_arrow_14x1i_39", _ = "_arrowLeft_14x1i_63", n = "_arrowRight_14x1i_72", o = "_arrowHidden_14x1i_81", i = "_navItem_14x1i_86", s = "_navLink_14x1i_90", e = "_active_14x1i_120", c = {
1
+ import '../../../assets/components/navigation/tabs/Tabs.module-DvCQQR63.css';const a = "_tabsWrapper_9pezl_3", r = "_navTabs_9pezl_11", t = "_arrow_9pezl_39", e = "_arrowLeft_9pezl_63", _ = "_arrowRight_9pezl_72", n = "_arrowHidden_9pezl_81", o = "_navItem_9pezl_86", s = "_navLink_9pezl_90", p = "_active_9pezl_120", c = {
2
2
  tabsWrapper: a,
3
3
  navTabs: r,
4
4
  arrow: t,
5
- arrowLeft: _,
6
- arrowRight: n,
7
- arrowHidden: o,
8
- navItem: i,
5
+ arrowLeft: e,
6
+ arrowRight: _,
7
+ arrowHidden: n,
8
+ navItem: o,
9
9
  navLink: s,
10
- active: e
10
+ active: p
11
11
  };
12
12
  export {
13
- e as active,
13
+ p as active,
14
14
  t as arrow,
15
- o as arrowHidden,
16
- _ as arrowLeft,
17
- n as arrowRight,
15
+ n as arrowHidden,
16
+ e as arrowLeft,
17
+ _ as arrowRight,
18
18
  c as default,
19
- i as navItem,
19
+ o as navItem,
20
20
  s as navLink,
21
21
  r as navTabs,
22
22
  a as tabsWrapper
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logora/debate",
3
- "version": "0.3.109",
3
+ "version": "0.3.111",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0",
6
6
  "description": "Design system of @Logora made with React",
@@ -1 +0,0 @@
1
- ._tabsWrapper_14x1i_3{position:relative;display:flex;align-items:stretch;width:100%;max-width:100%}._navTabs_14x1i_11{display:flex;flex-wrap:nowrap;gap:var(--spacer-xs, calc(var(--space-unit, 1em) * .325));white-space:nowrap;padding-left:0;margin-top:0;margin-bottom:0;border-bottom:none!important;list-style:none;flex:1}@container (max-width: 575.98px){._navTabs_14x1i_11{font-size:var(--font-size-normal, 16px);gap:var(--space-unit, 1em)}}._navTabs_14x1i_11{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none}._navTabs_14x1i_11::-webkit-scrollbar{display:none}._arrow_14x1i_39{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_14x1i_39 svg{display:block}._arrow_14x1i_39:focus-visible{outline:2px solid var(--call-primary-color, #434343);outline-offset:-2px}._arrowLeft_14x1i_63{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_14x1i_63 svg{transform:rotate(90deg)}._arrowRight_14x1i_72{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_14x1i_72 svg{transform:rotate(-90deg)}._arrowHidden_14x1i_81{opacity:0;pointer-events:none}._navItem_14x1i_86{cursor:pointer}._navLink_14x1i_90{display:block;position:relative;padding:var(--spacer-md, calc(var(--space-unit, 1em) * .75)) var(--spacer-md, calc(var(--space-unit, 1em) * .75));border:none!important;color:var(--text-primary, #222222);outline:0}._navLink_14x1i_90:hover,._navLink_14x1i_90:focus{text-decoration:none;color:var(--text-primary, #222222)!important;background:transparent}._navLink_14x1i_90._disabled_14x1i_103{color:var(--darkest-text-tertiary, #c7c7c7);pointer-events:none;cursor:default}._navLink_14x1i_90:after{content:"";background-color:var(--text-primary, #222222);height:2px;position:absolute;width:100%;left:0;bottom:0;z-index:1;transition:transform .25s ease 0s;transform:scaleX(0)}._navLink_14x1i_90._active_14x1i_120{color:var(--text-primary, #222222)!important;background:transparent;font-weight:var(--font-weight-bold, 700)}._navLink_14x1i_90._active_14x1i_120:after{transform:scaleX(1)}