@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,150 +1,158 @@
1
- import { jsxs as s, jsx as e, Fragment as x } from "react/jsx-runtime";
2
- import { useState as F, useRef as j, useCallback as m, useEffect as A } from "react";
1
+ import { jsxs as a, jsx as e, Fragment as I } from "react/jsx-runtime";
2
+ import { useState as A, useRef as $, useMemo as B, useCallback as h, useEffect as R } from "react";
3
3
  import { useTranslation as _ } from "react-i18next";
4
- import { DiscountTag02Icon as R, CustomerSupportIcon as $, Book02Icon as B, Structure02Icon as E, Layers01Icon as O, BookOpen01Icon as U, LicenseIcon as W } from "@hugeicons/core-free-icons";
5
- import { HugeiconsIcon as n } from "@hugeicons/react";
6
- import { Stack as N, Button as h, Menu as o, Popover as u, UnstyledButton as G, Group as H, Text as I } from "@mantine/core";
7
- import { IconChevronRight as K } from "@tabler/icons-react";
8
- import Y from "../../../../../assets/svg/discord-icon.svg.js";
9
- import q from "../../../../../assets/svg/telegram-icon.svg.js";
10
- import J from "../../../../../assets/svg/whatsapp-icon.svg.js";
11
- import { isFeature as Q } from "../../../../../helpers/feature.js";
12
- import { resetFeatureFlow as V } from "../../../../../store/featureProgress.js";
13
- import { useAppContainerDataStore as X } from "../../../hooks/useAppContainerDataStore.js";
14
- import { WhatsNew as Z } from "./WhatsNew.js";
15
- import { resetOnboarding as ee } from "../../../../OnboardingTour/useOnboardingTour.js";
16
- import { FeatureProgressKey as te } from "../../../../FeatureProgress/constants.js";
17
- const ve = () => {
18
- const { t } = _("helpMenu"), [S, g] = F(!1), a = j(null), {
19
- showMessenger: f,
20
- showNewMessage: b,
21
- workspaceMenu: y,
22
- getFirstPageLink: M,
23
- version: T,
24
- updatedAt: z,
25
- privacyPolicyLink: D,
26
- userAgreementLink: L,
27
- whatsNewItems: w
28
- } = X(), C = () => {
29
- p();
4
+ import { DiscountTag02Icon as O, CustomerSupportIcon as U, Book02Icon as H, Structure02Icon as N, BookOpen01Icon as W, LicenseIcon as G } from "@hugeicons/core-free-icons";
5
+ import { HugeiconsIcon as s } from "@hugeicons/react";
6
+ import { Stack as K, Button as u, Menu as i, Popover as g, UnstyledButton as Y, Group as q, Text as S } from "@mantine/core";
7
+ import { IconChevronRight as J } from "@tabler/icons-react";
8
+ import Q from "../../../../../assets/svg/discord-icon.svg.js";
9
+ import V from "../../../../../assets/svg/telegram-icon.svg.js";
10
+ import X from "../../../../../assets/svg/whatsapp-icon.svg.js";
11
+ import { brand as o } from "../../../../../config/brand.js";
12
+ import { getEnvConfig as Z } from "../../../../../config/envConfig.js";
13
+ import { isFeature as ee } from "../../../../../helpers/feature.js";
14
+ import { usePlatform as te } from "../../../../../hooks/usePlatform.js";
15
+ import { resetFeatureFlow as oe } from "../../../../../store/featureProgress.js";
16
+ import { useAppContainerDataStore as re } from "../../../hooks/useAppContainerDataStore.js";
17
+ import { WhatsNew as ie } from "./WhatsNew.js";
18
+ import { resetOnboarding as ne } from "../../../../OnboardingTour/useOnboardingTour.js";
19
+ import { FeatureProgressKey as ae } from "../../../../FeatureProgress/constants.js";
20
+ const ze = () => {
21
+ const { t } = _("helpMenu"), y = te(), [M, f] = A(!1), c = $(null), T = B(() => {
22
+ const r = Z().analytics;
23
+ return r?.intercomEnabled !== !1 && !!r?.intercomAppId;
24
+ }, []), {
25
+ showMessenger: w,
26
+ showNewMessage: z,
27
+ workspaceMenu: C,
28
+ getFirstPageLink: D,
29
+ version: E,
30
+ updatedAt: P,
31
+ privacyPolicyLink: x,
32
+ userAgreementLink: F,
33
+ whatsNewItems: b
34
+ } = re(), j = () => {
35
+ m();
30
36
  const r = new URL(window.location.href);
31
37
  r.searchParams.get("view") === "graph" && (r.searchParams.delete("view"), window.history.replaceState(
32
38
  window.history.state,
33
39
  "",
34
40
  `${r.pathname}${r.search}${r.hash}`
35
- )), ee("graph"), V(te.GraphStart);
36
- const d = window.location.pathname.split("/").filter(Boolean), P = d[0], v = d[1] === "pages" ? d[2] : void 0, c = P || y.active.workspaceId;
37
- if (c) {
41
+ )), ne("graph"), oe(ae.GraphStart);
42
+ const p = window.location.pathname.split("/").filter(Boolean), L = p[0], v = p[1] === "pages" ? p[2] : void 0, l = L || C.active.workspaceId;
43
+ if (l) {
38
44
  if (v) {
39
- window.location.assign(`/${c}/pages/${v}`);
45
+ window.location.assign(`/${l}/pages/${v}`);
40
46
  return;
41
47
  }
42
- const k = M?.(c);
48
+ const k = D?.(l);
43
49
  if (k) {
44
50
  window.location.assign(k);
45
51
  return;
46
52
  }
47
- window.location.assign(`/${c}/pages`);
53
+ window.location.assign(`/${l}/pages`);
48
54
  return;
49
55
  }
50
56
  window.location.assign("/");
51
- }, i = m(() => {
52
- a.current && (window.clearTimeout(a.current), a.current = null);
53
- }, []), l = m(() => {
54
- i(), g(!0);
55
- }, [i]), p = m(() => {
56
- i(), a.current = window.setTimeout(() => {
57
- g(!1);
57
+ }, n = h(() => {
58
+ c.current && (window.clearTimeout(c.current), c.current = null);
59
+ }, []), d = h(() => {
60
+ n(), f(!0);
61
+ }, [n]), m = h(() => {
62
+ n(), c.current = window.setTimeout(() => {
63
+ f(!1);
58
64
  }, 120);
59
- }, [i]);
60
- return A(() => () => {
61
- i();
62
- }, [i]), /* @__PURE__ */ s(N, { gap: 6, p: 4, children: [
63
- /* @__PURE__ */ e(
64
- h,
65
+ }, [n]);
66
+ return R(() => () => {
67
+ n();
68
+ }, [n]), /* @__PURE__ */ a(K, { gap: 6, p: 4, children: [
69
+ o.social.whatsappEnabled && /* @__PURE__ */ e(
70
+ u,
65
71
  {
66
72
  component: "a",
67
- href: "https://wa.me/37378291264",
73
+ href: o.social.whatsapp,
68
74
  target: "_blank",
69
75
  bg: "#00C000",
70
- leftSection: /* @__PURE__ */ e(J, { width: 16, height: 16 }),
76
+ leftSection: /* @__PURE__ */ e(X, { width: 16, height: 16 }),
71
77
  c: "white",
72
78
  size: "sm",
73
79
  justify: "flex-start",
74
80
  children: t("joinWhatsApp")
75
81
  }
76
82
  ),
77
- /* @__PURE__ */ e(
78
- h,
83
+ o.social.telegramEnabled && /* @__PURE__ */ e(
84
+ u,
79
85
  {
80
86
  component: "a",
81
- href: "https://t.me/layers_app",
87
+ href: o.social.telegram,
82
88
  target: "_blank",
83
89
  bg: "blue.5",
84
- leftSection: /* @__PURE__ */ e(q, { width: 16, height: 16 }),
90
+ leftSection: /* @__PURE__ */ e(V, { width: 16, height: 16 }),
85
91
  c: "white",
86
92
  size: "sm",
87
93
  justify: "flex-start",
88
94
  children: t("joinTelegram")
89
95
  }
90
96
  ),
91
- /* @__PURE__ */ e(
92
- h,
97
+ o.social.discordEnabled && /* @__PURE__ */ e(
98
+ u,
93
99
  {
94
100
  component: "a",
95
- href: "https://discord.gg/mEd2PbchRD",
101
+ href: o.social.discord,
96
102
  target: "_blank",
97
103
  bg: "indigo.6",
98
- leftSection: /* @__PURE__ */ e(Y, { width: 16, height: 16 }),
104
+ leftSection: /* @__PURE__ */ e(Q, { width: 16, height: 16 }),
99
105
  c: "white",
100
106
  size: "sm",
101
107
  justify: "flex-start",
102
108
  children: t("joinDiscord")
103
109
  }
104
110
  ),
105
- /* @__PURE__ */ e(o.Divider, {}),
106
- /* @__PURE__ */ e(
107
- o.Item,
108
- {
109
- onClick: () => {
110
- f(), b(t("contactSalesMessage"));
111
- },
112
- leftSection: /* @__PURE__ */ e(n, { icon: R, size: 16 }),
113
- children: t("contactSales")
114
- }
115
- ),
116
- /* @__PURE__ */ e(
117
- o.Item,
118
- {
119
- onClick: f,
120
- leftSection: /* @__PURE__ */ e(n, { icon: $, size: 16 }),
121
- children: t("getSupport")
122
- }
123
- ),
124
- /* @__PURE__ */ e(o.Divider, {}),
125
- Q() && /* @__PURE__ */ s(
126
- u,
111
+ (o.social.whatsappEnabled || o.social.telegramEnabled || o.social.discordEnabled) && /* @__PURE__ */ e(i.Divider, {}),
112
+ !y.isDesktop && T && /* @__PURE__ */ a(I, { children: [
113
+ /* @__PURE__ */ e(
114
+ i.Item,
115
+ {
116
+ onClick: () => {
117
+ w(), z(t("contactSalesMessage"));
118
+ },
119
+ leftSection: /* @__PURE__ */ e(s, { icon: O, size: 16 }),
120
+ children: t("contactSales")
121
+ }
122
+ ),
123
+ /* @__PURE__ */ e(
124
+ i.Item,
125
+ {
126
+ onClick: w,
127
+ leftSection: /* @__PURE__ */ e(s, { icon: U, size: 16 }),
128
+ children: t("getSupport")
129
+ }
130
+ ),
131
+ /* @__PURE__ */ e(i.Divider, {})
132
+ ] }),
133
+ ee() && /* @__PURE__ */ a(
134
+ g,
127
135
  {
128
- opened: S,
136
+ opened: M,
129
137
  width: 200,
130
138
  position: "right-start",
131
139
  offset: 10,
132
140
  withinPortal: !0,
133
141
  shadow: "md",
134
142
  children: [
135
- /* @__PURE__ */ e(u.Target, { children: /* @__PURE__ */ e("div", { onMouseEnter: l, onMouseLeave: p, children: /* @__PURE__ */ e(
136
- o.Item,
143
+ /* @__PURE__ */ e(g.Target, { children: /* @__PURE__ */ e("div", { onMouseEnter: d, onMouseLeave: m, children: /* @__PURE__ */ e(
144
+ i.Item,
137
145
  {
138
- leftSection: /* @__PURE__ */ e(n, { icon: B, size: 16 }),
139
- rightSection: /* @__PURE__ */ e(K, { size: 14 }),
146
+ leftSection: /* @__PURE__ */ e(s, { icon: H, size: 16 }),
147
+ rightSection: /* @__PURE__ */ e(J, { size: 14 }),
140
148
  onClick: (r) => {
141
- r.preventDefault(), l();
149
+ r.preventDefault(), d();
142
150
  },
143
151
  children: t("tutorials")
144
152
  }
145
153
  ) }) }),
146
154
  /* @__PURE__ */ e(
147
- u.Dropdown,
155
+ g.Dropdown,
148
156
  {
149
157
  py: 4,
150
158
  ml: 6,
@@ -152,27 +160,27 @@ const ve = () => {
152
160
  backgroundColor: "light-dark(var(--app-shell-bg),var(--mantine-color-dark-6))",
153
161
  border: "none"
154
162
  },
155
- onMouseEnter: l,
156
- onMouseLeave: p,
163
+ onMouseEnter: d,
164
+ onMouseLeave: m,
157
165
  children: /* @__PURE__ */ e(
158
- G,
166
+ Y,
159
167
  {
160
- onClick: C,
168
+ onClick: j,
161
169
  style: {
162
170
  width: "100%",
163
171
  borderRadius: 12,
164
172
  padding: "6px 12px"
165
173
  },
166
- children: /* @__PURE__ */ s(H, { gap: 10, children: [
174
+ children: /* @__PURE__ */ a(q, { gap: 10, children: [
167
175
  /* @__PURE__ */ e(
168
- n,
176
+ s,
169
177
  {
170
- icon: E,
178
+ icon: N,
171
179
  size: 16,
172
180
  color: "var(--mantine-color-dimmed)"
173
181
  }
174
182
  ),
175
- /* @__PURE__ */ e(I, { size: "sm", c: "bright", children: t("mindMap") })
183
+ /* @__PURE__ */ e(S, { size: "sm", c: "bright", children: t("mindMap") })
176
184
  ] })
177
185
  }
178
186
  )
@@ -182,56 +190,48 @@ const ve = () => {
182
190
  }
183
191
  ),
184
192
  /* @__PURE__ */ e(
185
- o.Item,
186
- {
187
- leftSection: /* @__PURE__ */ e(n, { icon: O, size: 16 }),
188
- component: "a",
189
- href: "https://layers.md/",
190
- target: "_blank",
191
- children: t("aboutLayers")
192
- }
193
- ),
194
- /* @__PURE__ */ e(
195
- o.Item,
193
+ i.Item,
196
194
  {
197
195
  variant: "outline",
198
196
  component: "a",
199
197
  target: "_blank",
200
- href: L,
201
- leftSection: /* @__PURE__ */ e(n, { icon: U, size: 16 }),
198
+ href: F,
199
+ leftSection: /* @__PURE__ */ e(s, { icon: W, size: 16 }),
202
200
  children: t("userAgreement")
203
201
  }
204
202
  ),
205
203
  /* @__PURE__ */ e(
206
- o.Item,
204
+ i.Item,
207
205
  {
208
206
  variant: "outline",
209
207
  component: "a",
210
208
  target: "_blank",
211
- href: D,
212
- leftSection: /* @__PURE__ */ e(n, { icon: W, size: 16 }),
209
+ href: x,
210
+ leftSection: /* @__PURE__ */ e(s, { icon: G, size: 16 }),
213
211
  children: t("termsAndPrivacy")
214
212
  }
215
213
  ),
216
- /* @__PURE__ */ e(o.Divider, {}),
217
- !!w?.length && /* @__PURE__ */ s(x, { children: [
218
- /* @__PURE__ */ e(Z, { items: w }),
219
- /* @__PURE__ */ e(o.Divider, {})
214
+ /* @__PURE__ */ e(i.Divider, {}),
215
+ !!b?.length && /* @__PURE__ */ a(I, { children: [
216
+ /* @__PURE__ */ e(ie, { items: b }),
217
+ /* @__PURE__ */ e(i.Divider, {})
220
218
  ] }),
221
- /* @__PURE__ */ s(I, { size: "xs", c: "dimmed", children: [
219
+ /* @__PURE__ */ a(S, { size: "xs", c: "dimmed", children: [
222
220
  t("updated"),
223
221
  " ",
224
- z,
222
+ P,
225
223
  /* @__PURE__ */ e("br", {}),
226
- "Layers v",
227
- T,
224
+ o.name,
225
+ " v",
226
+ E,
228
227
  /* @__PURE__ */ e("br", {}),
229
228
  "© ",
230
229
  (/* @__PURE__ */ new Date()).getFullYear(),
231
- " Layers Web Application"
230
+ " ",
231
+ o.copyrightHolder
232
232
  ] })
233
233
  ] });
234
234
  };
235
235
  export {
236
- ve as HelpMenu
236
+ ze as HelpMenu
237
237
  };
@@ -1,3 +1,3 @@
1
1
  import { AppContainerActionsStore, AppContainerDataStore } from '../types';
2
- export declare const useAppContainer: ({ user, workspaceMenu, getFirstPageLink, tools, userMenuItems, notifications, isAnonym, readNotificationsFunc, publicMode, showMessenger, showNewMessage, version, updatedAt, privacyPolicyLink, userAgreementLink, whatsNewItems, navbarDisplayFormat, }: AppContainerDataStore & AppContainerActionsStore) => void;
2
+ export declare const useAppContainer: ({ user, workspaceMenu, getFirstPageLink, tools, userMenuItems, onSyncClick, syncState, notifications, isAnonym, readNotificationsFunc, publicMode, showMessenger, showNewMessage, version, updatedAt, privacyPolicyLink, userAgreementLink, whatsNewItems, navbarDisplayFormat, }: AppContainerDataStore & AppContainerActionsStore) => void;
3
3
  //# sourceMappingURL=useAppContainer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAppContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/AppContainer/hooks/useAppContainer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAI3E,eAAO,MAAM,eAAe,GAAI,2PAkB7B,qBAAqB,GAAG,wBAAwB,SA0ClD,CAAC"}
1
+ {"version":3,"file":"useAppContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/AppContainer/hooks/useAppContainer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAI3E,eAAO,MAAM,eAAe,GAAI,mRAoB7B,qBAAqB,GAAG,wBAAwB,SA8ClD,CAAC"}
@@ -1,66 +1,72 @@
1
- import { useLayoutEffect as H } from "react";
2
- import { useAppContainerActionsStore as J } from "./useAppContainerActionsStore.js";
3
- import { useAppContainerDataStore as K } from "./useAppContainerDataStore.js";
4
- const T = ({
5
- user: t,
6
- workspaceMenu: p,
7
- getFirstPageLink: S,
8
- tools: f,
9
- userMenuItems: C,
10
- notifications: m,
11
- isAnonym: o,
12
- readNotificationsFunc: x,
13
- publicMode: A,
14
- showMessenger: E,
15
- showNewMessage: j,
16
- version: q,
17
- updatedAt: r,
18
- privacyPolicyLink: z,
19
- userAgreementLink: B,
20
- whatsNewItems: D,
21
- navbarDisplayFormat: G
1
+ import { useLayoutEffect as K } from "react";
2
+ import { useAppContainerActionsStore as O } from "./useAppContainerActionsStore.js";
3
+ import { useAppContainerDataStore as Q } from "./useAppContainerDataStore.js";
4
+ const V = ({
5
+ user: p,
6
+ workspaceMenu: t,
7
+ getFirstPageLink: f,
8
+ tools: C,
9
+ userMenuItems: S,
10
+ onSyncClick: m,
11
+ syncState: x,
12
+ notifications: A,
13
+ isAnonym: E,
14
+ readNotificationsFunc: j,
15
+ publicMode: o,
16
+ showMessenger: q,
17
+ showNewMessage: r,
18
+ version: z,
19
+ updatedAt: B,
20
+ privacyPolicyLink: D,
21
+ userAgreementLink: G,
22
+ whatsNewItems: H,
23
+ navbarDisplayFormat: J
22
24
  }) => {
23
- H(() => {
24
- K.setState({
25
- user: t,
26
- workspaceMenu: p,
27
- getFirstPageLink: S,
28
- tools: f,
29
- userMenuItems: C,
30
- notifications: m,
31
- isAnonym: o,
32
- publicMode: A,
33
- showMessenger: E,
34
- showNewMessage: j,
35
- version: q,
36
- updatedAt: r,
37
- privacyPolicyLink: z,
38
- userAgreementLink: B,
39
- whatsNewItems: D,
40
- navbarDisplayFormat: G
41
- }), J.setState({
42
- readNotificationsFunc: x
25
+ K(() => {
26
+ Q.setState({
27
+ user: p,
28
+ workspaceMenu: t,
29
+ getFirstPageLink: f,
30
+ tools: C,
31
+ userMenuItems: S,
32
+ onSyncClick: m,
33
+ syncState: x,
34
+ notifications: A,
35
+ isAnonym: E,
36
+ publicMode: o,
37
+ showMessenger: q,
38
+ showNewMessage: r,
39
+ version: z,
40
+ updatedAt: B,
41
+ privacyPolicyLink: D,
42
+ userAgreementLink: G,
43
+ whatsNewItems: H,
44
+ navbarDisplayFormat: J
45
+ }), O.setState({
46
+ readNotificationsFunc: j
43
47
  });
44
48
  }, [
45
- o,
46
- m,
47
- A,
48
- x,
49
49
  E,
50
+ A,
51
+ o,
50
52
  j,
51
- f,
52
- t,
53
+ q,
54
+ r,
53
55
  C,
54
56
  p,
55
57
  S,
56
- q,
57
- r,
58
+ m,
59
+ x,
60
+ t,
61
+ f,
58
62
  z,
59
63
  B,
60
64
  D,
61
- G
65
+ G,
66
+ H,
67
+ J
62
68
  ]);
63
69
  };
64
70
  export {
65
- T as useAppContainer
71
+ V as useAppContainer
66
72
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useAppContainerDataStore.d.ts","sourceRoot":"","sources":["../../../../src/components/AppContainer/hooks/useAppContainerDataStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEjD,eAAO,MAAM,wBAAwB,oFAgClC,CAAC"}
1
+ {"version":3,"file":"useAppContainerDataStore.d.ts","sourceRoot":"","sources":["../../../../src/components/AppContainer/hooks/useAppContainerDataStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEjD,eAAO,MAAM,wBAAwB,oFAkClC,CAAC"}
@@ -32,7 +32,9 @@ const s = e(() => ({
32
32
  showMessenger: () => {
33
33
  },
34
34
  showNewMessage: () => {
35
- }
35
+ },
36
+ onSyncClick: void 0,
37
+ syncState: void 0
36
38
  }));
37
39
  export {
38
40
  s as useAppContainerDataStore
@@ -27,6 +27,7 @@ export type AppContainerProps = {
27
27
  trashMenu?: ReactNode;
28
28
  onInviteClick?: () => void;
29
29
  withBg?: boolean;
30
+ hideHeader?: boolean;
30
31
  };
31
32
  export type AppContainerDataStore = {
32
33
  tools: ToolDef[];
@@ -47,6 +48,8 @@ export type AppContainerDataStore = {
47
48
  userAgreementLink: string;
48
49
  whatsNewItems: WhatsNewProps['items'];
49
50
  navbarDisplayFormat: 'iconsAndLabels' | 'iconsOnly';
51
+ onSyncClick?: () => void;
52
+ syncState?: 'SYNCED' | 'SYNCING' | 'OFFLINE' | 'ERROR' | string;
50
53
  };
51
54
  type ReadNotificationsRequest = {
52
55
  messageIds: number[];
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/AppContainer/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACp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AE,CAAC;IACtB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import { PropsWithChildren } from 'react';
2
- interface ColorPickerPopoverProps {
2
+ import { PopoverProps } from '@mantine/core';
3
+ type ColorPickerPopoverProps = {
3
4
  value?: string;
4
5
  onChange?: (v: string) => void;
5
- defaultOpened?: boolean;
6
- size?: number;
7
- radius?: number;
8
- }
9
- export declare const ColorPickerPopover: ({ value, onChange, defaultOpened, size, radius, children, }: PropsWithChildren<ColorPickerPopoverProps>) => import("react/jsx-runtime").JSX.Element;
6
+ opened?: boolean;
7
+ setOpened?: (opened: boolean) => void;
8
+ } & Pick<PopoverProps, 'withinPortal' | 'floatingStrategy'>;
9
+ export declare const ColorPickerPopover: ({ value, onChange, opened, setOpened, children, withinPortal, floatingStrategy, }: PropsWithChildren<ColorPickerPopoverProps>) => import("react/jsx-runtime").JSX.Element;
10
10
  export {};
11
11
  //# sourceMappingURL=ColorPickerPopover.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColorPickerPopover.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/ColorPickerPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAMpD,UAAU,uBAAuB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,kBAAkB,GAAI,6DAOhC,iBAAiB,CAAC,uBAAuB,CAAC,4CAgC5C,CAAC"}
1
+ {"version":3,"file":"ColorPickerPopover.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/ColorPickerPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAQ,YAAY,EAAE,MAAM,eAAe,CAAC;AAInD,KAAK,uBAAuB,GAAG;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CACvC,GAAG,IAAI,CAAC,YAAY,EAAE,cAAc,GAAG,kBAAkB,CAAC,CAAC;AAE5D,eAAO,MAAM,kBAAkB,GAAI,mFAQhC,iBAAiB,CAAC,uBAAuB,CAAC,4CA0B5C,CAAC"}
@@ -1,42 +1,40 @@
1
- import { jsxs as f, jsx as o } from "react/jsx-runtime";
2
- import { useState as h } from "react";
3
- import { Popover as t } from "@mantine/core";
4
- import { ColorPicker as n } from "./ColorPicker.js";
5
- const w = ({
6
- value: r,
7
- onChange: i,
8
- defaultOpened: c,
9
- size: l = 18,
10
- radius: d,
11
- children: p
1
+ import { jsxs as l, jsx as o } from "react/jsx-runtime";
2
+ import { useTranslation as a } from "react-i18next";
3
+ import { Menu as r } from "@mantine/core";
4
+ import { ColorPicker as d } from "./ColorPicker.js";
5
+ const x = ({
6
+ value: i,
7
+ onChange: t,
8
+ opened: c,
9
+ setOpened: e,
10
+ children: n,
11
+ withinPortal: m,
12
+ floatingStrategy: p
12
13
  }) => {
13
- const [s, e] = h(c);
14
- return /* @__PURE__ */ f(
15
- t,
14
+ const { t: s } = a("ui");
15
+ return /* @__PURE__ */ l(
16
+ r,
16
17
  {
17
- opened: s,
18
+ opened: c,
18
19
  onChange: e,
19
20
  position: "bottom-start",
20
- withArrow: !0,
21
+ withinPortal: m,
22
+ floatingStrategy: p,
21
23
  children: [
22
- /* @__PURE__ */ o(t.Target, { children: /* @__PURE__ */ o("div", { onClick: () => e((m) => !m), style: { cursor: "pointer" }, children: p || /* @__PURE__ */ o(
23
- n.ColorCircle,
24
- {
25
- value: r,
26
- size: l,
27
- radius: d
28
- }
29
- ) }) }),
30
- /* @__PURE__ */ o(t.Dropdown, { maw: 270, children: /* @__PURE__ */ o("div", { onClick: () => e(!1), children: /* @__PURE__ */ o(
31
- n,
32
- {
33
- ...i ? { value: r, onChange: i } : { defaultValue: r ?? void 0 }
34
- }
35
- ) }) })
24
+ /* @__PURE__ */ o(r.Target, { children: n }),
25
+ /* @__PURE__ */ l(r.Dropdown, { children: [
26
+ /* @__PURE__ */ o(r.Label, { px: 4, py: 0, mih: 17, mb: 6, children: s("colorPicker.color") }),
27
+ /* @__PURE__ */ o("div", { onClick: () => e?.(!1), children: /* @__PURE__ */ o(
28
+ d,
29
+ {
30
+ ...t ? { value: i, onChange: t } : { defaultValue: i ?? void 0 }
31
+ }
32
+ ) })
33
+ ] })
36
34
  ]
37
35
  }
38
36
  );
39
37
  };
40
38
  export {
41
- w as ColorPickerPopover
39
+ x as ColorPickerPopover
42
40
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CommentComposer/index.tsx"],"names":[],"mappings":"AA2BA,OAAO,EAAE,oBAAoB,EAAwB,MAAM,SAAS,CAAC;AA0CrE,eAAO,MAAM,eAAe,GAAI,4EAQ7B,oBAAoB,4CAoctB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CommentComposer/index.tsx"],"names":[],"mappings":"AA4BA,OAAO,EAAE,oBAAoB,EAAwB,MAAM,SAAS,CAAC;AA0CrE,eAAO,MAAM,eAAe,GAAI,4EAQ7B,oBAAoB,4CAuctB,CAAC"}