@logora/debate 0.1.1 → 0.2.0
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.
- package/README.md +14 -23
- package/dist/components/action/button/Button.js +1 -1
- package/dist/components/argument/argument/Argument.js +49 -49
- package/dist/components/argument/top_arguments/TopArguments.js +17 -17
- package/dist/components/auth/auth_initializer/AuthInitializer.js +5 -5
- package/dist/components/auth/auth_modal/AuthModal.js +9 -9
- package/dist/components/auth/login_form/LoginForm.js +1 -0
- package/dist/components/auth/oauth2_button/OAuth2Button.js +3 -3
- package/dist/components/auth/providers/AuthProviderFactory.js +4 -4
- package/dist/components/auth/signup_form/SignupForm.js +4 -4
- package/dist/components/auth/social_auth_form/SocialAuthForm.js +10 -10
- package/dist/components/auth/sso_form/SSOForm.js +4 -4
- package/dist/components/chart/line_chart/LineChart.js +10 -10
- package/dist/components/chart/pie_chart/PieChart.js +6 -10
- package/dist/components/consultation/consultation_box/ConsultationBox.js +19 -14
- package/dist/components/debate/debate_box/DebateBox.js +11 -11
- package/dist/components/dialog/drawer/Drawer.js +16 -16
- package/dist/components/dialog/modal/Modal.js +8 -8
- package/dist/components/dialog/toast_provider/ToastProvider.js +10 -10
- package/dist/components/hooks/use_responsive/ResponsiveProvider.js +4 -4
- package/dist/components/input/argument_input/ArgumentInput.js +100 -99
- package/dist/components/input/search_input/SearchInput.js +4 -4
- package/dist/components/input/text_editor/TextEditor.js +50 -50
- package/dist/components/input/text_editor/lexicalToHtml.js +7 -7
- package/dist/components/input/text_editor/plugins/MaxLengthPlugin.js +12 -12
- package/dist/components/input/text_editor/plugins/ResetPlugin.js +6 -6
- package/dist/components/input/text_editor/plugins/SetContentPlugin.js +6 -6
- package/dist/components/input/text_editor/plugins/ToolbarPlugin.js +21 -21
- package/dist/components/intl/intl_provider/IntlProvider.js +6 -6
- package/dist/components/list/paginated_list/PaginatedList.js +16 -16
- package/dist/components/list/paginated_list/VotePaginatedList.js +6 -6
- package/dist/components/list/paginated_list/action_bar/ActionBar.js +7 -7
- package/dist/components/navbar/navbar_button/NavbarButton.js +3 -3
- package/dist/components/navbar/navbar_modal/NavbarModal.js +11 -11
- package/dist/components/notification/notification_menu/NotificationMenu.js +4 -4
- package/dist/components/proposal/proposal_box/ProposalBox.js +8 -8
- package/dist/components/share/share_box/ShareBox.js +17 -17
- package/dist/components/source/context_source_list/ContextSourceList.js +3 -3
- package/dist/components/source/source_modal/SourceModal.js +16 -16
- package/dist/components/suggestion/suggestion_banner/SuggestionBanner.js +14 -14
- package/dist/components/suggestion/suggestion_box/SuggestionBox.js +6 -6
- package/dist/components/suggestion/suggestion_input/SuggestionInput.js +13 -12
- package/dist/components/user/avatar/Avatar.js +7 -7
- package/dist/components/user/update_user_info_modal/UpdateUserInfoModal.js +17 -15
- package/dist/components/user_content/content_footer/ContentFooter.js +11 -11
- package/dist/components/user_content/summary_content_box/SummaryContentBox.js +6 -6
- package/dist/components/user_content/use_delete_content/useDeleteContent.js +7 -7
- package/dist/components/user_content/use_report_content/ReportModal.js +9 -9
- package/dist/components/vote/use_vote/useVote.js +3 -3
- package/dist/components/vote/vote_box/VoteBox.js +7 -7
- package/dist/index.js +56 -56
- package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalCharacterLimitPlugin.prod.js +57 -57
- package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalComposer.prod.js +14 -14
- package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalContentEditable.prod.js +15 -15
- package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalListPlugin.prod.js +6 -6
- package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalOnChangePlugin.prod.js +1 -1
- package/dist/node_modules/.pnpm/@lexical_react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalRichTextPlugin.prod.js +21 -21
- package/package.json +6 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { require_jsx_runtime as e } from "../../../../react@18.3.1/node_modules/react/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { U as t } from "../../../../@lexical_utils@0.38.2/node_modules/@lexical/utils/LexicalUtils.prod.js";
|
|
3
|
+
import { o as n } from "./LexicalComposerContext.prod.js";
|
|
4
4
|
import { g as r } from "../../../../@lexical_text@0.38.2/node_modules/@lexical/text/LexicalText.prod.js";
|
|
5
5
|
import { forwardRef as i, useCallback as a, useEffect as o, useLayoutEffect as s, useMemo as c, useState as l } from "react";
|
|
6
6
|
//#region node_modules/.pnpm/@lexical+react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalContentEditable.prod.mjs
|
|
@@ -47,34 +47,34 @@ function m(e) {
|
|
|
47
47
|
return e.getEditorState().read(r(e.isComposing()));
|
|
48
48
|
}
|
|
49
49
|
var h = i(g);
|
|
50
|
-
function g(e,
|
|
51
|
-
let { placeholder: r, ...i } = e, [a] =
|
|
50
|
+
function g(e, t) {
|
|
51
|
+
let { placeholder: r, ...i } = e, [a] = n();
|
|
52
52
|
return (0, u.jsxs)(u.Fragment, { children: [(0, u.jsx)(p, {
|
|
53
53
|
editor: a,
|
|
54
54
|
...i,
|
|
55
|
-
ref:
|
|
55
|
+
ref: t
|
|
56
56
|
}), r != null && (0, u.jsx)(_, {
|
|
57
57
|
editor: a,
|
|
58
58
|
content: r
|
|
59
59
|
})] });
|
|
60
60
|
}
|
|
61
|
-
function _({ content: e, editor:
|
|
61
|
+
function _({ content: e, editor: n }) {
|
|
62
62
|
let r = function(e) {
|
|
63
|
-
let [
|
|
63
|
+
let [n, r] = l(() => m(e));
|
|
64
64
|
return d(() => {
|
|
65
|
-
function
|
|
65
|
+
function n() {
|
|
66
66
|
r(m(e));
|
|
67
67
|
}
|
|
68
|
-
return
|
|
69
|
-
|
|
68
|
+
return n(), t(e.registerUpdateListener(() => {
|
|
69
|
+
n();
|
|
70
70
|
}), e.registerEditableListener(() => {
|
|
71
|
-
|
|
71
|
+
n();
|
|
72
72
|
}));
|
|
73
|
-
}, [e]),
|
|
74
|
-
}(
|
|
75
|
-
if (s(() => (a(
|
|
73
|
+
}, [e]), n;
|
|
74
|
+
}(n), [i, a] = l(n.isEditable());
|
|
75
|
+
if (s(() => (a(n.isEditable()), n.registerEditableListener((e) => {
|
|
76
76
|
a(e);
|
|
77
|
-
})), [
|
|
77
|
+
})), [n]), !r) return null;
|
|
78
78
|
let o = null;
|
|
79
79
|
return typeof e == "function" ? o = e(i) : e !== null && (o = e), o === null ? null : (0, u.jsx)("div", {
|
|
80
80
|
"aria-hidden": !0,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Lt as e, bt as t, lt as n, nt as r } from "../../../../@lexical_list@0.38.2/node_modules/@lexical/list/LexicalList.prod.js";
|
|
2
|
+
import { o as i } from "./LexicalComposerContext.prod.js";
|
|
3
3
|
import { useEffect as a } from "react";
|
|
4
4
|
//#region node_modules/.pnpm/@lexical+react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalListPlugin.prod.mjs
|
|
5
5
|
function o({ hasStrictIndent: o = !1 }) {
|
|
6
|
-
let [s] =
|
|
6
|
+
let [s] = i();
|
|
7
7
|
return a(() => {
|
|
8
|
-
if (!s.hasNodes([
|
|
8
|
+
if (!s.hasNodes([n, r])) throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
|
|
9
9
|
}, [s]), a(() => {
|
|
10
|
-
if (o) return
|
|
10
|
+
if (o) return e(s);
|
|
11
11
|
}, [s, o]), function(e) {
|
|
12
|
-
a(() =>
|
|
12
|
+
a(() => t(e), [e]);
|
|
13
13
|
}(s), null;
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as e } from "./LexicalComposerContext.prod.js";
|
|
2
1
|
import "../../../../lexical@0.38.2/node_modules/lexical/Lexical.prod.js";
|
|
2
|
+
import { o as e } from "./LexicalComposerContext.prod.js";
|
|
3
3
|
import { useEffect as t, useLayoutEffect as n } from "react";
|
|
4
4
|
//#region node_modules/.pnpm/@lexical+react@0.38.2_react-dom@18.3.1_react@18.3.1__react@18.3.1_yjs@13.6.30/node_modules/@lexical/react/LexicalOnChangePlugin.prod.mjs
|
|
5
5
|
var r = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? n : t;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { require_jsx_runtime as e } from "../../../../react@18.3.1/node_modules/react/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { U as t } from "../../../../@lexical_utils@0.38.2/node_modules/@lexical/utils/LexicalUtils.prod.js";
|
|
3
|
+
import { Bt as n } from "../../../../@lexical_extension@0.38.2/node_modules/@lexical/extension/LexicalExtension.prod.js";
|
|
4
|
+
import { o as r } from "./LexicalComposerContext.prod.js";
|
|
5
|
+
import { g as i } from "../../../../@lexical_text@0.38.2/node_modules/@lexical/text/LexicalText.prod.js";
|
|
6
|
+
import { a } from "./useLexicalEditable.prod.js";
|
|
7
|
+
import { r as o } from "./LexicalReactProviderExtension.prod.js";
|
|
8
8
|
import { s } from "../../../../@lexical_dragon@0.38.2/node_modules/@lexical/dragon/LexicalDragon.prod.js";
|
|
9
9
|
import { Jt as c } from "../../../../@lexical_rich-text@0.38.2/node_modules/@lexical/rich-text/LexicalRichText.prod.js";
|
|
10
10
|
import { Suspense as l, useEffect as u, useLayoutEffect as d, useMemo as f, useState as p } from "react";
|
|
@@ -49,8 +49,8 @@ function y({ editor: e, ErrorBoundary: t }) {
|
|
|
49
49
|
}
|
|
50
50
|
function b({ editor: e, ErrorBoundary: t }) {
|
|
51
51
|
return function(e) {
|
|
52
|
-
let t =
|
|
53
|
-
if (t && t.hasExtensionByName(
|
|
52
|
+
let t = n.maybeFromEditor(e);
|
|
53
|
+
if (t && t.hasExtensionByName(o.name)) {
|
|
54
54
|
for (let e of ["@lexical/plain-text", "@lexical/rich-text"]) t.hasExtensionByName(e) && _(320, e);
|
|
55
55
|
return !0;
|
|
56
56
|
}
|
|
@@ -61,12 +61,12 @@ function b({ editor: e, ErrorBoundary: t }) {
|
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
function x(e) {
|
|
64
|
-
return e.getEditorState().read(
|
|
64
|
+
return e.getEditorState().read(i(e.isComposing()));
|
|
65
65
|
}
|
|
66
66
|
function S({ contentEditable: e, placeholder: n = null, ErrorBoundary: i }) {
|
|
67
|
-
let [a] =
|
|
67
|
+
let [a] = r();
|
|
68
68
|
return function(e) {
|
|
69
|
-
v(() =>
|
|
69
|
+
v(() => t(c(e), s(e)), [e]);
|
|
70
70
|
}(a), (0, g.jsxs)(g.Fragment, { children: [
|
|
71
71
|
e,
|
|
72
72
|
(0, g.jsx)(C, { content: n }),
|
|
@@ -77,20 +77,20 @@ function S({ contentEditable: e, placeholder: n = null, ErrorBoundary: i }) {
|
|
|
77
77
|
] });
|
|
78
78
|
}
|
|
79
79
|
function C({ content: e }) {
|
|
80
|
-
let [
|
|
81
|
-
let [
|
|
80
|
+
let [n] = r(), i = function(e) {
|
|
81
|
+
let [n, r] = p(() => x(e));
|
|
82
82
|
return v(() => {
|
|
83
|
-
function
|
|
84
|
-
|
|
83
|
+
function n() {
|
|
84
|
+
r(x(e));
|
|
85
85
|
}
|
|
86
|
-
return
|
|
87
|
-
|
|
86
|
+
return n(), t(e.registerUpdateListener(() => {
|
|
87
|
+
n();
|
|
88
88
|
}), e.registerEditableListener(() => {
|
|
89
|
-
|
|
89
|
+
n();
|
|
90
90
|
}));
|
|
91
|
-
}, [e]),
|
|
92
|
-
}(
|
|
93
|
-
return
|
|
91
|
+
}, [e]), n;
|
|
92
|
+
}(n), o = a();
|
|
93
|
+
return i ? typeof e == "function" ? e(o) : e : null;
|
|
94
94
|
}
|
|
95
95
|
//#endregion
|
|
96
96
|
export { S as L };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logora/debate",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"description": "Design system of @Logora made with React",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
"dev": "storybook dev -p 6006",
|
|
22
22
|
"storybook": "storybook dev -p 6006",
|
|
23
23
|
"build-storybook": "storybook build",
|
|
24
|
+
"format": "npx @biomejs/biome format --write ./src",
|
|
25
|
+
"lint": "npx @biomejs/biome lint ./src",
|
|
26
|
+
"check": "npx @biomejs/biome check ./src",
|
|
24
27
|
"test": "vitest run",
|
|
25
28
|
"test:watch": "vitest",
|
|
26
29
|
"test:coverage": "vitest run --coverage"
|
|
@@ -77,8 +80,10 @@
|
|
|
77
80
|
"webfontloader": "^1.6.28"
|
|
78
81
|
},
|
|
79
82
|
"devDependencies": {
|
|
83
|
+
"@biomejs/biome": "^1.9.4",
|
|
80
84
|
"@faker-js/faker": "^10.4.0",
|
|
81
85
|
"@storybook/addon-a11y": "^10.3.5",
|
|
86
|
+
"@storybook/addon-docs": "^10.3.5",
|
|
82
87
|
"@storybook/react": "^10.3.5",
|
|
83
88
|
"@storybook/react-vite": "^10.3.5",
|
|
84
89
|
"@testing-library/dom": "^10.4.0",
|