@layers-app/shared 0.2.8 → 0.3.1

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 (168) hide show
  1. package/dist/api/giphy/slice.d.ts +1 -1
  2. package/dist/api/giphy/slice.d.ts.map +1 -1
  3. package/dist/api/unsplash/slice.d.ts +1 -1
  4. package/dist/api/unsplash/slice.d.ts.map +1 -1
  5. package/dist/assets/default-workspace-avatar.jpg.js +4 -0
  6. package/dist/assets/layers-logo-full.svg.js +2 -3
  7. package/dist/assets/layers-logo-full.svg2.js +5 -0
  8. package/dist/assets/layers-logo-icon.svg.js +2 -3
  9. package/dist/assets/layers-logo-icon.svg2.js +5 -0
  10. package/dist/assets/projects/figureA.svg.js +4 -0
  11. package/dist/assets/projects/figureB.svg.js +4 -0
  12. package/dist/assets/qwebchannel.d.ts +15 -0
  13. package/dist/assets/qwebchannel.d.ts.map +1 -0
  14. package/dist/assets/taskPriorities/high.svg.js +5 -0
  15. package/dist/assets/taskPriorities/low.svg.js +5 -0
  16. package/dist/assets/taskPriorities/none.svg.js +5 -0
  17. package/dist/assets/taskPriorities/normal.svg.js +5 -0
  18. package/dist/assets/taskPriorities/urgent.svg.js +5 -0
  19. package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
  20. package/dist/components/AliasTextInput/AliasTextInput.js +8 -7
  21. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.d.ts +3 -0
  22. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.d.ts.map +1 -0
  23. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.js +69 -0
  24. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +27 -0
  25. package/dist/components/AnimatedFigurePage/types.d.ts +15 -0
  26. package/dist/components/AnimatedFigurePage/types.d.ts.map +1 -0
  27. package/dist/components/AnimatedFigurePage/useParallax.d.ts +6 -0
  28. package/dist/components/AnimatedFigurePage/useParallax.d.ts.map +1 -0
  29. package/dist/components/AnimatedFigurePage/useParallax.js +29 -0
  30. package/dist/components/AppContainer/AppContainer.d.ts +1 -1
  31. package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
  32. package/dist/components/AppContainer/AppContainer.js +37 -36
  33. package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
  34. package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +80 -45
  35. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
  36. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +120 -120
  37. package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
  38. package/dist/components/AppContainer/hooks/useAppContainer.d.ts.map +1 -1
  39. package/dist/components/AppContainer/hooks/useAppContainer.js +57 -51
  40. package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
  41. package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +3 -1
  42. package/dist/components/AppContainer/types.d.ts +3 -0
  43. package/dist/components/AppContainer/types.d.ts.map +1 -1
  44. package/dist/components/ColorPicker/ColorPickerPopover.d.ts +6 -6
  45. package/dist/components/ColorPicker/ColorPickerPopover.d.ts.map +1 -1
  46. package/dist/components/ColorPicker/ColorPickerPopover.js +29 -31
  47. package/dist/components/CommentComposer/index.d.ts.map +1 -1
  48. package/dist/components/CommentComposer/index.js +115 -111
  49. package/dist/components/CommunitiesDialog/index.d.ts.map +1 -1
  50. package/dist/components/CommunitiesDialog/index.js +47 -46
  51. package/dist/components/Copyright/index.d.ts.map +1 -1
  52. package/dist/components/Copyright/index.js +8 -7
  53. package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
  54. package/dist/components/EmojiPicker/EmojiPanel.js +12 -10
  55. package/dist/components/EmojiPicker/EmojiPicker.d.ts +3 -1
  56. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  57. package/dist/components/EmojiPicker/EmojiPicker.js +49 -46
  58. package/dist/components/EmojiPicker/IconsPanel.d.ts +2 -1
  59. package/dist/components/EmojiPicker/IconsPanel.d.ts.map +1 -1
  60. package/dist/components/EmojiPicker/IconsPanel.js +47 -45
  61. package/dist/components/EmojiPicker/custom-icons/customIcons.d.ts.map +1 -1
  62. package/dist/components/EmojiPicker/custom-icons/customIcons.js +66 -31
  63. package/dist/components/EntityIcon.d.ts +3 -3
  64. package/dist/components/EntityIcon.d.ts.map +1 -1
  65. package/dist/components/EntityIcon.js +59 -35
  66. package/dist/components/EntityTitle/EntityTitle.d.ts +1 -1
  67. package/dist/components/EntityTitle/EntityTitle.d.ts.map +1 -1
  68. package/dist/components/EntityTitle/EntityTitle.js +34 -34
  69. package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
  70. package/dist/components/FilePicker/FilePicker.d.ts +1 -1
  71. package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
  72. package/dist/components/FilePicker/FilePicker.js +144 -152
  73. package/dist/components/FilePicker/FilePicker.module.css.js +10 -10
  74. package/dist/components/FilePicker/FilePickerGallery.js +13 -13
  75. package/dist/components/FilePicker/FilePickerGiphy.d.ts +1 -1
  76. package/dist/components/FilePicker/FilePickerGiphy.d.ts.map +1 -1
  77. package/dist/components/FilePicker/FilePickerGiphy.js +46 -48
  78. package/dist/components/FilePicker/FilePickerLink.d.ts.map +1 -1
  79. package/dist/components/FilePicker/FilePickerLink.js +16 -16
  80. package/dist/components/FilePicker/FilePickerUnsplash.d.ts +1 -1
  81. package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
  82. package/dist/components/FilePicker/FilePickerUnsplash.js +49 -51
  83. package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
  84. package/dist/components/FilePicker/FilePickerUpload.js +44 -42
  85. package/dist/components/FilePicker/api/giphyApi.d.ts +2 -2
  86. package/dist/components/FilePicker/api/giphyApi.d.ts.map +1 -1
  87. package/dist/components/FilePicker/api/giphyApi.js +11 -14
  88. package/dist/components/FilePicker/api/unsplashApi.d.ts +2 -2
  89. package/dist/components/FilePicker/api/unsplashApi.d.ts.map +1 -1
  90. package/dist/components/FilePicker/api/unsplashApi.js +14 -19
  91. package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.d.ts.map +1 -1
  92. package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.js +70 -72
  93. package/dist/components/FormViewer/components/fields/UploadField/UploadField.d.ts.map +1 -1
  94. package/dist/components/FormViewer/components/fields/UploadField/UploadField.js +34 -33
  95. package/dist/components/FormViewer/helpers/conditions.d.ts +84 -84
  96. package/dist/components/FormViewer/helpers/helpers.d.ts +84 -84
  97. package/dist/components/FormViewer/helpers/steps.d.ts +84 -84
  98. package/dist/components/FormViewer/helpers/steps.d.ts.map +1 -1
  99. package/dist/components/FormViewer/helpers/steps.js +22 -21
  100. package/dist/components/FormViewer/hooks/useActiveControl.d.ts +71 -71
  101. package/dist/components/FormViewer/hooks/useActiveStep.d.ts +84 -84
  102. package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts +3 -3
  103. package/dist/components/FormViewer/store/formStore.d.ts +357 -357
  104. package/dist/components/FormViewer/store/formStoreApi.d.ts +178 -178
  105. package/dist/components/FormViewer/store/selectors.d.ts +23861 -23861
  106. package/dist/components/FormViewer/types/schemes.d.ts +1139 -1139
  107. package/dist/components/Logotype.d.ts +6 -4
  108. package/dist/components/Logotype.d.ts.map +1 -1
  109. package/dist/components/Logotype.js +62 -30
  110. package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
  111. package/dist/components/NavMenu/components/NavMenuItem.js +122 -107
  112. package/dist/components/NavMenu/types.d.ts +1 -0
  113. package/dist/components/NavMenu/types.d.ts.map +1 -1
  114. package/dist/components/OnBoarding/OnBoardingPage.js +35 -35
  115. package/dist/components/ProjectIcon/ProjectIcon.js +13 -13
  116. package/dist/components/TreeIndent/TreeIndent.d.ts +9 -0
  117. package/dist/components/TreeIndent/TreeIndent.d.ts.map +1 -0
  118. package/dist/components/TreeIndent/TreeIndent.js +15 -0
  119. package/dist/components/TreeIndent/TreeIndent.module.css.js +11 -0
  120. package/dist/components/TreeIndent/index.d.ts +2 -0
  121. package/dist/components/TreeIndent/index.d.ts.map +1 -0
  122. package/dist/components/WorkspaceAvatar/WorkspaceAvatar.js +6 -6
  123. package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
  124. package/dist/components/WorkspaceMenu/WorkspaceMenu.js +97 -101
  125. package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
  126. package/dist/config/brand.d.ts +49 -0
  127. package/dist/config/brand.d.ts.map +1 -0
  128. package/dist/config/brand.js +77 -0
  129. package/dist/config/envConfig.d.ts +110 -0
  130. package/dist/config/envConfig.d.ts.map +1 -0
  131. package/dist/config/envConfig.js +48 -0
  132. package/dist/constants.d.ts +1 -1
  133. package/dist/constants.d.ts.map +1 -1
  134. package/dist/constants.js +19 -7
  135. package/dist/helpers/getFileIcons.d.ts.map +1 -1
  136. package/dist/helpers/getFileIcons.js +34 -29
  137. package/dist/helpers/getFileType.d.ts +1 -1
  138. package/dist/helpers/getFileType.d.ts.map +1 -1
  139. package/dist/helpers/getFileType.js +3 -3
  140. package/dist/helpers/hotjar.d.ts.map +1 -1
  141. package/dist/helpers/hotjar.js +11 -7
  142. package/dist/helpers/platform.js +4 -4
  143. package/dist/helpers/showNotifications.d.ts +3 -0
  144. package/dist/helpers/showNotifications.d.ts.map +1 -1
  145. package/dist/helpers/showNotifications.js +79 -44
  146. package/dist/hooks/useDateFnsLocale.d.ts +2 -0
  147. package/dist/hooks/useDateFnsLocale.d.ts.map +1 -1
  148. package/dist/hooks/useDateFnsLocale.js +9 -8
  149. package/dist/hooks/useDateUtils.d.ts.map +1 -1
  150. package/dist/hooks/useDateUtils.js +19 -19
  151. package/dist/hooks/useDisableWindowScroll.js +3 -3
  152. package/dist/hooks/useFormatDistance.d.ts.map +1 -1
  153. package/dist/hooks/useFormatDistance.js +6 -6
  154. package/dist/hooks/useNumberQueryParam.d.ts +1 -1
  155. package/dist/hooks/useNumberQueryParam.d.ts.map +1 -1
  156. package/dist/index.css +1 -1
  157. package/dist/index.d.ts +5 -0
  158. package/dist/index.d.ts.map +1 -1
  159. package/dist/index.js +505 -487
  160. package/dist/lang/locales/ui_en.json.js +1 -1
  161. package/dist/lang/locales/ui_es.json.js +5 -5
  162. package/dist/lang/locales/ui_ru.json.js +5 -5
  163. package/dist/utils/formatStorage.d.ts +9 -0
  164. package/dist/utils/formatStorage.d.ts.map +1 -1
  165. package/dist/utils/formatStorage.js +14 -10
  166. package/package.json +3 -6
  167. package/dist/assets/svg/default_icon.svg.js +0 -4
  168. package/dist/assets/svg/layers-logo-full.svg.js +0 -4
