@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.
Files changed (58) hide show
  1. package/README.md +14 -23
  2. package/dist/components/action/button/Button.js +1 -1
  3. package/dist/components/argument/argument/Argument.js +49 -49
  4. package/dist/components/argument/top_arguments/TopArguments.js +17 -17
  5. package/dist/components/auth/auth_initializer/AuthInitializer.js +5 -5
  6. package/dist/components/auth/auth_modal/AuthModal.js +9 -9
  7. package/dist/components/auth/login_form/LoginForm.js +1 -0
  8. package/dist/components/auth/oauth2_button/OAuth2Button.js +3 -3
  9. package/dist/components/auth/providers/AuthProviderFactory.js +4 -4
  10. package/dist/components/auth/signup_form/SignupForm.js +4 -4
  11. package/dist/components/auth/social_auth_form/SocialAuthForm.js +10 -10
  12. package/dist/components/auth/sso_form/SSOForm.js +4 -4
  13. package/dist/components/chart/line_chart/LineChart.js +10 -10
  14. package/dist/components/chart/pie_chart/PieChart.js +6 -10
  15. package/dist/components/consultation/consultation_box/ConsultationBox.js +19 -14
  16. package/dist/components/debate/debate_box/DebateBox.js +11 -11
  17. package/dist/components/dialog/drawer/Drawer.js +16 -16
  18. package/dist/components/dialog/modal/Modal.js +8 -8
  19. package/dist/components/dialog/toast_provider/ToastProvider.js +10 -10
  20. package/dist/components/hooks/use_responsive/ResponsiveProvider.js +4 -4
  21. package/dist/components/input/argument_input/ArgumentInput.js +100 -99
  22. package/dist/components/input/search_input/SearchInput.js +4 -4
  23. package/dist/components/input/text_editor/TextEditor.js +50 -50
  24. package/dist/components/input/text_editor/lexicalToHtml.js +7 -7
  25. package/dist/components/input/text_editor/plugins/MaxLengthPlugin.js +12 -12
  26. package/dist/components/input/text_editor/plugins/ResetPlugin.js +6 -6
  27. package/dist/components/input/text_editor/plugins/SetContentPlugin.js +6 -6
  28. package/dist/components/input/text_editor/plugins/ToolbarPlugin.js +21 -21
  29. package/dist/components/intl/intl_provider/IntlProvider.js +6 -6
  30. package/dist/components/list/paginated_list/PaginatedList.js +16 -16
  31. package/dist/components/list/paginated_list/VotePaginatedList.js +6 -6
  32. package/dist/components/list/paginated_list/action_bar/ActionBar.js +7 -7
  33. package/dist/components/navbar/navbar_button/NavbarButton.js +3 -3
  34. package/dist/components/navbar/navbar_modal/NavbarModal.js +11 -11
  35. package/dist/components/notification/notification_menu/NotificationMenu.js +4 -4
  36. package/dist/components/proposal/proposal_box/ProposalBox.js +8 -8
  37. package/dist/components/share/share_box/ShareBox.js +17 -17
  38. package/dist/components/source/context_source_list/ContextSourceList.js +3 -3
  39. package/dist/components/source/source_modal/SourceModal.js +16 -16
  40. package/dist/components/suggestion/suggestion_banner/SuggestionBanner.js +14 -14
  41. package/dist/components/suggestion/suggestion_box/SuggestionBox.js +6 -6
  42. package/dist/components/suggestion/suggestion_input/SuggestionInput.js +13 -12
  43. package/dist/components/user/avatar/Avatar.js +7 -7
  44. package/dist/components/user/update_user_info_modal/UpdateUserInfoModal.js +17 -15
  45. package/dist/components/user_content/content_footer/ContentFooter.js +11 -11
  46. package/dist/components/user_content/summary_content_box/SummaryContentBox.js +6 -6
  47. package/dist/components/user_content/use_delete_content/useDeleteContent.js +7 -7
  48. package/dist/components/user_content/use_report_content/ReportModal.js +9 -9
  49. package/dist/components/vote/use_vote/useVote.js +3 -3
  50. package/dist/components/vote/vote_box/VoteBox.js +7 -7
  51. package/dist/index.js +56 -56
  52. 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
  53. 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
  54. 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
  55. 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
  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/LexicalOnChangePlugin.prod.js +1 -1
  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/LexicalRichTextPlugin.prod.js +21 -21
  58. package/package.json +6 -1
@@ -4,18 +4,18 @@ import { Link as n } from "../../action/link/Link.js";
4
4
  import { Icon as r } from "../../icons/icon/Icon.js";
5
5
  import { require_classnames as i } from "../../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js";
6
6
  import a from "../../../node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/message.js";
7
- import { useTranslatedContent as o } from "../../translation/translated_content/useTranslatedContent.js";
8
- import { ContentHeader as s } from "../content_header/ContentHeader.js";
9
- import { ReadMore as c } from "../../text/read_more/ReadMore.js";
7
+ import { ReadMore as o } from "../../text/read_more/ReadMore.js";
8
+ import { useTranslatedContent as s } from "../../translation/translated_content/useTranslatedContent.js";
9
+ import { ContentHeader as c } from "../content_header/ContentHeader.js";
10
10
  import l from "./SummaryContentBox.module.js";
11
11
  import "react";
12
12
  //#region src/components/user_content/summary_content_box/SummaryContentBox.jsx
