@layers-app/shared 0.3.0 → 0.3.2

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 (142) hide show
  1. package/dist/assets/default-workspace-avatar.jpg.js +4 -0
  2. package/dist/assets/layers-logo-full.svg.js +2 -3
  3. package/dist/assets/layers-logo-full.svg2.js +3 -2
  4. package/dist/assets/layers-logo-icon.svg.js +2 -3
  5. package/dist/assets/layers-logo-icon.svg2.js +3 -2
  6. package/dist/assets/projects/figureA.svg.js +4 -0
  7. package/dist/assets/projects/figureB.svg.js +4 -0
  8. package/dist/assets/qwebchannel.d.ts +15 -0
  9. package/dist/assets/qwebchannel.d.ts.map +1 -0
  10. package/dist/assets/taskPriorities/high.svg.js +5 -0
  11. package/dist/assets/taskPriorities/low.svg.js +5 -0
  12. package/dist/assets/taskPriorities/none.svg.js +5 -0
  13. package/dist/assets/taskPriorities/normal.svg.js +5 -0
  14. package/dist/assets/taskPriorities/urgent.svg.js +5 -0
  15. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.d.ts +3 -0
  16. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.d.ts.map +1 -0
  17. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.js +69 -0
  18. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +27 -0
  19. package/dist/components/AnimatedFigurePage/types.d.ts +15 -0
  20. package/dist/components/AnimatedFigurePage/types.d.ts.map +1 -0
  21. package/dist/components/AnimatedFigurePage/useParallax.d.ts +6 -0
  22. package/dist/components/AnimatedFigurePage/useParallax.d.ts.map +1 -0
  23. package/dist/components/AnimatedFigurePage/useParallax.js +29 -0
  24. package/dist/components/AppContainer/AppContainer.d.ts +1 -1
  25. package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
  26. package/dist/components/AppContainer/AppContainer.js +37 -36
  27. package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
  28. package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +80 -45
  29. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
  30. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +60 -69
  31. package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
  32. package/dist/components/AppContainer/hooks/useAppContainer.d.ts.map +1 -1
  33. package/dist/components/AppContainer/hooks/useAppContainer.js +57 -51
  34. package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
  35. package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +3 -1
  36. package/dist/components/AppContainer/types.d.ts +3 -0
  37. package/dist/components/AppContainer/types.d.ts.map +1 -1
  38. package/dist/components/ColorPicker/ColorPicker.d.ts +9 -1
  39. package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  40. package/dist/components/ColorPicker/ColorPicker.js +88 -74
  41. package/dist/components/ColorPicker/ColorPicker.module.css.js +31 -0
  42. package/dist/components/ColorPicker/ColorPickerList.d.ts +6 -0
  43. package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -0
  44. package/dist/components/ColorPicker/ColorPickerList.js +134 -0
  45. package/dist/components/ColorPicker/ColorPickerPopover.d.ts +6 -6
  46. package/dist/components/ColorPicker/ColorPickerPopover.d.ts.map +1 -1
  47. package/dist/components/ColorPicker/ColorPickerPopover.js +29 -31
  48. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts +13 -0
  49. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -0
  50. package/dist/components/ColorPicker/ColorPickerToolbar.js +132 -0
  51. package/dist/components/ColorPicker/icons.d.ts +11 -0
  52. package/dist/components/ColorPicker/icons.d.ts.map +1 -0
  53. package/dist/components/ColorPicker/icons.js +71 -0
  54. package/dist/components/ColorPicker/types.d.ts +49 -0
  55. package/dist/components/ColorPicker/types.d.ts.map +1 -0
  56. package/dist/components/ColorPicker/types.js +10 -0
  57. package/dist/components/ColorPicker/useRecentColors.d.ts +13 -0
  58. package/dist/components/ColorPicker/useRecentColors.d.ts.map +1 -0
  59. package/dist/components/ColorPicker/useRecentColors.js +39 -0
  60. package/dist/components/CommentComposer/index.d.ts.map +1 -1
  61. package/dist/components/CommentComposer/index.js +115 -111
  62. package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
  63. package/dist/components/EmojiPicker/EmojiPanel.js +12 -10
  64. package/dist/components/EmojiPicker/EmojiPicker.d.ts +3 -1
  65. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  66. package/dist/components/EmojiPicker/EmojiPicker.js +49 -46
  67. package/dist/components/EmojiPicker/IconsPanel.d.ts +2 -1
  68. package/dist/components/EmojiPicker/IconsPanel.d.ts.map +1 -1
  69. package/dist/components/EmojiPicker/IconsPanel.js +47 -45
  70. package/dist/components/EmojiPicker/custom-icons/customIcons.d.ts.map +1 -1
  71. package/dist/components/EmojiPicker/custom-icons/customIcons.js +66 -31
  72. package/dist/components/EntityIcon.d.ts +3 -3
  73. package/dist/components/EntityIcon.d.ts.map +1 -1
  74. package/dist/components/EntityIcon.js +59 -35
  75. package/dist/components/EntityTitle/EntityTitle.d.ts +1 -1
  76. package/dist/components/EntityTitle/EntityTitle.d.ts.map +1 -1
  77. package/dist/components/EntityTitle/EntityTitle.js +34 -34
  78. package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
  79. package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
  80. package/dist/components/FilePicker/FilePicker.js +111 -123
  81. package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
  82. package/dist/components/FilePicker/FilePickerUpload.js +41 -39
  83. package/dist/components/FormViewer/components/fields/UploadField/UploadField.d.ts.map +1 -1
  84. package/dist/components/FormViewer/components/fields/UploadField/UploadField.js +34 -33
  85. package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts +3 -3
  86. package/dist/components/Logotype.d.ts +2 -1
  87. package/dist/components/Logotype.d.ts.map +1 -1
  88. package/dist/components/Logotype.js +58 -49
  89. package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
  90. package/dist/components/NavMenu/components/NavMenuItem.js +122 -107
  91. package/dist/components/NavMenu/types.d.ts +1 -0
  92. package/dist/components/NavMenu/types.d.ts.map +1 -1
  93. package/dist/components/ProjectIcon/ProjectIcon.js +13 -13
  94. package/dist/components/TreeIndent/TreeIndent.d.ts +9 -0
  95. package/dist/components/TreeIndent/TreeIndent.d.ts.map +1 -0
  96. package/dist/components/TreeIndent/TreeIndent.js +15 -0
  97. package/dist/components/TreeIndent/TreeIndent.module.css.js +11 -0
  98. package/dist/components/TreeIndent/index.d.ts +2 -0
  99. package/dist/components/TreeIndent/index.d.ts.map +1 -0
  100. package/dist/components/WorkspaceAvatar/WorkspaceAvatar.js +11 -11
  101. package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
  102. package/dist/components/WorkspaceMenu/WorkspaceMenu.js +97 -101
  103. package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
  104. package/dist/config/brand.d.ts +1 -0
  105. package/dist/config/brand.d.ts.map +1 -1
  106. package/dist/config/brand.js +42 -34
  107. package/dist/config/envConfig.d.ts +40 -0
  108. package/dist/config/envConfig.d.ts.map +1 -1
  109. package/dist/config/envConfig.js +29 -10
  110. package/dist/constants.d.ts.map +1 -1
  111. package/dist/constants.js +15 -4
  112. package/dist/helpers/getFileIcons.d.ts.map +1 -1
  113. package/dist/helpers/getFileIcons.js +34 -29
  114. package/dist/helpers/getFileType.d.ts +1 -1
  115. package/dist/helpers/getFileType.d.ts.map +1 -1
  116. package/dist/helpers/getFileType.js +3 -3
  117. package/dist/helpers/hotjar.d.ts.map +1 -1
  118. package/dist/helpers/hotjar.js +11 -7
  119. package/dist/helpers/platform.js +4 -4
  120. package/dist/helpers/showNotifications.d.ts +3 -0
  121. package/dist/helpers/showNotifications.d.ts.map +1 -1
  122. package/dist/helpers/showNotifications.js +79 -44
  123. package/dist/hooks/useDateFnsLocale.d.ts +2 -0
  124. package/dist/hooks/useDateFnsLocale.d.ts.map +1 -1
  125. package/dist/hooks/useDateFnsLocale.js +9 -8
  126. package/dist/hooks/useDateUtils.d.ts.map +1 -1
  127. package/dist/hooks/useDateUtils.js +19 -19
  128. package/dist/hooks/useFormatDistance.d.ts.map +1 -1
  129. package/dist/hooks/useFormatDistance.js +6 -6
  130. package/dist/hooks/useNumberQueryParam.d.ts +1 -1
  131. package/dist/hooks/useNumberQueryParam.d.ts.map +1 -1
  132. package/dist/index.css +1 -1
  133. package/dist/index.d.ts +8 -0
  134. package/dist/index.d.ts.map +1 -1
  135. package/dist/index.js +516 -494
  136. package/dist/lang/locales/ui_en.json.js +7 -7
  137. package/dist/lang/locales/ui_es.json.js +1 -1
  138. package/dist/lang/locales/ui_ru.json.js +11 -11
  139. package/dist/utils/formatStorage.d.ts +9 -0
  140. package/dist/utils/formatStorage.d.ts.map +1 -1
  141. package/dist/utils/formatStorage.js +14 -10
  142. package/package.json +1 -1