@@ -1,76 +1,77 @@
1
- import { jsx as r, jsxs as C } from "react/jsx-runtime";
2
- import { useState as Q, useRef as v, useMemo as O, useCallback as ee, useEffect as L } from "react";
1
+ import { jsx as n, jsxs as C } from "react/jsx-runtime";
2
+ import { useState as Z, useRef as v, useMemo as U, useCallback as ee, useEffect as A } from "react";
3
3
  import { useTranslation as te } from "react-i18next";
4
- import { Attachment02Icon as oe, Sent02Icon as ne } from "@hugeicons/core-free-icons";
4
+ import { Attachment02Icon as oe, Sent02Icon as re } from "@hugeicons/core-free-icons";
5
5
  import { HugeiconsIcon as $ } from "@hugeicons/react";
6
- import { Stack as re, Box as se, Group as B, FileButton as ie, ActionIcon as U, UnstyledButton as le, Text as ce, Button as ae, Popover as _ } from "@mantine/core";
7
- import { showErrorNotification as P } from "../../helpers/showNotifications.js";
8
- import { AttachmentsPreview as de } from "../AttachmentsPreview/AttachmentsPreview.js";
9
- import { CommentEditorHandler as me } from "./CommentEditorHotkeys.js";
10
- import { useVirtualAnchor as fe } from "./useVirtualAnchor.js";
11
- import x from "./CommentComposer.module.css.js";
12
- function W(n) {
13
- return "id" in n;
6
+ import { Stack as ne, Box as se, Group as B, FileButton as ie, ActionIcon as P, UnstyledButton as le, Text as ae, Button as ce, Popover as L } from "@mantine/core";
7
+ import { getMaxUploadSize as de } from "../../config/envConfig.js";
8
+ import { showErrorNotification as W } from "../../helpers/showNotifications.js";
9
+ import { AttachmentsPreview as me } from "../AttachmentsPreview/AttachmentsPreview.js";
10
+ import { CommentEditorHandler as fe } from "./CommentEditorHotkeys.js";
11
+ import { useVirtualAnchor as ue } from "./useVirtualAnchor.js";
12
+ import y from "./CommentComposer.module.css.js";
13
+ function j(r) {
14
+ return "id" in r;
14
15
  }
15
- function ue(n) {
16
- return typeof n == "object" && "isTemp" in n;
16
+ function pe(r) {
17
+ return typeof r == "object" && "isTemp" in r;
17
18
  }
18
- function pe(n) {
19
- const a = URL.createObjectURL(n);
19
+ function he(r) {
20
+ const c = URL.createObjectURL(r);
20
21
  return {
21
22
  id: `temp-${crypto.randomUUID()}`,
22
- name: n.name,
23
- type: n.type,
24
- size: n.size,
25
- url: a,
26
- src: a,
27
- isImage: n.type.startsWith("image/"),
23
+ name: r.name,
24
+ type: r.type,
25
+ size: r.size,
26
+ url: c,
27
+ src: c,
28
+ isImage: r.type.startsWith("image/"),
28
29
  isTemp: !0,
29
- raw: n
30
+ raw: r
30
31
  };
31
32
  }
32
- const he = 5 * 1024 * 1024, ge = 10;
33
- function j(n, a) {
34
- return n(`composer.${a}`, { defaultValue: "" }) || n(`editor.composer.${a}`);
33
+ const M = () => de() ?? 5 * 1024 * 1024, ge = 10;
34
+ function xe(r, c) {
35
+ return r(`composer.${c}`, { defaultValue: "" }) || r(`editor.composer.${c}`);
35
36
  }
36
- const _e = ({
37
- children: n,
38
- onSubmit: a,
37
+ const Ne = ({
38
+ children: r,
39
+ onSubmit: c,
39
40
  initialDraft: d,
40
- updateLocation: z,
41
+ updateLocation: N,
41
42
  onBlur: k,
42
- setEdit: N,
43
- ns: I = "comments"
43
+ setEdit: R,
44
+ ns: S = "comments"
44
45
  }) => {
45
- const [m, R] = Q({
46
+ const [m, _] = Z({
46
47
  text: d?.text ?? "",
47
48
  files: d?.files ?? []
48
- }), { t: y } = te(I), G = y(I === "comments" ? "composer.placeholder" : "editor.composer.placeholder"), h = v(null), f = typeof d?.text < "u", c = {
49
+ }), { t: h } = te(S), G = h(S === "comments" ? "composer.placeholder" : "editor.composer.placeholder"), g = v(null), f = typeof d?.text < "u", a = {
49
50
  text: m.text,
50
51
  files: m.files
51
- }, X = v(null), p = v(null), Y = O(
52
+ }, X = v(null), p = v(null), Y = U(
52
53
  () => ({
53
54
  container: document.createElement("div"),
54
55
  elements: []
55
56
  }),
56
57
  []
57
- ), q = v(null), u = !!z, J = fe({
58
+ ), V = v(null), u = !!N, q = ue({
58
59
  isFloat: u,
59
- updateLocation: z,
60
- selectionRef: q,
60
+ updateLocation: N,
61
+ selectionRef: V,
61
62
  selectionState: Y
62
- }), S = 10 * 30 * 0.7, b = ee(() => {
63
+ }), I = 10 * 30 * 0.7, b = ee(() => {
63
64
  if (!p.current) return;
64
65
  const e = p.current, t = e.querySelector(
65
66
  '[class*="editorWrapper"]'
66
- ), s = t?.scrollHeight || 0, o = s > S, l = s > 35, i = e.closest(
67
+ ), s = t?.scrollHeight || 0, o = s > I, l = s > 35, i = e.closest(
67
68
  '[class*="commentComposerFloat"]'
68
69
  ) || e;
69
- u && l ? i.setAttribute("data-multiline", "true") : i.removeAttribute("data-multiline"), o && t ? (t.style.maxHeight = `${S}px`, t.style.overflowY = "auto", t.style.scrollbarWidth = "thin", i.setAttribute("data-editor-constrained", "true")) : t && (t.style.maxHeight = "", t.style.overflowY = "", t.style.scrollbarWidth = "", i.removeAttribute("data-editor-constrained"));
70
- }, [p, u, S]);
71
- L(() => {
70
+ u && l ? i.setAttribute("data-multiline", "true") : i.removeAttribute("data-multiline"), o && t ? (t.style.maxHeight = `${I}px`, t.style.overflowY = "auto", t.style.scrollbarWidth = "thin", i.setAttribute("data-editor-constrained", "true")) : t && (t.style.maxHeight = "", t.style.overflowY = "", t.style.scrollbarWidth = "", i.removeAttribute("data-editor-constrained"));
71
+ }, [p, u, I]);
72
+ A(() => {
72
73
  b();
73
- }, [b]), L(() => {
74
+ }, [b]), A(() => {
74
75
  if (!p.current) return;
75
76
  const e = new ResizeObserver(() => {
76
77
  b();
@@ -78,7 +79,7 @@ const _e = ({
78
79
  return e.observe(p.current), () => {
79
80
  e.disconnect();
80
81
  };
81
- }, [b]), L(() => {
82
+ }, [b]), A(() => {
82
83
  const e = document.querySelector("main");
83
84
  if (e && u) {
84
85
  const t = e.style.overflow;
@@ -87,26 +88,26 @@ const _e = ({
87
88
  };
88
89
  }
89
90
  }, [u]);
90
- const { textChanged: K, newFiles: V, deletedFiles: Z, hasChanges: F } = O(() => {
91
- const e = d?.files || [], t = m.files, s = d?.text !== c.text, o = t.filter((i) => i.isTemp), g = new Set(
91
+ const { textChanged: J, newFiles: K, deletedFiles: D, hasChanges: F } = U(() => {
92
+ const e = d?.files || [], t = m.files, s = d?.text !== a.text, o = t.filter((i) => i.isTemp), x = new Set(
92
93
  t.filter(
93
- (i) => W(i)
94
+ (i) => j(i)
94
95
  ).map((i) => i.id)
95
- ), l = e.filter(W).filter((i) => !g.has(i.id)), E = f ? JSON.stringify(d) === JSON.stringify(m) : c.text.trim().length > 0 || o.length > 0 || l.length > 0;
96
+ ), l = e.filter(j).filter((i) => !x.has(i.id)), E = f ? JSON.stringify(d) === JSON.stringify(m) : a.text.trim().length > 0 || o.length > 0 || l.length > 0;
96
97
  return {
97
98
  textChanged: s,
98
99
  newFiles: o,
99
100
  deletedFiles: l,
100
101
  hasChanges: E
101
102
  };
102
- }, [f, d, m, c.text]), H = () => {
103
- N ? N({
103
+ }, [f, d, m, a.text]), H = () => {
104
+ R ? R({
104
105
  id: "",
105
106
  text: "",
106
107
  files: []
107
108
  }) : k?.();
108
109
  }, T = (e, t = !1) => {
109
- R((s) => {
110
+ _((s) => {
110
111
  if (t)
111
112
  return { text: "", files: [] };
112
113
  const o = typeof e == "function" ? e(s) : e;
@@ -115,98 +116,101 @@ const _e = ({
115
116
  files: o.files
116
117
  };
117
118
  });
118
- }, D = (e, t) => {
119
+ }, Q = (e, t) => {
119
120
  e && t((s) => {
120
- const o = s.files, g = ge - o.length, l = [], E = [];
121
- e.forEach((A) => {
122
- A.size > he ? E.push(A) : l.push(A);
123
- }), E.length > 0 && P({
124
- message: j(y, "uploadErrors.fileTooLarge")
125
- }), l.length > g && P({
126
- message: j(y, "uploadErrors.tooManyFiles")
121
+ const o = s.files, x = ge - o.length, l = [], E = [];
122
+ e.forEach((z) => {
123
+ z.size > M() ? E.push(z) : l.push(z);
124
+ }), E.length > 0 && W({
125
+ message: h("composer.uploadErrors.fileTooLarge", {
126
+ defaultValue: h("editor.composer.uploadErrors.fileTooLarge", { maxSize: Math.round(M() / (1024 * 1024)) }),
127
+ maxSize: Math.round(M() / (1024 * 1024))
128
+ })
129
+ }), l.length > x && W({
130
+ message: xe(h, "uploadErrors.tooManyFiles")
127
131
  });
128
- const i = l.slice(0, g);
132
+ const i = l.slice(0, x);
129
133
  return {
130
134
  ...s,
131
- files: [...o, ...i.map(pe)]
135
+ files: [...o, ...i.map(he)]
132
136
  };
133
137
  });
134
138
  }, w = async () => {
135
139
  try {
136
- f ? await a({
140
+ f ? await c({
137
141
  mode: "edit",
138
142
  data: {
139
- textChanged: K,
140
- newFiles: V,
141
- deletedFiles: Z,
142
- newText: c.text
143
+ textChanged: J,
144
+ newFiles: K,
145
+ deletedFiles: D,
146
+ newText: a.text
143
147
  }
144
- }) : await a({
148
+ }) : await c({
145
149
  mode: "create",
146
150
  data: {
147
- text: c.text,
148
- files: m.files.filter(ue)
151
+ text: a.text,
152
+ files: m.files.filter(pe)
149
153
  }
150
154
  });
151
155
  } catch {
152
156
  return;
153
157
  }
154
- H(), h.current && h.current.update(() => {
155
- const e = h.current._editorState._nodeMap.get("root");
158
+ H(), g.current && g.current.update(() => {
159
+ const e = g.current._editorState._nodeMap.get("root");
156
160
  if (!e) return;
157
161
  e.clear();
158
- const t = h.current._nodes.get("paragraph");
162
+ const t = g.current._nodes.get("paragraph");
159
163
  if (!t) return;
160
164
  const s = new t.klass();
161
165
  e.append(s), s.select();
162
166
  }), T({ text: "", files: [] }, !0);
163
- }, M = /* @__PURE__ */ r(
164
- re,
167
+ }, O = /* @__PURE__ */ n(
168
+ ne,
165
169
  {
166
170
  ref: p,
167
171
  className: `
168
- ${x.commentComposerWrapper}
169
- ${f ? x.editMode : ""}
170
- ${u ? x.commentComposerFloat : ""}
172
+ ${y.commentComposerWrapper}
173
+ ${f ? y.editMode : ""}
174
+ ${u ? y.commentComposerFloat : ""}
171
175
  `,
172
176
  children: /* @__PURE__ */ C(
173
177
  "div",
174
178
  {
175
- className: x.composerContainer,
179
+ className: y.composerContainer,
176
180
  style: {
177
181
  "--placeholder-text": `"${G}"`
178
182
  },
179
183
  children: [
180
- /* @__PURE__ */ r("div", { className: x.editorWrapper, children: /* @__PURE__ */ r(
181
- me,
184
+ /* @__PURE__ */ n("div", { className: y.editorWrapper, children: /* @__PURE__ */ n(
185
+ fe,
182
186
  {
183
187
  onSubmit: w,
184
- editorRef: h,
188
+ editorRef: g,
185
189
  inputContainerRef: p,
186
- commentDraft: c,
190
+ commentDraft: a,
187
191
  onBlur: H,
188
192
  isEdit: f,
189
193
  isFloat: u,
190
194
  hasChanges: F,
191
- ns: I,
192
- children: n?.({
195
+ ns: S,
196
+ children: r?.({
193
197
  onSubmit: w,
194
198
  handleBlur: () => {
195
199
  },
196
200
  setCommentDraft: T,
197
- commentDraft: c,
198
- editorRef: h,
201
+ commentDraft: a,
202
+ editorRef: g,
199
203
  initialContent: d?.text ?? ""
200
204
  })
201
205
  }
202
206
  ) }),
203
- /* @__PURE__ */ r(se, { h: 10, "data-editor-spacer": !0, tabIndex: 0, style: { width: "100%" } }),
204
- /* @__PURE__ */ r(
205
- de,
207
+ /* @__PURE__ */ n(se, { h: 10, "data-editor-spacer": !0, tabIndex: 0, style: { width: "100%" } }),
208
+ /* @__PURE__ */ n(
209
+ me,
206
210
  {
207
211
  files: m.files,
208
212
  mode: "draft",
209
- onRemove: (e) => R((t) => ({
213
+ onRemove: (e) => _((t) => ({
210
214
  ...t,
211
215
  files: t.files.filter((s, o) => o !== e)
212
216
  }))
@@ -223,12 +227,12 @@ const _e = ({
223
227
  tabIndex: 0,
224
228
  gap: "4px",
225
229
  children: [
226
- /* @__PURE__ */ r(
230
+ /* @__PURE__ */ n(
227
231
  ie,
228
232
  {
229
- onChange: (e) => D(e, T),
233
+ onChange: (e) => Q(e, T),
230
234
  multiple: !0,
231
- children: (e) => /* @__PURE__ */ r(U, { ...e, variant: "subtle", size: "lg", color: "gray", children: /* @__PURE__ */ r(
235
+ children: (e) => /* @__PURE__ */ n(P, { ...e, variant: "subtle", size: "lg", color: "gray", children: /* @__PURE__ */ n(
232
236
  $,
233
237
  {
234
238
  style: { transform: "rotate(35deg)" },
@@ -239,7 +243,7 @@ const _e = ({
239
243
  }
240
244
  ),
241
245
  f ? /* @__PURE__ */ C(B, { gap: "8px", children: [
242
- /* @__PURE__ */ r(
246
+ /* @__PURE__ */ n(
243
247
  le,
244
248
  {
245
249
  onClick: H,
@@ -251,29 +255,29 @@ const _e = ({
251
255
  background: "none",
252
256
  border: "none"
253
257
  },
254
- children: /* @__PURE__ */ r(ce, { size: "sm", c: "dimmed", children: y("composer.cancel") })
258
+ children: /* @__PURE__ */ n(ae, { size: "sm", c: "dimmed", children: h("composer.cancel") })
255
259
  }
256
260
  ),
257
- /* @__PURE__ */ r(
258
- ae,
261
+ /* @__PURE__ */ n(
262
+ ce,
259
263
  {
260
264
  size: "xs",
261
265
  radius: "md",
262
266
  onClick: w,
263
267
  disabled: f ? F : !F,
264
- children: y("composer.save")
268
+ children: h("composer.save")
265
269
  }
266
270
  )
267
- ] }) : /* @__PURE__ */ r(
268
- U,
271
+ ] }) : /* @__PURE__ */ n(
272
+ P,
269
273
  {
270
274
  color: "var(--mantine-primary-color-filled)",
271
275
  size: "lg",
272
276
  "data-comment-submit-button": !0,
273
277
  variant: "filled",
274
278
  onClick: w,
275
- disabled: !c.text.trim() && c.files.length === 0,
276
- children: /* @__PURE__ */ r($, { icon: ne, size: 20 })
279
+ disabled: !a.text.trim() && a.files.length === 0,
280
+ children: /* @__PURE__ */ n($, { icon: re, size: 20 })
277
281
  }
278
282
  )
279
283
  ]
@@ -285,7 +289,7 @@ const _e = ({
285
289
  }
286
290
  );
287
291
  return u ? /* @__PURE__ */ C(
288
- _,
292
+ L,
289
293
  {
290
294
  opened: !0,
291
295
  position: "bottom-start",
@@ -318,10 +322,10 @@ const _e = ({
318
322
  }
319
323
  },
320
324
  children: [
321
- /* @__PURE__ */ r(_.Target, { children: /* @__PURE__ */ r(
325
+ /* @__PURE__ */ n(L.Target, { children: /* @__PURE__ */ n(
322
326
  "div",
323
327
  {
324
- ref: J,
328
+ ref: q,
325
329
  style: {
326
330
  position: "fixed",
327
331
  width: "5px",
@@ -333,18 +337,18 @@ const _e = ({
333
337
  }
334
338
  }
335
339
  ) }),
336
- /* @__PURE__ */ r(
337
- _.Dropdown,
340
+ /* @__PURE__ */ n(
341
+ L.Dropdown,
338
342
  {
339
343
  ref: X,
340
- className: x.commentComposerFloat,
341
- children: M
344
+ className: y.commentComposerFloat,
345
+ children: O
342
346
  }
343
347
  )
344
348
  ]
345
349
  }
346
- ) : M;
350
+ ) : O;
347
351
  };
348
352
  export {
349
- _e as CommentComposer
353
+ Ne as CommentComposer
350
354
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CommunitiesDialog/index.tsx"],"names":[],"mappings":"AAmBA,eAAO,MAAM,iBAAiB,GAAI,sCAG/B;IACD,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC/B,4CAiIA,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CommunitiesDialog/index.tsx"],"names":[],"mappings":"AAoBA,eAAO,MAAM,iBAAiB,GAAI,sCAG/B;IACD,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC/B,4CAqIA,CAAC"}
@@ -1,25 +1,26 @@
1
1
  import { jsx as o, jsxs as e } from "react/jsx-runtime";
2
- import { useTranslation as h, Trans as g } from "react-i18next";
3
- import { Dialog as f, Stack as n, Flex as c, Text as s, Button as a, Group as u } from "@mantine/core";
4
- import { IconAmpersand as w, IconBrandDiscord as x, IconBrandTelegram as D } from "@tabler/icons-react";
2
+ import { useTranslation as g, Trans as f } from "react-i18next";
3
+ import { Dialog as u, Stack as c, Flex as a, Text as l, Button as s, Group as w } from "@mantine/core";
4
+ import { IconAmpersand as x, IconBrandDiscord as b, IconBrandTelegram as D } from "@tabler/icons-react";
5
+ import { brand as r } from "../../config/brand.js";
5
6
  import { useMenu as y } from "../../hooks/useMenu.js";
6
- import { useDiscordDialogStore as b, closeUserDiscordDialog as F } from "../../store/discordDialogStore.js";
7
- import k from "../../assets/svg/discord.svg.js";
8
- import v from "../../assets/svg/telegram.svg.js";
9
- import z from "./styles.module.css.js";
10
- const E = ({
11
- handleAccess: l,
7
+ import { useDiscordDialogStore as F, closeUserDiscordDialog as k } from "../../store/discordDialogStore.js";
8
+ import v from "../../assets/svg/discord.svg.js";
9
+ import z from "../../assets/svg/telegram.svg.js";
10
+ import C from "./styles.module.css.js";
11
+ const K = ({
12
+ handleAccess: m,
12
13
  handleRemindLater: p
13
14
  }) => {
14
- const { t: i } = h(), { opened: m } = b((d) => d), t = () => {
15
- F();
16
- }, { isMobile: r } = y();
15
+ const { t } = g(), { opened: d } = F((h) => h), i = () => {
16
+ k();
17
+ }, { isMobile: n } = y();
17
18
  return /* @__PURE__ */ o(
18
- f,
19
+ u,
19
20
  {
20
- opened: m,
21
+ opened: d,
21
22
  onClose: () => {
22
- p(), t();
23
+ p(), i();
23
24
  },
24
25
  radius: "md",
25
26
  withCloseButton: !0,
@@ -35,28 +36,28 @@ const E = ({
35
36
  position: "relative"
36
37
  },
37
38
  ml: 5,
38
- position: r ? {
39
+ position: n ? {
39
40
  right: 5,
40
41
  bottom: 0
41
42
  } : void 0,
42
- children: /* @__PURE__ */ e(n, { w: "100%", children: [
43
+ children: /* @__PURE__ */ e(c, { w: "100%", children: [
43
44
  /* @__PURE__ */ o(
44
- c,
45
+ a,
45
46
  {
46
47
  h: "50%",
47
48
  w: "100%",
48
- className: z.section,
49
+ className: C.section,
49
50
  style: { zIndex: -1 }
50
51
  }
51
52
  ),
52
- /* @__PURE__ */ e(n, { gap: 32, w: "100%", children: [
53
- /* @__PURE__ */ e(c, { w: "100%", justify: "center", pt: 30, children: [
54
- /* @__PURE__ */ o(k, { width: 66, height: 66 }),
55
- /* @__PURE__ */ o(w, { color: "#FFFFFF", size: 32 }),
56
- /* @__PURE__ */ o(v, { width: 66, height: 66 })
53
+ /* @__PURE__ */ e(c, { gap: 32, w: "100%", children: [
54
+ /* @__PURE__ */ e(a, { w: "100%", justify: "center", pt: 30, children: [
55
+ /* @__PURE__ */ o(v, { width: 66, height: 66 }),
56
+ /* @__PURE__ */ o(x, { color: "#FFFFFF", size: 32 }),
57
+ /* @__PURE__ */ o(z, { width: 66, height: 66 })
57
58
  ] }),
58
59
  /* @__PURE__ */ e(
59
- n,
60
+ c,
60
61
  {
61
62
  gap: 8,
62
63
  align: "center",
@@ -64,13 +65,13 @@ const E = ({
64
65
  w: "100%",
65
66
  px: 12,
66
67
  children: [
67
- /* @__PURE__ */ o(s, { fz: 20, fw: 700, lh: "24px", ta: "center", children: /* @__PURE__ */ o(
68
- g,
68
+ /* @__PURE__ */ o(l, { fz: 20, fw: 700, lh: "24px", ta: "center", children: /* @__PURE__ */ o(
69
+ f,
69
70
  {
70
- i18nKey: i("communityDialog.desc1"),
71
+ i18nKey: t("communityDialog.desc1"),
71
72
  components: {
72
73
  Text: /* @__PURE__ */ o(
73
- s,
74
+ l,
74
75
  {
75
76
  fz: "inherit",
76
77
  fw: "inherit",
@@ -81,9 +82,9 @@ const E = ({
81
82
  }
82
83
  }
83
84
  ) }),
84
- /* @__PURE__ */ o(s, { px: 12, fz: 14, lh: "16px", ta: "center", children: i("communityDialog.desc2") }),
85
+ /* @__PURE__ */ o(l, { px: 12, fz: 14, lh: "16px", ta: "center", children: t("communityDialog.desc2") }),
85
86
  /* @__PURE__ */ e(
86
- c,
87
+ a,
87
88
  {
88
89
  w: "100%",
89
90
  justify: "space-between",
@@ -93,43 +94,43 @@ const E = ({
93
94
  wrap: "wrap",
94
95
  children: [
95
96
  /* @__PURE__ */ o(
96
- a,
97
+ s,
97
98
  {
98
99
  variant: "subtle",
99
100
  onClick: () => {
100
- p(), t();
101
+ p(), i();
101
102
  },
102
- children: i("communityDialog.remind")
103
+ children: t("communityDialog.remind")
103
104
  }
104
105
  ),
105
- /* @__PURE__ */ e(u, { gap: 8, children: [
106
- /* @__PURE__ */ o(
107
- a,
106
+ /* @__PURE__ */ e(w, { gap: 8, children: [
107
+ r.social.discordEnabled && /* @__PURE__ */ o(
108
+ s,
108
109
  {
109
110
  component: "a",
110
- href: "https://discord.gg/mEd2PbchRD",
111
+ href: r.social.discord,
111
112
  target: "_blank",
112
113
  px: 16,
113
114
  color: "#5A66F5",
114
115
  onClick: () => {
115
- l(), t();
116
+ m(), i();
116
117
  },
117
- children: r ? /* @__PURE__ */ o(x, { size: 20 }) : "Discord"
118
+ children: n ? /* @__PURE__ */ o(b, { size: 20 }) : "Discord"
118
119
  }
119
120
  ),
120
- /* @__PURE__ */ o(
121
- a,
121
+ r.social.telegramEnabled && /* @__PURE__ */ o(
122
+ s,
122
123
  {
123
124
  onClick: () => {
124
- l(), t();
125
+ m(), i();
125
126
  },
126
127
  component: "a",
127
- href: "https://t.me/layers_app",
128
+ href: r.social.telegram,
128
129
  target: "_blank",
129
130
  c: "#fff",
130
131
  px: 16,
131
132
  color: "#3BB3F2",
132
- children: r ? /* @__PURE__ */ o(D, { size: 20 }) : "Telegram"
133
+ children: n ? /* @__PURE__ */ o(D, { size: 20 }) : "Telegram"
133
134
  }
134
135
  )
135
136
  ] })
@@ -145,5 +146,5 @@ const E = ({
145
146
  );
146
147
  };
147
148
  export {
148
- E as CommunitiesDialog
149
+ K as CommunitiesDialog
149
150
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Copyright/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AAQpD,UAAU,cAAc;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,GAAG,WAAW,CAwB5D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Copyright/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AASpD,UAAU,cAAc;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,GAAG,WAAW,CAwB5D,CAAC"}
@@ -1,10 +1,11 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { Button as n } from "@mantine/core";
3
3
  import p from "clsx";
4
- import { DEFAULT_FONT_FAMILY as a } from "../../constants.js";
4
+ import { brand as a } from "../../config/brand.js";
5
+ import { DEFAULT_FONT_FAMILY as f } from "../../constants.js";
5
6
  import { Logotype as l } from "../Logotype.js";
6
- import f from "./Copyright.module.css.js";
7
- const F = ({
7
+ import s from "./Copyright.module.css.js";
8
+ const L = ({
8
9
  color: o,
9
10
  title: t,
10
11
  className: e,
@@ -14,19 +15,19 @@ const F = ({
14
15
  n,
15
16
  {
16
17
  component: "a",
17
- href: "https://layers.md",
18
+ href: a.websiteUrl,
18
19
  target: "_blank",
19
20
  rel: "noopener noreferrer",
20
21
  leftSection: /* @__PURE__ */ r(l, { variant: "copyright", isLink: !1 }),
21
22
  variant: "filled",
22
23
  size: i,
23
24
  color: o,
24
- className: p(f.brandingWrapper, e),
25
- style: { fontFamily: a },
25
+ className: p(s.brandingWrapper, e),
26
+ style: { fontFamily: f },
26
27
  ...m,
27
28
  children: t
28
29
  }
29
30
  );
30
31
  export {
31
- F as Copyright
32
+ L as Copyright
32
33
  };
@@ -1 +1 @@
1
- {"version":3,"file":"EmojiPanel.d.ts","sourceRoot":"","sources":["../../../src/components/EmojiPicker/EmojiPanel.tsx"],"names":[],"mappings":"AAyCA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAsBjD,eAAO,MAAM,UAAU,GAAI,6DAMxB,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,aAAa,CAAC,GAAG;IAC5E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC,4CAiTA,CAAC"}
1
+ {"version":3,"file":"EmojiPanel.d.ts","sourceRoot":"","sources":["../../../src/components/EmojiPicker/EmojiPanel.tsx"],"names":[],"mappings":"AAyCA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAsBjD,eAAO,MAAM,UAAU,GAAI,6DAMxB,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,aAAa,CAAC,GAAG;IAC5E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC,4CAmTA,CAAC"}