13
13
  var u = /* @__PURE__ */ e(i()), d = t(), f = ({ author: e, tag: t, date: i, title: f = "", content: p, link: m, contentCount: h = 0, tagClassName: g, headerOneLine: _ = !1, showFooter: v = !1, language: y, lineCount: b, translationEntries: x = [] }) => {
14
- let S = o(f, y, "title", x), C = o(p, y, "content", x);
14
+ let S = s(f, y, "title", x), C = s(p, y, "content", x);
15
15
  return /* @__PURE__ */ (0, d.jsx)("div", {
16
16
  className: l.contentBox,
17
17
  children: /* @__PURE__ */ (0, d.jsxs)(d.Fragment, { children: [
18
- /* @__PURE__ */ (0, d.jsx)(s, {
18
+ /* @__PURE__ */ (0, d.jsx)(c, {
19
19
  author: e,
20
20
  tag: t,
21
21
  tagClassName: g,
@@ -27,7 +27,7 @@ var u = /* @__PURE__ */ e(i()), d = t(), f = ({ author: e, tag: t, date: i, titl
27
27
  children: [f && /* @__PURE__ */ (0, d.jsx)("div", {
28
28
  className: l.title,
29
29
  children: S.translatedContent
30
- }), /* @__PURE__ */ (0, d.jsx)(c, {
30
+ }), /* @__PURE__ */ (0, d.jsx)(o, {
31
31
  content: C.translatedContent,
32
32
  charCount: b ? void 0 : 200,
33
33
  lineCount: b ?? void 0,
@@ -1,17 +1,17 @@
1
1
  import { require_jsx_runtime as e } from "../../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js";
2
2
  import { useAuth as t } from "../../auth/use_auth/useAuth.js";
3
3
  import { useDataProvider as n } from "../../data/data_provider/useDataProvider.js";
4
- import r from "../../../node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/useIntl.js";
5
- import { useModal as i } from "../../dialog/modal/useModal.js";
6
- import { useAuthRequired as a } from "../../hooks/use_auth_required/useAuthRequired.js";
7
- import { useList as o } from "../../list/list_provider/useList.js";
4
+ import { useList as r } from "../../list/list_provider/useList.js";
5
+ import i from "../../../node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/useIntl.js";
6
+ import { useModal as a } from "../../dialog/modal/useModal.js";
7
+ import { ConfirmModal as o } from "../../dialog/confirm_modal/ConfirmModal.js";
8
8
  import { useToast as s } from "../../dialog/toast_provider/useToast.js";
9
- import { ConfirmModal as c } from "../../dialog/confirm_modal/ConfirmModal.js";
9
+ import { useAuthRequired as c } from "../../hooks/use_auth_required/useAuthRequired.js";
10
10
  import "react";
11
11
  //#region src/components/user_content/use_delete_content/useDeleteContent.jsx
12
12
  var l = e(), u = (e, u, d, f = !1, p, m, h) => {
13
- let { showModal: g } = i(), { isLoggedIn: _ } = t(), v = r(), y = o(), b = n(), { toast: x } = s() || {}, S = a(), C = () => {
14
- _ ? g(/* @__PURE__ */ (0, l.jsx)(c, {
13
+ let { showModal: g } = a(), { isLoggedIn: _ } = t(), v = i(), y = r(), b = n(), { toast: x } = s() || {}, S = c(), C = () => {
14
+ _ ? g(/* @__PURE__ */ (0, l.jsx)(o, {
15
15
  title: p || v.formatMessage({
16
16
  id: "info.delete_content_title",
17
17
  defaultMessage: "Delete content"
@@ -4,17 +4,17 @@ import { require_classnames as n } from "../../../node_modules/.pnpm/classnames@
4
4
  import { Button as r } from "../../action/button/Button.js";
5
5
  import { useAuth as i } from "../../auth/use_auth/useAuth.js";
6
6
  import { useDataProvider as a } from "../../data/data_provider/useDataProvider.js";
7
- import o from "../../../node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/useIntl.js";
8
- import { useModal as s } from "../../dialog/modal/useModal.js";
9
- import { Modal as c } from "../../dialog/modal/Modal.js";
10
- import { Select as l } from "../../input/select/Select.js";
11
- import { Loader as u } from "../../progress/loader/Loader.js";
7
+ import { Loader as o } from "../../progress/loader/Loader.js";
8
+ import s from "../../../node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/useIntl.js";
9
+ import { Select as c } from "../../input/select/Select.js";
10
+ import { useModal as l } from "../../dialog/modal/useModal.js";
11
+ import { Modal as u } from "../../dialog/modal/Modal.js";
12
12
  import d from "./ReportModal.module.js";
13
13
  import { useState as f } from "react";
14
14
  //#region src/components/user_content/use_report_content/ReportModal.jsx
15
15
  var p = /* @__PURE__ */ e(n()), m = t(), h = (e) => {
16
- let [t, n] = f("SUBMIT"), [h, g] = f(""), [_, v] = f(""), [y, b] = f(""), [x, S] = f(""), [C, w] = f(""), [T, E] = f(!1), { hideModal: D } = s(), { isLoggedIn: O, currentUser: k } = i(), A = o(), j = a();
17
- return /* @__PURE__ */ (0, m.jsx)("div", { children: /* @__PURE__ */ (0, m.jsx)(c, {
16
+ let [t, n] = f("SUBMIT"), [h, g] = f(""), [_, v] = f(""), [y, b] = f(""), [x, S] = f(""), [C, w] = f(""), [T, E] = f(!1), { hideModal: D } = l(), { isLoggedIn: O, currentUser: k } = i(), A = s(), j = a();
17
+ return /* @__PURE__ */ (0, m.jsx)("div", { children: /* @__PURE__ */ (0, m.jsx)(u, {
18
18
  "data-vid": "report_modal",
19
19
  title: e.title || A.formatMessage({
20
20
  id: "report.report_modal.title",
@@ -52,7 +52,7 @@ var p = /* @__PURE__ */ e(n()), m = t(), h = (e) => {
52
52
  id: "report.report_modal.type_input_label",
53
53
  defaultMessage: "Report type"
54
54
  })
55
- }), /* @__PURE__ */ (0, m.jsx)(l, {
55
+ }), /* @__PURE__ */ (0, m.jsx)(c, {
56
56
  onChange: (e) => v(e.value),
57
57
  options: [
58
58
  {
@@ -241,7 +241,7 @@ var p = /* @__PURE__ */ e(n()), m = t(), h = (e) => {
241
241
  })
242
242
  ]
243
243
  }),
244
- LOADING: /* @__PURE__ */ (0, m.jsx)(u, {}),
244
+ LOADING: /* @__PURE__ */ (0, m.jsx)(o, {}),
245
245
  SUCCESS: /* @__PURE__ */ (0, m.jsxs)("div", { children: [/* @__PURE__ */ (0, m.jsx)("div", {
246
246
  className: d.successText,
247
247
  children: A.formatMessage({
@@ -1,11 +1,11 @@
1
1
  import { useAuth as e } from "../../auth/use_auth/useAuth.js";
2
2
  import { useDataProvider as t } from "../../data/data_provider/useDataProvider.js";
3
- import { useAuthRequired as n } from "../../hooks/use_auth_required/useAuthRequired.js";
4
- import { VoteContext as r } from "../vote_provider/VoteProvider.js";
3
+ import { VoteContext as n } from "../vote_provider/VoteProvider.js";
4
+ import { useAuthRequired as r } from "../../hooks/use_auth_required/useAuthRequired.js";
5
5
  import { useContext as i, useEffect as a, useState as o } from "react";
6
6
  //#region src/components/vote/use_vote/useVote.jsx
7
7
  var s = (s, c, l, u, d = null) => {
8
- let { votes: f } = i(r), { isLoggedIn: p } = e(), m = t(), [h, g] = o(!1), [_, v] = o(!0), [y, b] = o(), [x, S] = o(l), [C, w] = o(u), [T, E] = o(!1), [D, O] = o(!1), k = n();
8
+ let { votes: f } = i(n), { isLoggedIn: p } = e(), m = t(), [h, g] = o(!1), [_, v] = o(!0), [y, b] = o(), [x, S] = o(l), [C, w] = o(u), [T, E] = o(!1), [D, O] = o(!1), k = r();
9
9
  a(() => {
10
10
  if (!D && p && Object.keys(f).length > 0 && c in f) {
11
11
  let e = f[c];
@@ -7,13 +7,13 @@ import { Button as a } from "../../action/button/Button.js";
7
7
  import { useAuth as ee } from "../../auth/use_auth/useAuth.js";
8
8
  import { useDataProvider as o } from "../../data/data_provider/useDataProvider.js";
9
9
  import { useConfig as te } from "../../data/config_provider/useConfig.js";
10
+ import { useResponsive as ne } from "../../hooks/use_responsive/useResponsive.js";
10
11
  import s from "../../../node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/useIntl.js";
11
12
  import c from "../../../node_modules/.pnpm/react-intl@7.1.14_react@18.3.1_typescript@5.9.3/node_modules/react-intl/lib/src/components/message.js";
12
13
  import { useTranslatedContent as l } from "../../translation/translated_content/useTranslatedContent.js";
13
14
  import { Tooltip as u } from "../../dialog/tooltip/Tooltip.js";
14
- import { useAuthRequired as ne } from "../../hooks/use_auth_required/useAuthRequired.js";
15
15
  import { useToast as re } from "../../dialog/toast_provider/useToast.js";
16
- import { useResponsive as ie } from "../../hooks/use_responsive/useResponsive.js";
16
+ import { useAuthRequired as ie } from "../../hooks/use_auth_required/useAuthRequired.js";
17
17
  import d from "../../../node_modules/.pnpm/@rooks_use-sessionstorage-state@4.11.2_react@18.3.1/node_modules/@rooks/use-sessionstorage-state/lib/index.esm.js";
18
18
  import { ProgressBar as ae } from "../../progress/progress_bar/ProgressBar.js";
19
19
  import f from "./VoteBox.module.js";
@@ -21,13 +21,13 @@ import { useEffect as p, useState as m } from "react";
21
21
  import { useLocation as oe } from "react-router";
22
22
  //#region src/components/vote/vote_box/VoteBox.jsx
23
23
  var h = /* @__PURE__ */ e(i()), g = t(), _ = ({ numberVotes: e, votePositions: t, voteableType: i, voteableId: _, redirectUrl: v, displayColumn: y, textAlignLeft: se, showTotal: ce = !0, voteBoxClassName: b, buttonContainerClassName: x, buttonClassName: S, showResultClassName: C, onVote: w, disabled: T = !1, showVotesCommentsNumber: le = !1, commentsCount: ue }) => {
24
- let [E, D] = m(!0), [O, k] = m(void 0), [A, j] = m(!1), [M, de] = m(parseFloat(e.total) || Object.values(e).reduce((e, t) => e + parseFloat(t), 0) || 0), N = l(t[0]?.name, t[0]?.language, "name", t[0]?.translation_entries), P = l(t[1]?.name, t[1]?.language, "name", t[1]?.translation_entries), F = l(t[2]?.name, t[2]?.language, "name", t[2]?.translation_entries), [I, fe, L] = d("storedUserVote", {}), [pe, R, z] = d("userSide", {}), { toast: B } = re() || {}, { isMobile: V } = ie(), [H, U] = m((() => {
24
+ let [E, D] = m(!0), [O, k] = m(void 0), [A, j] = m(!1), [M, de] = m(Number.parseFloat(e.total) || Object.values(e).reduce((e, t) => e + Number.parseFloat(t), 0) || 0), N = l(t[0]?.name, t[0]?.language, "name", t[0]?.translation_entries), P = l(t[1]?.name, t[1]?.language, "name", t[1]?.translation_entries), F = l(t[2]?.name, t[2]?.language, "name", t[2]?.translation_entries), [I, fe, L] = d("storedUserVote", {}), [pe, R, z] = d("userSide", {}), { toast: B } = re() || {}, { isMobile: V } = ne(), [H, U] = m((() => {
25
25
  let n = {};
26
26
  return t?.forEach((t) => n[t.id] = {
27
- count: parseFloat(e[t.id]) || 0,
27
+ count: Number.parseFloat(e[t.id]) || 0,
28
28
  percentage: M === 0 ? 0 : Math.round(100 * ((e[t.id] || 0) / M))
29
29
  }), n;
30
- })()), W = ne(), me = oe(), G = o(), K = te(), q = s(), { isLoggedIn: J, isLoggingIn: Y } = ee();
30
+ })()), W = ie(), me = oe(), G = o(), K = te(), q = s(), { isLoggedIn: J, isLoggingIn: Y } = ee();
31
31
  p(() => {
32
32
  Y === !1 && (J ? ge(_) : D(!1));
33
33
  }, [Y, J]), p(() => {
@@ -41,7 +41,7 @@ var h = /* @__PURE__ */ e(i()), g = t(), _ = ({ numberVotes: e, votePositions: t
41
41
  let he = () => {
42
42
  if (I && Object.keys(I).length !== 0) return I.groupId === _ && I.voteableType === i ? [!0, I.positionId] : (L(), [!1, !1]);
43
43
  let e = new URLSearchParams(typeof window < "u" ? window.location.search : me.search);
44
- return [!!e.get("initVote"), parseInt(e.get("positionId")) || !1];
44
+ return [!!e.get("initVote"), Number.parseInt(e.get("positionId")) || !1];
45
45
  }, ge = (e) => {
46
46
  D(!0), w && w(O), G.getOneWithToken("votes", `${i.toLowerCase()}/${e}`, {}).then((e) => {
47
47
  e.data.data.resource ? (k(e.data.data.resource), j(!0), D(!1)) : (D(!1), j(!1));
@@ -121,7 +121,7 @@ var h = /* @__PURE__ */ e(i()), g = t(), _ = ({ numberVotes: e, votePositions: t
121
121
  [f.textAlignLeft]: se,
122
122
  [S]: S
123
123
  }),
124
- onClick: r ? (() => Q(e.id)) : null,
124
+ onClick: r ? () => Q(e.id) : null,
125
125
  disabled: T,
126
126
  "data-testid": "voteButton",
127
127
  to: r ? null : Z(e.id),
package/dist/index.js CHANGED
@@ -22,61 +22,61 @@ import { ConfigContext as S, ConfigProvider as C } from "./components/data/confi
22
22
  import { useConfig as w } from "./components/data/config_provider/useConfig.js";
23
23
  import { useRoutes as T } from "./components/data/config_provider/useRoutes.js";
24
24
  import { withConfig as E } from "./components/data/config_provider/withConfig.js";
25
- import { getTranslatedContent as D, useTranslatedContent as O } from "./components/translation/translated_content/useTranslatedContent.js";
26
- import { TranslatedContent as k } from "./components/translation/translated_content/TranslatedContent.js";
27
- import { useRelativeTime as A } from "./components/hooks/use_relative_time/useRelativeTime.js";
28
- import { Tooltip as j } from "./components/dialog/tooltip/Tooltip.js";
29
- import { Avatar as M } from "./components/user/avatar/Avatar.js";
30
- import { LANGUAGES as N, getLocaleIcon as P, getLocaleName as F } from "./components/util/lang_emojis/langEmojis.js";
31
- import { AuthorBox as I } from "./components/user/author_box/AuthorBox.js";
32
- import { UserBoxSmall as L } from "./components/user/user_box_small/UserBoxSmall.js";
33
- import { ContentHeader as R } from "./components/user_content/content_header/ContentHeader.js";
34
- import { ReadMore as z } from "./components/text/read_more/ReadMore.js";
35
- import { TranslationButton as B } from "./components/translation/translation_button/TranslationButton.js";
36
- import { UserContentSkeleton as V } from "./components/skeleton/user_content_skeleton/UserContentSkeleton.js";
37
- import { AnnouncementDialog as H } from "./components/dialog/announcement_dialog/AnnouncementDialog.js";
38
- import { SourceListItem as U } from "./components/source/source_list_item/SourceListItem.js";
39
- import { InputProvider as W } from "./components/input/input_provider/InputProvider.js";
40
- import { useInput as G } from "./components/input/input_provider/useInput.js";
41
- import { ModalContext as K, ModalProvider as q } from "./components/dialog/modal/ModalProvider.js";
42
- import { useModal as J } from "./components/dialog/modal/useModal.js";
43
- import { Modal as Y } from "./components/dialog/modal/Modal.js";
44
- import { useAuthRequired as X } from "./components/hooks/use_auth_required/useAuthRequired.js";
45
- import { Dropdown as Z } from "./components/dialog/dropdown/Dropdown.js";
46
- import { Select as Q } from "./components/input/select/Select.js";
47
- import { Loader as $ } from "./components/progress/loader/Loader.js";
48
- import { useReportContent as ee } from "./components/user_content/use_report_content/useReportContent.js";
49
- import { ListProvider as te } from "./components/list/list_provider/ListProvider.js";
50
- import { useList as ne } from "./components/list/list_provider/useList.js";
51
- import { Toast as re } from "./components/dialog/toast/Toast.js";
52
- import { ToastProvider as ie } from "./components/dialog/toast_provider/ToastProvider.js";
53
- import { useToast as ae } from "./components/dialog/toast_provider/useToast.js";
54
- import { ConfirmModal as oe } from "./components/dialog/confirm_modal/ConfirmModal.js";
55
- import { useDeleteContent as se } from "./components/user_content/use_delete_content/useDeleteContent.js";
56
- import { ShareBox as ce } from "./components/share/share_box/ShareBox.js";
57
- import { ShareButton as le } from "./components/share/share_button/ShareButton.js";
58
- import { ResponsiveProvider as ue } from "./components/hooks/use_responsive/ResponsiveProvider.js";
59
- import { useResponsive as de } from "./components/hooks/use_responsive/useResponsive.js";
60
- import { ContentFooter as fe } from "./components/user_content/content_footer/ContentFooter.js";
61
- import { VoteContext as pe, VoteProvider as me } from "./components/vote/vote_provider/VoteProvider.js";
62
- import { useVote as he } from "./components/vote/use_vote/useVote.js";
63
- import { VoteButton as ge } from "./components/vote/vote_button/VoteButton.js";
64
- import { FormContext as _e } from "./components/forms/form/form-context.js";
65
- import { useFormContext as ve } from "./components/forms/form/use-form-context.js";
66
- import { Form as ye } from "./components/forms/form/form.js";
67
- import { useForm as be } from "./components/forms/form/use-form.js";
68
- import { extractFormData as xe } from "./components/forms/form/extract-form-data.js";
69
- import { classes as Se, getAccent as Ce } from "./components/input/text_input/color-accent.js";
70
- import { Message as we } from "./components/input/text_input/message.js";
71
- import { TextInput as Te } from "./components/input/text_input/TextInput.js";
72
- import { SearchInput as Ee } from "./components/input/search_input/SearchInput.js";
73
- import { Tag as De } from "./components/tag/tag/Tag.js";
74
- import { ActionBar as Oe } from "./components/list/paginated_list/action_bar/ActionBar.js";
75
- import { Pagination as ke } from "./components/list/pagination/Pagination.js";
76
- import { uniqueBy as Ae } from "./components/util/unique_by/uniqueBy.js";
77
- import { PaginatedList as je } from "./components/list/paginated_list/PaginatedList.js";
78
- import { VotePaginatedList as Me } from "./components/list/paginated_list/VotePaginatedList.js";
79
- import { HashScroll as Ne } from "./components/tools/hash_scroll/HashScroll.js";
25
+ import { AnnouncementDialog as D } from "./components/dialog/announcement_dialog/AnnouncementDialog.js";
26
+ import { ResponsiveProvider as O } from "./components/hooks/use_responsive/ResponsiveProvider.js";
27
+ import { useResponsive as k } from "./components/hooks/use_responsive/useResponsive.js";
28
+ import { ListProvider as A } from "./components/list/list_provider/ListProvider.js";
29
+ import { useList as j } from "./components/list/list_provider/useList.js";
30
+ import { Loader as M } from "./components/progress/loader/Loader.js";
31
+ import { Pagination as N } from "./components/list/pagination/Pagination.js";
32
+ import { uniqueBy as P } from "./components/util/unique_by/uniqueBy.js";
33
+ import { FormContext as F } from "./components/forms/form/form-context.js";
34
+ import { useFormContext as I } from "./components/forms/form/use-form-context.js";
35
+ import { Form as L } from "./components/forms/form/form.js";
36
+ import { useForm as R } from "./components/forms/form/use-form.js";
37
+ import { extractFormData as z } from "./components/forms/form/extract-form-data.js";
38
+ import { classes as B, getAccent as V } from "./components/input/text_input/color-accent.js";
39
+ import { Message as H } from "./components/input/text_input/message.js";
40
+ import { TextInput as U } from "./components/input/text_input/TextInput.js";
41
+ import { SearchInput as W } from "./components/input/search_input/SearchInput.js";
42
+ import { Dropdown as G } from "./components/dialog/dropdown/Dropdown.js";
43
+ import { Select as K } from "./components/input/select/Select.js";
44
+ import { Tag as q } from "./components/tag/tag/Tag.js";
45
+ import { ActionBar as J } from "./components/list/paginated_list/action_bar/ActionBar.js";
46
+ import { PaginatedList as Y } from "./components/list/paginated_list/PaginatedList.js";
47
+ import { VoteContext as X, VoteProvider as Z } from "./components/vote/vote_provider/VoteProvider.js";
48
+ import { VotePaginatedList as Q } from "./components/list/paginated_list/VotePaginatedList.js";
49
+ import { UserContentSkeleton as $ } from "./components/skeleton/user_content_skeleton/UserContentSkeleton.js";
50
+ import { SourceListItem as ee } from "./components/source/source_list_item/SourceListItem.js";
51
+ import { ReadMore as te } from "./components/text/read_more/ReadMore.js";
52
+ import { HashScroll as ne } from "./components/tools/hash_scroll/HashScroll.js";
53
+ import { getTranslatedContent as re, useTranslatedContent as ie } from "./components/translation/translated_content/useTranslatedContent.js";
54
+ import { TranslatedContent as ae } from "./components/translation/translated_content/TranslatedContent.js";
55
+ import { TranslationButton as oe } from "./components/translation/translation_button/TranslationButton.js";
56
+ import { ModalContext as se, ModalProvider as ce } from "./components/dialog/modal/ModalProvider.js";
57
+ import { useModal as le } from "./components/dialog/modal/useModal.js";
58
+ import { Modal as ue } from "./components/dialog/modal/Modal.js";
59
+ import { InputProvider as de } from "./components/input/input_provider/InputProvider.js";
60
+ import { useInput as fe } from "./components/input/input_provider/useInput.js";
61
+ import { Tooltip as pe } from "./components/dialog/tooltip/Tooltip.js";
62
+ import { ShareBox as me } from "./components/share/share_box/ShareBox.js";
63
+ import { ShareButton as he } from "./components/share/share_button/ShareButton.js";
64
+ import { ConfirmModal as ge } from "./components/dialog/confirm_modal/ConfirmModal.js";
65
+ import { Toast as _e } from "./components/dialog/toast/Toast.js";
66
+ import { ToastProvider as ve } from "./components/dialog/toast_provider/ToastProvider.js";
67
+ import { useToast as ye } from "./components/dialog/toast_provider/useToast.js";
68
+ import { useAuthRequired as be } from "./components/hooks/use_auth_required/useAuthRequired.js";
69
+ import { useDeleteContent as xe } from "./components/user_content/use_delete_content/useDeleteContent.js";
70
+ import { useReportContent as Se } from "./components/user_content/use_report_content/useReportContent.js";
71
+ import { ContentFooter as Ce } from "./components/user_content/content_footer/ContentFooter.js";
72
+ import { useRelativeTime as we } from "./components/hooks/use_relative_time/useRelativeTime.js";
73
+ import { Avatar as Te } from "./components/user/avatar/Avatar.js";
74
+ import { LANGUAGES as Ee, getLocaleIcon as De, getLocaleName as Oe } from "./components/util/lang_emojis/langEmojis.js";
75
+ import { AuthorBox as ke } from "./components/user/author_box/AuthorBox.js";
76
+ import { UserBoxSmall as Ae } from "./components/user/user_box_small/UserBoxSmall.js";
77
+ import { ContentHeader as je } from "./components/user_content/content_header/ContentHeader.js";
78
+ import { useVote as Me } from "./components/vote/use_vote/useVote.js";
79
+ import { VoteButton as Ne } from "./components/vote/vote_button/VoteButton.js";
80
80
  import { SourceBox as Pe } from "./components/source/source_box/SourceBox.js";
81
81
  import { SourceModal as Fe } from "./components/source/source_modal/SourceModal.js";
82
82
  import { lexicalToHtml as Ie } from "./components/input/text_editor/lexicalToHtml.js";
@@ -143,4 +143,4 @@ import { useUpdateUserInfo as Ht } from "./components/user/update_user_info_moda
143
143
  import { UserBox as Ut } from "./components/user/user_box/UserBox.js";
144
144
  import { Location as Wt } from "./components/util/location/Location.js";
145
145
  import { VoteBox as Gt } from "./components/vote/vote_box/VoteBox.js";
146
- export { Oe as ActionBar, o as AdUnit, H as AnnouncementDialog, Re as Argument, Pt as ArgumentSummaryBox, u as AuthContext, He as AuthInitializer, d as AuthProvider, I as AuthorBox, M as Avatar, Bt as AvatarSelector, r as BackLink, pt as BadgeBox, kt as BoxSkeleton, i as Button, vt as CheckBox, S as ConfigContext, C as ConfigProvider, oe as ConfirmModal, tt as ConsultationBox, fe as ContentFooter, R as ContentHeader, At as ContextSourceBox, jt as ContextSourceList, rt as Countdown, g as DataProviderContext, nt as DebateBox, it as DialogBox, ct as Drawer, Z as Dropdown, y as EMAIL_CONSENT_STORAGE_KEY, lt as EmbedHeader, Rt as ExpandableText, We as FacebookLoginButton, dt as FollowButton, ye as Form, _e as FormContext, Ge as GoogleLoginButton, Ne as HashScroll, n as Icon, e as IconContext, t as IconProvider, a as IconTextLink, qe as Input, W as InputProvider, bt as IntlContext, xt as IntlProvider, Ft as KeywordBox, N as LANGUAGES, Qe as LineChart, te as ListProvider, $ as Loader, Wt as Location, Ke as LoginForm, we as Message, Y as Modal, K as ModalContext, q as ModalProvider, ot as NavbarButton, at as NavbarModal, st as NotificationItem, Ue as OAuth2Button, je as PaginatedList, ke as Pagination, $e as PieChart, mt as PointBox, et as ProgressBar, wt as ProposalBox, z as ReadMore, Dt as ReportBox, ue as ResponsiveProvider, Ze as SSOForm, zt as ScrollToTop, Ee as SearchInput, Ot as SectionBox, Q as Select, ce as ShareBox, le as ShareButton, Ye as SignupForm, Xe as SocialAuthForm, Pe as SourceBox, U as SourceListItem, Fe as SourceModal, Mt as SuggestionBanner, Et as SuggestionBox, Nt as SuggestionInput, Tt as SuggestionVoteBox, Lt as Summary, It as SummaryBox, ze as SummaryContentBox, De as Tag, Te as TextInput, re as Toast, ie as ToastProvider, Je as Toggle, yt as TogglePosition, j as Tooltip, Be as TopArguments, k as TranslatedContent, B as TranslationButton, Ct as UpDownVoteBox, Vt as UpdateUserInfoModal, Ut as UserBox, L as UserBoxSmall, V as UserContentSkeleton, Gt as VoteBox, ge as VoteButton, pe as VoteContext, Me as VotePaginatedList, me as VoteProvider, c as WithAd, m as authTokenHandler, Se as classes, h as dataProvider, xe as extractFormData, Ce as getAccent, P as getLocaleIcon, F as getLocaleName, D as getTranslatedContent, Ve as httpClient, Ie as lexicalToHtml, l as makeStorage, Ae as uniqueBy, p as useAuth, b as useAuthActions, x as useAuthInterceptor, X as useAuthRequired, w as useConfig, ht as useCssTheme, v as useData, _ as useDataProvider, se as useDeleteContent, ut as useFollow, gt as useFontLoader, be as useForm, ve as useFormContext, ft as useFormValidation, s as useGoogleAdManager, G as useInput, ne as useList, St as useLocale, _t as useMatomo, J as useModal, A as useRelativeTime, ee as useReportContent, de as useResponsive, Le as useRichContent, T as useRoutes, ae as useToast, O as useTranslatedContent, Ht as useUpdateUserInfo, he as useVote, f as withAuth, E as withConfig };
146
+ export { J as ActionBar, o as AdUnit, D as AnnouncementDialog, Re as Argument, Pt as ArgumentSummaryBox, u as AuthContext, He as AuthInitializer, d as AuthProvider, ke as AuthorBox, Te as Avatar, Bt as AvatarSelector, r as BackLink, pt as BadgeBox, kt as BoxSkeleton, i as Button, vt as CheckBox, S as ConfigContext, C as ConfigProvider, ge as ConfirmModal, tt as ConsultationBox, Ce as ContentFooter, je as ContentHeader, At as ContextSourceBox, jt as ContextSourceList, rt as Countdown, g as DataProviderContext, nt as DebateBox, it as DialogBox, ct as Drawer, G as Dropdown, y as EMAIL_CONSENT_STORAGE_KEY, lt as EmbedHeader, Rt as ExpandableText, We as FacebookLoginButton, dt as FollowButton, L as Form, F as FormContext, Ge as GoogleLoginButton, ne as HashScroll, n as Icon, e as IconContext, t as IconProvider, a as IconTextLink, qe as Input, de as InputProvider, bt as IntlContext, xt as IntlProvider, Ft as KeywordBox, Ee as LANGUAGES, Qe as LineChart, A as ListProvider, M as Loader, Wt as Location, Ke as LoginForm, H as Message, ue as Modal, se as ModalContext, ce as ModalProvider, ot as NavbarButton, at as NavbarModal, st as NotificationItem, Ue as OAuth2Button, Y as PaginatedList, N as Pagination, $e as PieChart, mt as PointBox, et as ProgressBar, wt as ProposalBox, te as ReadMore, Dt as ReportBox, O as ResponsiveProvider, Ze as SSOForm, zt as ScrollToTop, W as SearchInput, Ot as SectionBox, K as Select, me as ShareBox, he as ShareButton, Ye as SignupForm, Xe as SocialAuthForm, Pe as SourceBox, ee as SourceListItem, Fe as SourceModal, Mt as SuggestionBanner, Et as SuggestionBox, Nt as SuggestionInput, Tt as SuggestionVoteBox, Lt as Summary, It as SummaryBox, ze as SummaryContentBox, q as Tag, U as TextInput, _e as Toast, ve as ToastProvider, Je as Toggle, yt as TogglePosition, pe as Tooltip, Be as TopArguments, ae as TranslatedContent, oe as TranslationButton, Ct as UpDownVoteBox, Vt as UpdateUserInfoModal, Ut as UserBox, Ae as UserBoxSmall, $ as UserContentSkeleton, Gt as VoteBox, Ne as VoteButton, X as VoteContext, Q as VotePaginatedList, Z as VoteProvider, c as WithAd, m as authTokenHandler, B as classes, h as dataProvider, z as extractFormData, V as getAccent, De as getLocaleIcon, Oe as getLocaleName, re as getTranslatedContent, Ve as httpClient, Ie as lexicalToHtml, l as makeStorage, P as uniqueBy, p as useAuth, b as useAuthActions, x as useAuthInterceptor, be as useAuthRequired, w as useConfig, ht as useCssTheme, v as useData, _ as useDataProvider, xe as useDeleteContent, ut as useFollow, gt as useFontLoader, R as useForm, I as useFormContext, ft as useFormValidation, s as useGoogleAdManager, fe as useInput, j as useList, St as useLocale, _t as useMatomo, le as useModal, we as useRelativeTime, Se as useReportContent, k as useResponsive, Le as useRichContent, T as useRoutes, ye as useToast, ie as useTranslatedContent, Ht as useUpdateUserInfo, Me as useVote, f as withAuth, E as withConfig };
@@ -1,31 +1,31 @@
1
1
  import { require_jsx_runtime as e } from "../../../../react@18.3.1/node_modules/react/jsx-runtime.js";
2
- import { o as t } from "./LexicalComposerContext.prod.js";
3
- import { Dn as n, Lr as r, Si as i, ho as a, le as o, lr as s, wo as c, yr as l, zs as u } from "../../../../lexical@0.38.2/node_modules/lexical/Lexical.prod.js";
4
- import { Ht as d, U as f, at as p } from "../../../../@lexical_utils@0.38.2/node_modules/@lexical/utils/LexicalUtils.prod.js";
5
- import { s as m } from "../../../../@lexical_text@0.38.2/node_modules/@lexical/text/LexicalText.prod.js";
6
- import { n as h, o as g, s as _ } from "../../../../@lexical_overflow@0.38.2/node_modules/@lexical/overflow/LexicalOverflow.prod.js";
2
+ import { Dn as t, Lr as n, Si as r, ho as i, le as a, lr as o, wo as s, yr as c, zs as l } from "../../../../lexical@0.38.2/node_modules/lexical/Lexical.prod.js";
3
+ import { Ht as u, U as d, at as f } from "../../../../@lexical_utils@0.38.2/node_modules/@lexical/utils/LexicalUtils.prod.js";
4
+ import { n as p, o as m, s as h } from "../../../../@lexical_overflow@0.38.2/node_modules/@lexical/overflow/LexicalOverflow.prod.js";
5
+ import { o as g } from "./LexicalComposerContext.prod.js";
6
+ import { s as _ } from "../../../../@lexical_text@0.38.2/node_modules/@lexical/text/LexicalText.prod.js";
7
7
  import { useEffect as v, useMemo as y, useState as b } from "react";
8
8
  //#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/LexicalCharacterLimitPlugin.prod.mjs
9
9
  var x = e();
10
- function S(e, t, g = Object.freeze({})) {
10
+ function S(e, m, g = Object.freeze({})) {
11
11
  let { strlen: y = (e) => e.length, remainingCharacters: b = () => {} } = g;
12
12
  v(() => {
13
- e.hasNodes([h]) || function(e, ...t) {
13
+ e.hasNodes([p]) || function(e, ...t) {
14
14
  let n = new URL("https://lexical.dev/docs/error"), r = new URLSearchParams();
15
15
  r.append("code", e);
16
16
  for (let e of t) r.append("v", e);
17
17
  throw n.search = r.toString(), Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
18
18
  }(57);
19
19
  }, [e]), v(() => {
20
- let h = e.getEditorState().read(m), g = 0;
21
- return f(e.registerTextContentListener((e) => {
22
- h = e;
23
- }), e.registerUpdateListener(({ dirtyLeaves: i, dirtyElements: o }) => {
24
- let f = e.isComposing(), m = i.size > 0 || o.size > 0;
25
- if (f || !m) return;
26
- let v = y(h), x = v > t || g !== null && g > t;
27
- if (b(t - v), g === null || x) {
28
- let i = function(e, t, n) {
20
+ let p = e.getEditorState().read(_), g = 0;
21
+ return d(e.registerTextContentListener((e) => {
22
+ p = e;
23
+ }), e.registerUpdateListener(({ dirtyLeaves: r, dirtyElements: a }) => {
24
+ let d = e.isComposing(), _ = r.size > 0 || a.size > 0;
25
+ if (d || !_) return;
26
+ let v = y(p), x = v > m || g !== null && g > m;
27
+ if (b(m - v), g === null || x) {
28
+ let r = function(e, t, n) {
29
29
  let r = Intl.Segmenter, i = 0, a = 0;
30
30
  if (typeof r == "function") {
31
31
  let o = new r().segment(e);
@@ -43,64 +43,64 @@ function S(e, t, g = Object.freeze({})) {
43
43
  }
44
44
  }
45
45
  return i;
46
- }(h, t, y);
46
+ }(p, m, y);
47
47
  e.update(() => {
48
48
  (function(e) {
49
- let t = p(), n = t.length, i = 0;
50
- for (let o = 0; o < n; o += 1) {
51
- let { node: n } = t[o], f = a(n) && !u(n, _);
52
- if (_(n)) {
53
- let t = i;
54
- if (i + n.getTextContentSize() <= e) {
55
- let e = n.getParent(), t = n.getPreviousSibling(), i = n.getNextSibling();
56
- d(n);
57
- let a = r();
58
- !l(a) || a.anchor.getNode().isAttached() && a.focus.getNode().isAttached() || (s(t) ? t.select() : s(i) ? i.select() : e !== null && e.select());
49
+ let t = f(), r = t.length, a = 0;
50
+ for (let d = 0; d < r; d += 1) {
51
+ let { node: r } = t[d], f = i(r) && !l(r, h);
52
+ if (h(r)) {
53
+ let t = a;
54
+ if (a + r.getTextContentSize() <= e) {
55
+ let e = r.getParent(), t = r.getPreviousSibling(), i = r.getNextSibling();
56
+ u(r);
57
+ let a = n();
58
+ !c(a) || a.anchor.getNode().isAttached() && a.focus.getNode().isAttached() || (o(t) ? t.select() : o(i) ? i.select() : e !== null && e.select());
59
59
  } else if (t < e) {
60
- let r = n.getFirstDescendant(), i = t + (r === null ? 0 : r.getTextContentSize());
61
- (s(r) && r.isSimpleText() || i <= e) && d(n);
60
+ let n = r.getFirstDescendant(), i = t + (n === null ? 0 : n.getTextContentSize());
61
+ (o(n) && n.isSimpleText() || i <= e) && u(r);
62
62
  }
63
63
  } else if (f) {
64
- let t = i;
65
- if (i += n.getTextContentSize(), i > e && !_(n.getParent())) {
66
- let i = r(), a;
67
- if (t < e && s(n) && n.isSimpleText()) {
68
- let [, r] = n.splitText(e - t);
69
- a = C(r);
70
- } else a = C(n);
71
- i !== null && c(i), w(a);
64
+ let t = a;
65
+ if (a += r.getTextContentSize(), a > e && !h(r.getParent())) {
66
+ let i = n(), a;
67
+ if (t < e && o(r) && r.isSimpleText()) {
68
+ let [, n] = r.splitText(e - t);
69
+ a = C(n);
70
+ } else a = C(r);
71
+ i !== null && s(i), w(a);
72
72
  }
73
73
  }
74
74
  }
75
- })(i);
76
- }, { tag: n });
75
+ })(r);
76
+ }, { tag: t });
77
77
  }
78
78
  g = v;
79
- }), e.registerCommand(o, (e) => {
80
- let t = r();
81
- if (!l(t)) return !1;
82
- let n = t.anchor.getNode().getParent(), a = n ? n.getParent() : null, o = a ? a.getNextSibling() : null;
83
- return t.deleteCharacter(e), a && a.isEmpty() ? a.remove() : i(o) && o.isEmpty() && o.remove(), !0;
79
+ }), e.registerCommand(a, (e) => {
80
+ let t = n();
81
+ if (!c(t)) return !1;
82
+ let i = t.anchor.getNode().getParent(), a = i ? i.getParent() : null, o = a ? a.getNextSibling() : null;
83
+ return t.deleteCharacter(e), a && a.isEmpty() ? a.remove() : r(o) && o.isEmpty() && o.remove(), !0;
84
84
  }, 1));
85
85
  }, [
86
86
  e,
87
- t,
87
+ m,
88
88
  b,
89
89
  y
90
90
  ]);
91
91
  }
92
92
  function C(e) {
93
- let t = g();
93
+ let t = m();
94
94
  return e.replace(t), t.append(e), t;
95
95
  }
96
96
  function w(e) {
97
97
  let t = e.getPreviousSibling();
98
- if (!_(t)) return;
99
- let n = e.getFirstChild(), i = t.getChildren(), a = i.length;
100
- if (n === null) e.append(...i);
101
- else for (let e = 0; e < a; e++) n.insertBefore(i[e]);
102
- let o = r();
103
- if (l(o)) {
98
+ if (!h(t)) return;
99
+ let r = e.getFirstChild(), i = t.getChildren(), a = i.length;
100
+ if (r === null) e.append(...i);
101
+ else for (let e = 0; e < a; e++) r.insertBefore(i[e]);
102
+ let o = n();
103
+ if (c(o)) {
104
104
  let n = o.anchor, r = n.getNode(), i = o.focus, s = n.getNode();
105
105
  r.is(t) ? n.set(e.getKey(), n.offset, "element") : r.is(e) && n.set(e.getKey(), a + n.offset, "element"), s.is(t) ? i.set(e.getKey(), i.offset, "element") : s.is(e) && i.set(e.getKey(), a + i.offset, "element");
106
106
  }
@@ -121,16 +121,16 @@ function D({ remainingCharacters: e }) {
121
121
  children: e
122
122
  });
123
123
  }
124
- function O({ charset: e = "UTF-16", maxLength: n = 5, renderer: r = D }) {
125
- let [i] = t(), [a, o] = b(n);
126
- return S(i, n, y(() => ({
127
- remainingCharacters: o,
124
+ function O({ charset: e = "UTF-16", maxLength: t = 5, renderer: n = D }) {
125
+ let [r] = g(), [i, a] = b(t);
126
+ return S(r, t, y(() => ({
127
+ remainingCharacters: a,
128
128
  strlen: (t) => {
129
129
  if (e === "UTF-8") return E(t);
130
130
  if (e === "UTF-16") return t.length;
131
131
  throw Error("Unrecognized charset");
132
132
  }
133
- }), [e])), r({ remainingCharacters: a });
133
+ }), [e])), n({ remainingCharacters: i });
134
134
  }
135
135
  //#endregion
136
136
  export { O as U };
@@ -1,28 +1,28 @@
1
1
  import { require_jsx_runtime as e } from "../../../../react@18.3.1/node_modules/react/jsx-runtime.js";
2
- import { r as t, t as n } from "./LexicalComposerContext.prod.js";
3
- import { $i as r, Dn as i, Li as a, Lr as o, No as s } from "../../../../lexical@0.38.2/node_modules/lexical/Lexical.prod.js";
2
+ import { $i as t, Dn as n, Li as r, Lr as i, No as a } from "../../../../lexical@0.38.2/node_modules/lexical/Lexical.prod.js";
3
+ import { r as o, t as s } from "./LexicalComposerContext.prod.js";
4
4
  import { useEffect as c, useLayoutEffect as l, useMemo as u } from "react";
5
5
  //#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/LexicalComposer.prod.mjs
6
- var d = e(), f = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, p = f ? l : c, m = { tag: i };
7
- function h({ initialConfig: e, children: i }) {
6
+ var d = e(), f = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, p = f ? l : c, m = { tag: n };
7
+ function h({ initialConfig: e, children: n }) {
8
8
  let c = u(() => {
9
- let { theme: t, namespace: i, nodes: c, onError: l, editorState: u, html: d } = e, p = n(null, t), h = r({
9
+ let { theme: n, namespace: o, nodes: c, onError: l, editorState: u, html: d } = e, p = s(null, n), h = t({
10
10
  editable: e.editable,
11
11
  html: d,
12
- namespace: i,
12
+ namespace: o,
13
13
  nodes: c,
14
14
  onError: (e) => l(e, h),
15
- theme: t
15
+ theme: n
16
16
  });
17
17
  return function(e, t) {
18
18
  if (t !== null) {
19
19
  if (t === void 0) e.update(() => {
20
- let t = s();
20
+ let t = a();
21
21
  if (t.isEmpty()) {
22
- let n = a();
22
+ let n = r();
23
23
  t.append(n);
24
- let r = f ? document.activeElement : null;
25
- (o() !== null || r !== null && r === e.getRootElement()) && n.select();
24
+ let a = f ? document.activeElement : null;
25
+ (i() !== null || a !== null && a === e.getRootElement()) && n.select();
26
26
  }
27
27
  }, m);
28
28
  else if (t !== null) switch (typeof t) {
@@ -35,7 +35,7 @@ function h({ initialConfig: e, children: i }) {
35
35
  e.setEditorState(t, m);
36
36
  break;
37
37
  case "function": e.update(() => {
38
- s().isEmpty() && t(e);
38
+ a().isEmpty() && t(e);
39
39
  }, m);
40
40
  }
41
41
  }
@@ -44,9 +44,9 @@ function h({ initialConfig: e, children: i }) {
44
44
  return p(() => {
45
45
  let t = e.editable, [n] = c;
46
46
  n.setEditable(t === void 0 || t);
47
- }, []), (0, d.jsx)(t.Provider, {
47
+ }, []), (0, d.jsx)(o.Provider, {
48
48
  value: c,
49
- children: i
49
+ children: n
50
50
  });
51
51
  }
52
52
  //#endregion