@@ -0,0 +1,11 @@
1
+ const t = "_container_4tsvl_1", e = "_depthBox_4tsvl_11", o = "_item_4tsvl_19", n = {
2
+ container: t,
3
+ depthBox: e,
4
+ item: o
5
+ };
6
+ export {
7
+ t as container,
8
+ n as default,
9
+ e as depthBox,
10
+ o as item
11
+ };
@@ -0,0 +1,2 @@
1
+ export { TreeIndentContainer, TreeIndentItem } from './TreeIndent';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TreeIndent/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
@@ -1,22 +1,22 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as i } from "react";
3
- import { Avatar as e } from "@mantine/core";
4
- import { brand as m } from "../../config/brand.js";
5
- const f = i(
6
- ({ workspace: r, ...o }, a) => /* @__PURE__ */ t(
7
- e,
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { forwardRef as e } from "react";
3
+ import { Avatar as i } from "@mantine/core";
4
+ import m from "../../assets/default-workspace-avatar.jpg.js";
5
+ const c = e(
6
+ ({ workspace: r, ...a }, t) => /* @__PURE__ */ o(
7
+ i,
8
8
  {
9
- src: r?.workspaceIcon || m.logoIconUrl,
9
+ src: r?.workspaceIcon || m,
10
10
  tt: "uppercase",
11
11
  color: "initials",
12
12
  variant: "filled",
13
13
  name: r?.workspaceId,
14
14
  radius: "var(--mantine-radius-default)",
15
- ...o,
16
- ref: a
15
+ ...a,
16
+ ref: t
17
17
  }
18
18
  )
19
19
  );
20
20
  export {
21
- f as WorkspaceAvatar
21
+ c as WorkspaceAvatar
22
22
  };
@@ -1 +1 @@
1
- {"version":3,"file":"WorkspaceMenu.d.ts","sourceRoot":"","sources":["../../../src/components/WorkspaceMenu/WorkspaceMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;AA6BpD,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,KAAK,CAAC;QACxB,IAAI,EACA,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,OAAO,GACP,OAAO,GACP,UAAU,GACV,MAAM,CAAC;QACX,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;IACH,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QA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AC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,aAAa,EAAE,iHAWpD,iBAAiB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,4CAwE1C,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,aAAa,EAAE,gEAMtD,IAAI,CACL,kBAAkB,CAAC,CAAC,CAAC,EACrB,QAAQ,GAAG,eAAe,GAAG,cAAc,GAAG,aAAa,GAAG,SAAS,CACxE,4CA8DA,CAAC"}
@@ -1,71 +1,71 @@
1
- import { jsxs as n, jsx as e, Fragment as M } from "react/jsx-runtime";
2
- import { useState as A } from "react";
1
+ import { jsxs as o, jsx as e, Fragment as M } from "react/jsx-runtime";
2
+ import { useState as K } from "react";
3
3
  import { useTranslation as u } from "react-i18next";
4
- import { Link as z } from "react-router-dom";
5
- import { Setting07Icon as L, UserMultiple02Icon as N, Add01Icon as K } from "@hugeicons/core-free-icons";
6
- import { HugeiconsIcon as k } from "@hugeicons/react";
7
- import { Stack as a, Flex as l, Text as d, Box as f, Button as b, Menu as m, Tooltip as P, Progress as T, ScrollArea as U } from "@mantine/core";
8
- import { useMenu as B } from "../../hooks/useMenu.js";
9
- import { usePlatform as D } from "../../hooks/usePlatform.js";
10
- import { formatStoragePercent as F, formatStorage as S } from "../../utils/formatStorage.js";
4
+ import { Link as S } from "react-router-dom";
5
+ import { Setting07Icon as U, UserMultiple02Icon as j, Add01Icon as A } from "@hugeicons/core-free-icons";
6
+ import { HugeiconsIcon as b } from "@hugeicons/react";
7
+ import { Stack as a, Flex as l, Text as d, Box as h, Button as z, Menu as m, Tooltip as N, Progress as $, ScrollArea as P } from "@mantine/core";
8
+ import { useMenu as T } from "../../hooks/useMenu.js";
9
+ import { usePlatform as B } from "../../hooks/usePlatform.js";
10
+ import { formatStoragePercent as D, formatStorage as k, resolveStorageLimit as F } from "../../utils/formatStorage.js";
11
11
  import { Logotype as O } from "../Logotype.js";
12
12
  import { WorkspaceAvatar as x } from "../WorkspaceAvatar/WorkspaceAvatar.js";
13
13
  import { WorkspaceItem as E } from "./WorkspaceItem.js";
14
- const oe = ({
14
+ const te = ({
15
15
  children: r,
16
- onCreate: i,
17
- onClick: t,
18
- active: o,
19
- items: c,
20
- workspaceLink: s,
16
+ onCreate: c,
17
+ onClick: s,
18
+ active: n,
19
+ items: i,
20
+ workspaceLink: t,
21
21
  settingsLink: p,
22
22
  membersLink: y,
23
23
  isAnonym: I,
24
- publicMode: W
24
+ publicMode: L
25
25
  }) => {
26
- const { t: C } = u("workspaceMenu"), { isMobile: w } = B(), [j, h] = A(!1);
27
- return I || W ? /* @__PURE__ */ e(l, { w: "100%", justify: w ? "start" : "center", children: /* @__PURE__ */ e("a", { href: "/", children: /* @__PURE__ */ e(
26
+ const { t: W } = u("workspaceMenu"), { isMobile: g } = T(), [C, f] = K(!1);
27
+ return I || L ? /* @__PURE__ */ e(l, { w: "100%", justify: g ? "start" : "center", children: /* @__PURE__ */ e("a", { href: "/", children: /* @__PURE__ */ e(
28
28
  O,
29
29
  {
30
- minified: !w,
31
- w: w ? 65 : 24,
30
+ minified: !g,
31
+ w: g ? 65 : 24,
32
32
  isLink: !1
33
33
  }
34
- ) }) }) : /* @__PURE__ */ e(M, { children: /* @__PURE__ */ n(
34
+ ) }) }) : /* @__PURE__ */ e(M, { children: /* @__PURE__ */ o(
35
35
  m,
36
36
  {
37
- opened: j,
38
- onChange: h,
37
+ opened: C,
38
+ onChange: f,
39
39
  position: "right-start",
40
40
  keepMounted: !1,
41
41
  clickOutsideEvents: ["mousedown", "click"],
42
42
  offset: 17,
43
43
  children: [
44
- /* @__PURE__ */ e(m.Target, { children: r ?? /* @__PURE__ */ n(l, { onClick: () => h((g) => !g), children: [
45
- /* @__PURE__ */ e(x, { size: 30, workspace: o }),
46
- /* @__PURE__ */ e(l, { justify: "space-between", align: "center", w: "100%", miw: 0, children: /* @__PURE__ */ e(P, { label: o.workspaceName, children: /* @__PURE__ */ e(d, { size: "md", truncate: !0, children: o?.workspaceName || C("noName") }) }) })
44
+ /* @__PURE__ */ e(m.Target, { children: r ?? /* @__PURE__ */ o(l, { onClick: () => f((w) => !w), children: [
45
+ /* @__PURE__ */ e(x, { size: 30, workspace: n }),
46
+ /* @__PURE__ */ e(l, { justify: "space-between", align: "center", w: "100%", miw: 0, children: /* @__PURE__ */ e(N, { label: n.workspaceName, children: /* @__PURE__ */ e(d, { size: "md", truncate: !0, children: n?.workspaceName || W("noName") }) }) })
47
47
  ] }) }),
48
- /* @__PURE__ */ e(m.Dropdown, { w: 338, children: /* @__PURE__ */ n(a, { gap: 6, children: [
48
+ /* @__PURE__ */ e(m.Dropdown, { w: 338, children: /* @__PURE__ */ o(a, { gap: 6, children: [
49
49
  /* @__PURE__ */ e(
50
50
  H,
51
51
  {
52
- active: o,
53
- workspaceLink: s,
52
+ active: n,
53
+ workspaceLink: t,
54
54
  settingsLink: p,
55
55
  membersLink: y,
56
- onClose: () => h(!1)
56
+ onClose: () => f(!1)
57
57
  }
58
58
  ),
59
- /* @__PURE__ */ e(f, { px: 4, children: /* @__PURE__ */ e(m.Divider, {}) }),
59
+ /* @__PURE__ */ e(h, { px: 4, children: /* @__PURE__ */ e(m.Divider, {}) }),
60
60
  /* @__PURE__ */ e(
61
- $,
61
+ q,
62
62
  {
63
- onCreate: i,
64
- onClick: t,
65
- items: c.filter(
66
- (g) => g.workspaceId !== o?.workspaceId
63
+ onCreate: c,
64
+ onClick: s,
65
+ items: i.filter(
66
+ (w) => w.workspaceId !== n?.workspaceId
67
67
  ),
68
- onClose: () => h(!1)
68
+ onClose: () => f(!1)
69
69
  }
70
70
  )
71
71
  ] }) })
@@ -74,22 +74,22 @@ const oe = ({
74
74
  ) });
75
75
  }, H = ({
76
76
  active: r,
77
- workspaceLink: i,
78
- settingsLink: t,
79
- membersLink: o,
80
- onClose: c
77
+ workspaceLink: c,
78
+ settingsLink: s,
79
+ membersLink: n,
80
+ onClose: i
81
81
  }) => {
82
- const { t: s } = u("workspaceMenu"), p = D();
83
- return /* @__PURE__ */ n(a, { p: 4, pb: 5, gap: 12, children: [
84
- /* @__PURE__ */ n(l, { gap: 10, children: [
82
+ const { t } = u("workspaceMenu"), p = B();
83
+ return /* @__PURE__ */ o(a, { p: 4, pb: 5, gap: 12, children: [
84
+ /* @__PURE__ */ o(l, { gap: 10, children: [
85
85
  /* @__PURE__ */ e(x, { size: 48, workspace: r }),
86
- /* @__PURE__ */ n(a, { gap: 0, miw: 0, children: [
87
- /* @__PURE__ */ e(d, { truncate: !0, size: "md", fw: 500, c: "var(--mantine-color-bright)", children: r.workspaceName || s("noName") }),
88
- /* @__PURE__ */ e(d, { c: "gray", size: "sm", fw: 500, component: "span", children: /* @__PURE__ */ n(l, { gap: 6, component: "span", children: [
89
- r.totalMembers ? /* @__PURE__ */ n(M, { children: [
90
- s("member", { count: r.totalMembers }),
86
+ /* @__PURE__ */ o(a, { gap: 0, miw: 0, children: [
87
+ /* @__PURE__ */ e(d, { truncate: !0, size: "md", fw: 500, c: "var(--mantine-color-bright)", children: r.workspaceName || t("noName") }),
88
+ /* @__PURE__ */ e(d, { c: "gray", size: "sm", fw: 500, component: "span", children: /* @__PURE__ */ o(l, { gap: 6, component: "span", children: [
89
+ r.totalMembers ? /* @__PURE__ */ o(M, { children: [
90
+ t("member", { count: r.totalMembers }),
91
91
  /* @__PURE__ */ e(
92
- f,
92
+ h,
93
93
  {
94
94
  w: 2,
95
95
  h: 2,
@@ -99,36 +99,36 @@ const oe = ({
99
99
  }
100
100
  )
101
101
  ] }) : null,
102
- p.has("planBadges") && s(`plans.${r.plan}`)
102
+ p.has("planBadges") && t(`plans.${r.plan}`)
103
103
  ] }) })
104
104
  ] })
105
105
  ] }),
106
106
  p.has("plans") && /* @__PURE__ */ e(R, { active: r }),
107
- /* @__PURE__ */ n(l, { children: [
107
+ /* @__PURE__ */ o(l, { children: [
108
108
  /* @__PURE__ */ e(
109
- b,
109
+ z,
110
110
  {
111
111
  flex: 1,
112
- component: z,
112
+ component: S,
113
113
  variant: "default",
114
114
  size: "sm",
115
- leftSection: /* @__PURE__ */ e(k, { size: 16, icon: L }),
116
- to: i ?? t ?? "",
117
- onClick: c,
118
- children: s("settings")
115
+ leftSection: /* @__PURE__ */ e(b, { size: 16, icon: U }),
116
+ to: c ?? s ?? "",
117
+ onClick: i,
118
+ children: t("settings")
119
119
  }
120
120
  ),
121
- o && p.has("inviteUsers") && /* @__PURE__ */ e(
122
- b,
121
+ n && p.has("inviteUsers") && /* @__PURE__ */ e(
122
+ z,
123
123
  {
124
124
  flex: 1,
125
- component: z,
125
+ component: S,
126
126
  variant: "default",
127
127
  size: "sm",
128
- leftSection: /* @__PURE__ */ e(k, { size: 16, icon: N }),
129
- to: o,
130
- onClick: c,
131
- children: s("members")
128
+ leftSection: /* @__PURE__ */ e(b, { size: 16, icon: j }),
129
+ to: n,
130
+ onClick: i,
131
+ children: t("members")
132
132
  }
133
133
  )
134
134
  ] })
@@ -136,37 +136,33 @@ const oe = ({
136
136
  }, R = ({
137
137
  active: r
138
138
  }) => {
139
- const { t: i } = u("workspaceMenu"), t = (r?.storageUsedKb || 0) / (r?.storageLimitKb || 1), o = F(t * 100);
140
- return /* @__PURE__ */ n(a, { gap: 4, w: "100%", children: [
141
- /* @__PURE__ */ n(l, { justify: "space-between", children: [
142
- /* @__PURE__ */ n(d, { size: "sm", fw: 500, children: [
143
- i("usedStorage"),
139
+ const { t: c } = u("workspaceMenu"), { isUnlimited: s, effectiveLimitKb: n } = F(
140
+ r?.storageLimitKb || 0,
141
+ r?.storageUsedKb || 0
142
+ ), i = (r?.storageUsedKb || 0) / n, t = D(i * 100);
143
+ return /* @__PURE__ */ o(a, { gap: 4, w: "100%", children: [
144
+ /* @__PURE__ */ o(l, { justify: "space-between", children: [
145
+ /* @__PURE__ */ o(d, { size: "sm", fw: 500, children: [
146
+ c("usedStorage"),
144
147
  ": ",
145
- o,
146
- "%"
148
+ s ? "" : `${t}%`
147
149
  ] }),
148
- /* @__PURE__ */ n(d, { size: "sm", fw: 500, c: "gray", children: [
149
- S(r?.storageUsedKb),
150
- " ",
151
- i("of"),
152
- " ",
153
- S(r?.storageLimitKb)
154
- ] })
150
+ /* @__PURE__ */ e(d, { size: "sm", fw: 500, c: "gray", children: s ? k(r?.storageUsedKb) : `${k(r?.storageUsedKb)} ${c("of")} ${k(r?.storageLimitKb)}` })
155
151
  ] }),
156
- /* @__PURE__ */ e(T, { h: 4, value: t * 100 })
152
+ !s && /* @__PURE__ */ e($, { h: 4, value: i * 100 })
157
153
  ] });
158
- }, $ = ({
154
+ }, q = ({
159
155
  onCreate: r,
160
- onClick: i,
161
- items: t,
162
- onClose: o
156
+ onClick: c,
157
+ items: s,
158
+ onClose: n
163
159
  }) => {
164
- const { t: c } = u("workspaceMenu");
165
- return /* @__PURE__ */ n(a, { gap: 12, children: [
166
- t?.length > 0 && /* @__PURE__ */ n(a, { gap: 0, children: [
167
- /* @__PURE__ */ e(m.Label, { fw: 600, px: 4, py: 5, fz: "sm", children: c("switchWorkspace") }),
168
- /* @__PURE__ */ e(f, { w: "100%", px: 4, children: /* @__PURE__ */ e(
169
- U.Autosize,
160
+ const { t: i } = u("workspaceMenu");
161
+ return /* @__PURE__ */ o(a, { gap: 12, children: [
162
+ s?.length > 0 && /* @__PURE__ */ o(a, { gap: 0, children: [
163
+ /* @__PURE__ */ e(m.Label, { fw: 600, px: 4, py: 5, fz: "sm", children: i("switchWorkspace") }),
164
+ /* @__PURE__ */ e(h, { w: "100%", px: 4, children: /* @__PURE__ */ e(
165
+ P.Autosize,
170
166
  {
171
167
  mah: 200,
172
168
  w: "100%",
@@ -175,39 +171,39 @@ const oe = ({
175
171
  type: "always",
176
172
  styles: {
177
173
  viewport: {
178
- paddingRight: t.length > 4 ? 12 : 0
174
+ paddingRight: s.length > 4 ? 12 : 0
179
175
  },
180
176
  content: {
181
177
  minWidth: 0
182
178
  }
183
179
  },
184
- children: /* @__PURE__ */ e(a, { gap: 6, miw: 0, children: t.map((s) => /* @__PURE__ */ e(
180
+ children: /* @__PURE__ */ e(a, { gap: 6, miw: 0, children: s.map((t) => /* @__PURE__ */ e(
185
181
  E,
186
182
  {
187
- workspace: s,
188
- onClick: i
183
+ workspace: t,
184
+ onClick: c
189
185
  },
190
- s.workspaceId
186
+ t.workspaceId
191
187
  )) })
192
188
  }
193
189
  ) })
194
190
  ] }),
195
- /* @__PURE__ */ e(f, { p: 4, pt: 0, children: /* @__PURE__ */ e(
196
- b,
191
+ /* @__PURE__ */ e(h, { p: 4, pt: 0, children: /* @__PURE__ */ e(
192
+ z,
197
193
  {
198
194
  fullWidth: !0,
199
195
  variant: "default",
200
196
  size: "sm",
201
197
  onClick: () => {
202
- r?.(), o?.();
198
+ r?.(), n?.();
203
199
  },
204
- leftSection: /* @__PURE__ */ e(k, { icon: K, size: 16 }),
205
- children: c("newWorkspace")
200
+ leftSection: /* @__PURE__ */ e(b, { icon: A, size: 16 }),
201
+ children: i("newWorkspace")
206
202
  }
207
203
  ) })
208
204
  ] });
209
205
  };
210
206
  export {
211
207
  H as ActiveWorkspace,
212
- oe as WorkspaceMenu
208
+ te as WorkspaceMenu
213
209
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RemoveConfirmModal.d.ts","sourceRoot":"","sources":["../../../src/components/modals/RemoveConfirmModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,eAAO,MAAM,sBAAsB,GACjC,OAAO,UAAU,CAAC,OAAO,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAAG;IACrD,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CACzB,SAuFF,CAAC"}
1
+ {"version":3,"file":"RemoveConfirmModal.d.ts","sourceRoot":"","sources":["../../../src/components/modals/RemoveConfirmModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,eAAO,MAAM,sBAAsB,GACjC,OAAO,UAAU,CAAC,OAAO,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAAG;IACrD,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CACzB,SAsFF,CAAC"}
@@ -20,6 +20,7 @@ export declare const brand: {
20
20
  }>;
21
21
  readonly customIconUrl: string | null;
22
22
  readonly customIconDarkUrl: string | null;
23
+ readonly customLogoUrl: string | null;
23
24
  readonly logoFullUrl: string;
24
25
  readonly logoIconUrl: string;
25
26
  readonly websiteUrl: string;
@@ -1 +1 @@
1
- {"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../../src/config/brand.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCjB,CAAC;AAGF,eAAO,MAAM,kBAAkB;;;;CAI9B,CAAC"}
1
+ {"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../../src/config/brand.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8DjB,CAAC;AAGF,eAAO,MAAM,kBAAkB;;;;CAU9B,CAAC"}
@@ -1,69 +1,77 @@
1
- import n from "../assets/layers-logo-full.svg.js";
2
- import s from "../assets/layers-logo-icon.svg.js";
3
- import p from "../assets/logo-copyright.svg.js";
4
- import g from "../assets/layers-logo-full.svg2.js";
5
- import i from "../assets/layers-logo-icon.svg2.js";
6
- import { resolveNonBlankString as l, normalizeUrl as t, getEnvConfig as m } from "./envConfig.js";
7
- const d = { VITE_APP_NAME: "Layers", VITE_APP_URL: "https://app.layers.md" }, a = d, e = () => m(), o = {
1
+ import g from "../assets/layers-logo-full.svg.js";
2
+ import s from "../assets/layers-logo-full.svg2.js";
3
+ import i from "../assets/layers-logo-icon.svg.js";
4
+ import p from "../assets/layers-logo-icon.svg2.js";
5
+ import c from "../assets/logo-copyright.svg.js";
6
+ import { resolveNonBlankString as o, normalizeUrl as n, getEnvConfig as m } from "./envConfig.js";
7
+ const d = { VITE_APP_NAME: "Layers" }, t = d, e = () => m(), l = {
8
8
  get name() {
9
- return l(e().appName, a.VITE_APP_NAME) || "Layers";
9
+ return o(e().appName, t.VITE_APP_NAME) || "Layers";
10
10
  },
11
11
  // Bundled SVG components (support currentColor for theme switching)
12
- LogoFull: n,
13
- LogoIcon: s,
14
- LogoCopyright: p,
15
- // Custom icon URLs from admin panel (null if not configured)
12
+ LogoFull: s,
13
+ LogoIcon: p,
14
+ LogoCopyright: c,
15
+ // Custom URLs from admin panel (null if not configured)
16
16
  get customIconUrl() {
17
- return l(e().logoFullUrl) || null;
17
+ return o(e().logoIconUrl) || o(e().logoFullUrl) || null;
18
18
  },
19
19
  get customIconDarkUrl() {
20
- return l(e().branding?.logoDarkUrl) || null;
20
+ return o(e().branding?.logoDarkUrl) || null;
21
+ },
22
+ get customLogoUrl() {
23
+ return o(e().logoFullUrl) || null;
21
24
  },
22
25
  // Static URLs (always filled — custom or bundled fallback)
23
26
  get logoFullUrl() {
24
- return l(e().logoFullUrl) || g;
27
+ return o(e().logoFullUrl) || g;
25
28
  },
26
29
  get logoIconUrl() {
27
- return l(e().logoFullUrl) || i;
30
+ return o(e().logoIconUrl) || i;
28
31
  },
29
32
  get websiteUrl() {
30
- return t(l(e().websiteUrl) || "https://layers.md");
33
+ return n(
34
+ o(e().websiteUrl) || "https://layers.md"
35
+ );
31
36
  },
32
37
  get appUrl() {
33
- return t(l(e().appUrl, a.VITE_APP_URL) || "https://app.layers.md/", { trailingSlash: !0 });
38
+ return n(
39
+ o(e().appUrl, t.VITE_APP_URL) || "https://app.layers.md/",
40
+ { trailingSlash: !0 }
41
+ );
34
42
  },
35
43
  get social() {
36
- const r = e().social;
44
+ const r = e().social, a = e().region?.toUpperCase() === "RU";
37
45
  return {
38
- facebook: r?.facebook ?? "https://www.facebook.com/LayersPlatform/",
39
- facebookEnabled: r?.facebookEnabled !== !1,
40
- instagram: r?.instagram ?? "https://www.instagram.com/layers_platform/",
41
- instagramEnabled: r?.instagramEnabled !== !1,
42
- linkedin: r?.linkedin ?? "https://www.linkedin.com/company/layers-systems/",
46
+ facebook: r?.facebook ?? "",
47
+ facebookEnabled: !a && r?.facebookEnabled !== !1,
48
+ instagram: r?.instagram ?? "",
49
+ instagramEnabled: !a && r?.instagramEnabled !== !1,
50
+ linkedin: r?.linkedin ?? "",
43
51
  linkedinEnabled: r?.linkedinEnabled !== !1,
44
- whatsapp: r?.whatsapp ?? "https://wa.me/37378291264",
52
+ whatsapp: r?.whatsapp ?? "",
45
53
  whatsappEnabled: r?.whatsappEnabled !== !1,
46
- telegram: r?.telegram ?? "https://t.me/layers_app",
54
+ telegram: r?.telegram ?? "",
47
55
  telegramEnabled: r?.telegramEnabled !== !1,
48
- discord: r?.discord ?? "https://discord.gg/mEd2PbchRD",
56
+ discord: r?.discord ?? "",
49
57
  discordEnabled: r?.discordEnabled !== !1
50
58
  };
51
59
  },
52
60
  get copyrightHolder() {
53
- return l(e().copyrightHolder) || "Layers Web Application";
61
+ return o(e().copyrightHolder) || "Layers Web Application";
54
62
  }
55
- }, h = {
63
+ }, I = {
56
64
  get appName() {
57
- return o.name;
65
+ return l.name;
58
66
  },
59
67
  get appUrl() {
60
- return o.appUrl;
68
+ return l.appUrl;
61
69
  },
62
70
  get websiteUrl() {
63
- return o.websiteUrl;
71
+ return l.websiteUrl;
64
72
  }
65
73
  };
66
74
  export {
67
- o as brand,
68
- h as brandI18nVariables
75
+ l as brand,
76
+ I as brandI18nVariables
69
77
  };
@@ -5,6 +5,9 @@ export interface EnvConfig {
5
5
  copyrightHolder?: string;
6
6
  apiBaseUrl?: string;
7
7
  googleAuthUrl?: string;
8
+ yandexAuthUrl?: string;
9
+ vkAuthUrl?: string;
10
+ esiaAuthUrl?: string;
8
11
  logoFullUrl?: string;
9
12
  logoIconUrl?: string;
10
13
  branding?: {
@@ -37,11 +40,22 @@ export interface EnvConfig {
37
40
  intercomEnabled?: boolean;
38
41
  sentryDsn?: string;
39
42
  sentryEnabled?: boolean;
43
+ hotjarId?: string;
44
+ hotjarEnabled?: boolean;
40
45
  };
41
46
  auth?: {
42
47
  google?: {
43
48
  enabled?: boolean;
44
49
  };
50
+ yandex?: {
51
+ enabled?: boolean;
52
+ };
53
+ vk?: {
54
+ enabled?: boolean;
55
+ };
56
+ esia?: {
57
+ enabled?: boolean;
58
+ };
45
59
  };
46
60
  ai?: {
47
61
  enabled?: boolean;
@@ -58,6 +72,22 @@ export interface EnvConfig {
58
72
  enabled?: boolean;
59
73
  };
60
74
  };
75
+ features?: {
76
+ accessTokens?: boolean;
77
+ };
78
+ maxFileSize?: string;
79
+ maxRequestSize?: string;
80
+ seller?: boolean;
81
+ region?: string;
82
+ download?: {
83
+ desktopEnabled?: boolean;
84
+ desktopMacUrl?: string;
85
+ desktopWinUrl?: string;
86
+ desktopLinuxUrl?: string;
87
+ selfhostEnabled?: boolean;
88
+ selfhostTarGzUrl?: string;
89
+ selfhostTarUrl?: string;
90
+ };
61
91
  }
62
92
  export declare const getEnvConfig: () => EnvConfig;
63
93
  export declare const getEnvValue: <T>(selector: (config: EnvConfig) => T | undefined, fallback?: T) => T | undefined;
@@ -66,5 +96,15 @@ export declare const normalizeUrl: (value: string, { trailingSlash }?: {
66
96
  trailingSlash?: boolean | undefined;
67
97
  }) => string;
68
98
  export declare const normalizeBaseUrl: (value: string | undefined) => string;
99
+ /**
100
+ * Parse size string like "600MB", "1GB", "50MB" to bytes.
101
+ * Returns null if format is invalid.
102
+ */
103
+ export declare const parseSizeToBytes: (size: string) => number | null;
104
+ /**
105
+ * Get max upload file size in bytes from admin config.
106
+ * Returns null if not configured — callers should use their own defaults.
107
+ */
108
+ export declare const getMaxUploadSize: () => number | null;
69
109
  export declare const joinBaseUrlPath: (baseUrl: string | undefined, path: string) => string;
70
110
  //# sourceMappingURL=envConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"envConfig.d.ts","sourceRoot":"","sources":["../../src/config/envConfig.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE;QACT,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,MAAM,CAAC,EAAE;QACP,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,e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,MAAM,MAAM,WASxE,CAAC"}
@@ -1,10 +1,10 @@
1
1
  const o = () => {
2
2
  const n = typeof window > "u" ? void 0 : window;
3
3
  return n?.envConfig == null ? {} : n.envConfig;
4
- }, u = (n, t) => {
4
+ }, l = (n, t) => {
5
5
  const r = n(o());
6
6
  return r === void 0 ? t : r;
7
- }, c = (...n) => {
7
+ }, a = (...n) => {
8
8
  for (const t of n) {
9
9
  if (typeof t != "string")
10
10
  continue;
@@ -12,18 +12,37 @@ const o = () => {
12
12
  if (r)
13
13
  return r;
14
14
  }
15
- }, i = (n, { trailingSlash: t = !1 } = {}) => {
15
+ }, s = (n, { trailingSlash: t = !1 } = {}) => {
16
16
  const e = n.trim().replace(/\/+$/, "");
17
17
  return e ? t ? `${e}/` : e : t ? "/" : "";
18
- }, s = (n) => n == null ? "" : i(n), l = (n, t) => {
19
- const r = t.startsWith("/") ? t : `/${t}`, e = s(n);
18
+ }, u = (n) => n == null ? "" : s(n), c = (n) => {
19
+ const t = n.trim().match(/^(\d+(?:\.\d+)?)\s*(KB|MB|GB|TB)$/i);
20
+ if (!t) return null;
21
+ const r = parseFloat(t[1]), e = t[2].toUpperCase(), i = {
22
+ KB: 1024,
23
+ MB: 1024 ** 2,
24
+ GB: 1024 ** 3,
25
+ TB: 1024 ** 4
26
+ };
27
+ return Math.round(r * i[e]);
28
+ }, d = () => {
29
+ const n = o().maxFileSize;
30
+ if (n) {
31
+ const t = c(n);
32
+ if (t) return t;
33
+ }
34
+ return null;
35
+ }, f = (n, t) => {
36
+ const r = t.startsWith("/") ? t : `/${t}`, e = u(n);
20
37
  return e ? `${e}${r}` : r;
21
38
  };
22
39
  export {
23
40
  o as getEnvConfig,
24
- u as getEnvValue,
25
- l as joinBaseUrlPath,
26
- s as normalizeBaseUrl,
27
- i as normalizeUrl,
28
- c as resolveNonBlankString
41
+ l as getEnvValue,
42
+ d as getMaxUploadSize,
43
+ f as joinBaseUrlPath,
44
+ u as normalizeBaseUrl,
45
+ s as normalizeUrl,
46
+ c as parseSizeToBytes,
47
+ a as resolveNonBlankString
29
48
  };