@layers-app/shared 0.4.3 → 0.4.5

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/components/AppContainer/components/SidebarToggleButton.d.ts.map +1 -1
  2. package/dist/components/AppContainer/components/SidebarToggleButton.js +25 -16
  3. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
  4. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +33 -33
  5. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
  6. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.js +54 -36
  7. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
  8. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts +2 -0
  9. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map +1 -1
  10. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.js +82 -41
  11. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
  12. package/dist/components/AttachmentsPreview/AttachmentsPreview.js +11 -12
  13. package/dist/components/Chat/CallMessage/CallMessage.module.css.js +15 -0
  14. package/dist/components/Chat/CallMessage/index.d.ts +21 -0
  15. package/dist/components/Chat/CallMessage/index.d.ts.map +1 -0
  16. package/dist/components/Chat/CallMessage/index.js +49 -0
  17. package/dist/components/Chat/ChatBubble/ChatBubble.module.css.js +9 -0
  18. package/dist/components/Chat/ChatBubble/index.d.ts +14 -0
  19. package/dist/components/Chat/ChatBubble/index.d.ts.map +1 -0
  20. package/dist/components/Chat/ChatBubble/index.js +32 -0
  21. package/dist/components/Chat/ChatHeader/ChatHeader.module.css.js +17 -0
  22. package/dist/components/Chat/ChatHeader/index.d.ts +42 -0
  23. package/dist/components/Chat/ChatHeader/index.d.ts.map +1 -0
  24. package/dist/components/Chat/ChatHeader/index.js +78 -0
  25. package/dist/components/Chat/ChatInput/ChatInput.module.css.js +37 -0
  26. package/dist/components/Chat/ChatInput/index.d.ts +46 -0
  27. package/dist/components/Chat/ChatInput/index.d.ts.map +1 -0
  28. package/dist/components/Chat/ChatInput/index.js +228 -0
  29. package/dist/components/Chat/ChatLayout/ChatLayout.module.css.js +15 -0
  30. package/dist/components/Chat/ChatLayout/index.d.ts +17 -0
  31. package/dist/components/Chat/ChatLayout/index.d.ts.map +1 -0
  32. package/dist/components/Chat/ChatLayout/index.js +43 -0
  33. package/dist/components/Chat/ChatMessage/ChatMessage.module.css.js +21 -0
  34. package/dist/components/Chat/ChatMessage/index.d.ts +45 -0
  35. package/dist/components/Chat/ChatMessage/index.d.ts.map +1 -0
  36. package/dist/components/Chat/ChatMessage/index.js +188 -0
  37. package/dist/components/Chat/ChatPill/ChatPill.module.css.js +11 -0
  38. package/dist/components/Chat/ChatPill/index.d.ts +12 -0
  39. package/dist/components/Chat/ChatPill/index.d.ts.map +1 -0
  40. package/dist/components/Chat/ChatPill/index.js +21 -0
  41. package/dist/components/Chat/DayMeta/index.d.ts +11 -0
  42. package/dist/components/Chat/DayMeta/index.d.ts.map +1 -0
  43. package/dist/components/Chat/DayMeta/index.js +9 -0
  44. package/dist/components/Chat/DialogItem/DialogItem.module.css.js +17 -0
  45. package/dist/components/Chat/DialogItem/index.d.ts +41 -0
  46. package/dist/components/Chat/DialogItem/index.d.ts.map +1 -0
  47. package/dist/components/Chat/DialogItem/index.js +107 -0
  48. package/dist/components/Chat/DialogList/DialogList.module.css.js +7 -0
  49. package/dist/components/Chat/DialogList/index.d.ts +11 -0
  50. package/dist/components/Chat/DialogList/index.d.ts.map +1 -0
  51. package/dist/components/Chat/DialogList/index.js +19 -0
  52. package/dist/components/Chat/MediaDocument/MediaDocument.module.css.js +13 -0
  53. package/dist/components/Chat/MediaDocument/index.d.ts +15 -0
  54. package/dist/components/Chat/MediaDocument/index.d.ts.map +1 -0
  55. package/dist/components/Chat/MediaDocument/index.js +73 -0
  56. package/dist/components/Chat/MessageActions/MessageActions.module.css.js +7 -0
  57. package/dist/components/Chat/MessageActions/index.d.ts +16 -0
  58. package/dist/components/Chat/MessageActions/index.d.ts.map +1 -0
  59. package/dist/components/Chat/MessageActions/index.js +65 -0
  60. package/dist/components/Chat/MessageAuthor/index.d.ts +20 -0
  61. package/dist/components/Chat/MessageAuthor/index.d.ts.map +1 -0
  62. package/dist/components/Chat/MessageAuthor/index.js +36 -0
  63. package/dist/components/Chat/MessageForward/MessageForward.module.css.js +7 -0
  64. package/dist/components/Chat/MessageForward/index.d.ts +13 -0
  65. package/dist/components/Chat/MessageForward/index.d.ts.map +1 -0
  66. package/dist/components/Chat/MessageForward/index.js +30 -0
  67. package/dist/components/Chat/MessageList/MessageList.module.css.js +17 -0
  68. package/dist/components/Chat/MessageList/index.d.ts +12 -0
  69. package/dist/components/Chat/MessageList/index.d.ts.map +1 -0
  70. package/dist/components/Chat/MessageList/index.js +71 -0
  71. package/dist/components/Chat/MessageMeta/MessageMeta.module.css.js +13 -0
  72. package/dist/components/Chat/MessageMeta/index.d.ts +16 -0
  73. package/dist/components/Chat/MessageMeta/index.d.ts.map +1 -0
  74. package/dist/components/Chat/MessageMeta/index.js +33 -0
  75. package/dist/components/Chat/MessageReactions/MessageReactions.module.css.js +15 -0
  76. package/dist/components/Chat/MessageReactions/index.d.ts +15 -0
  77. package/dist/components/Chat/MessageReactions/index.d.ts.map +1 -0
  78. package/dist/components/Chat/MessageReactions/index.js +40 -0
  79. package/dist/components/Chat/MessageReply/MessageReply.module.css.js +15 -0
  80. package/dist/components/Chat/MessageReply/index.d.ts +15 -0
  81. package/dist/components/Chat/MessageReply/index.d.ts.map +1 -0
  82. package/dist/components/Chat/MessageReply/index.js +40 -0
  83. package/dist/components/Chat/MessageStatus/MessageStatus.module.css.js +9 -0
  84. package/dist/components/Chat/MessageStatus/index.d.ts +14 -0
  85. package/dist/components/Chat/MessageStatus/index.d.ts.map +1 -0
  86. package/dist/components/Chat/MessageStatus/index.js +53 -0
  87. package/dist/components/Chat/ServiceMessage/ServiceMessage.module.css.js +11 -0
  88. package/dist/components/Chat/ServiceMessage/index.d.ts +13 -0
  89. package/dist/components/Chat/ServiceMessage/index.d.ts.map +1 -0
  90. package/dist/components/Chat/ServiceMessage/index.js +21 -0
  91. package/dist/components/Chat/UnreadSeparator/index.d.ts +11 -0
  92. package/dist/components/Chat/UnreadSeparator/index.d.ts.map +1 -0
  93. package/dist/components/Chat/UnreadSeparator/index.js +13 -0
  94. package/dist/components/Chat/colors.d.ts +7 -0
  95. package/dist/components/Chat/colors.d.ts.map +1 -0
  96. package/dist/components/Chat/colors.js +30 -0
  97. package/dist/components/Chat/icons.d.ts +9 -0
  98. package/dist/components/Chat/icons.d.ts.map +1 -0
  99. package/dist/components/Chat/icons.js +49 -0
  100. package/dist/components/Chat/index.d.ts +24 -0
  101. package/dist/components/Chat/index.d.ts.map +1 -0
  102. package/dist/components/Chat/mock-data.d.ts +32 -0
  103. package/dist/components/Chat/mock-data.d.ts.map +1 -0
  104. package/dist/components/Chat/types.d.ts +159 -0
  105. package/dist/components/Chat/types.d.ts.map +1 -0
  106. package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
  107. package/dist/components/CommentComposer/index.d.ts.map +1 -1
  108. package/dist/components/CommentComposer/index.js +53 -54
  109. package/dist/components/CommentComposer/types.js +9 -0
  110. package/dist/components/EmojiPicker/EmojiPicker.d.ts +8 -1
  111. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  112. package/dist/components/EmojiPicker/EmojiPicker.js +53 -50
  113. package/dist/components/EntityIcon.d.ts.map +1 -1
  114. package/dist/components/EntityIcon.js +36 -27
  115. package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
  116. package/dist/components/FilePicker/FilePicker.js +135 -161
  117. package/dist/components/FilePicker/FilePicker.module.css.js +8 -12
  118. package/dist/components/FilePicker/FilePickerGallery.js +13 -13
  119. package/dist/components/FilePicker/FilePickerGiphy.js +4 -4
  120. package/dist/components/FilePicker/FilePickerGoogleDrive.js +3 -3
  121. package/dist/components/FilePicker/FilePickerUnsplash.js +18 -18
  122. package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
  123. package/dist/components/FilePicker/FilePickerUpload.js +55 -47
  124. package/dist/components/MusicPlayerBar/MusicPlayerBar.module.css.js +42 -42
  125. package/dist/components/MusicPlayerBar/components/VolumePopover.d.ts.map +1 -1
  126. package/dist/components/MusicPlayerBar/components/VolumePopover.js +22 -20
  127. package/dist/components/PillTabs/PillTabs.d.ts +19 -0
  128. package/dist/components/PillTabs/PillTabs.d.ts.map +1 -0
  129. package/dist/components/PillTabs/PillTabs.js +50 -0
  130. package/dist/components/PillTabs/PillTabs.module.css.js +11 -0
  131. package/dist/components/modals/RemoveConfirmModal.js +1 -1
  132. package/dist/hooks/useOfficePreviewAvailable.d.ts +2 -0
  133. package/dist/hooks/useOfficePreviewAvailable.d.ts.map +1 -0
  134. package/dist/hooks/useOfficePreviewAvailable.js +20 -0
  135. package/dist/index.css +1 -1
  136. package/dist/index.d.ts +4 -0
  137. package/dist/index.d.ts.map +1 -1
  138. package/dist/index.js +573 -520
  139. package/dist/lang/locales/ui_en.json.js +5 -5
  140. package/dist/lang/locales/ui_es.json.js +1 -1
  141. package/dist/lang/locales/ui_ru.json.js +1 -1
  142. package/package.json +6 -3
@@ -1,5 +1,5 @@
1
1
  import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
- import { useState as l, useMemo as x, useEffect as f, useCallback as I } from "react";
2
+ import { useState as l, useMemo as y, useEffect as f, useCallback as I } from "react";
3
3
  import { useTranslation as S } from "react-i18next";
4
4
  import { Search01Icon as P } from "@hugeicons/core-free-icons";
5
5
  import { HugeiconsIcon as T } from "@hugeicons/react";
@@ -15,7 +15,7 @@ const k = (c) => (c || []).reduce((o, i) => (o[i.id] = i, o), {}), U = ({
15
15
  const { t: o } = S("ui"), [i, v] = l(""), [m] = F(i, 800), [u, p] = l(1), [d, h] = l({}), { data: r, isLoading: s } = N(
16
16
  { q: m, limit: 24, offset: (u - 1) * 24 + 1 },
17
17
  u
18
- ), a = x(
18
+ ), a = y(
19
19
  () => Object.values({ ...d, ...k(r?.items) }),
20
20
  [d, r?.items]
21
21
  ), g = M(() => {
@@ -28,7 +28,7 @@ const k = (c) => (c || []).reduce((o, i) => (o[i.id] = i, o), {}), U = ({
28
28
  }, [r?.items, g]), f(() => {
29
29
  h({});
30
30
  }, [m]);
31
- const y = I(
31
+ const x = I(
32
32
  (t) => {
33
33
  v(t.currentTarget.value), p(1);
34
34
  },
@@ -43,7 +43,7 @@ const k = (c) => (c || []).reduce((o, i) => (o[i.id] = i, o), {}), U = ({
43
43
  placeholder: o("changeCover.searchGifs"),
44
44
  "data-autofocus": !0,
45
45
  value: i,
46
- onChange: y
46
+ onChange: x
47
47
  }
48
48
  ) }),
49
49
  /* @__PURE__ */ n(C, { mah: 300, w: "100%", style: { overflowY: "auto" }, children: [
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
- import { useState as C, useRef as D, useEffect as y, useCallback as I } from "react";
2
+ import { useState as C, useRef as D, useEffect as I, useCallback as y } from "react";
3
3
  import { useTranslation as T } from "react-i18next";
4
4
  import { Search01Icon as G } from "@hugeicons/core-free-icons";
5
5
  import { HugeiconsIcon as R } from "@hugeicons/react";
@@ -20,10 +20,10 @@ const O = ({
20
20
  error: s
21
21
  }) => {
22
22
  const { t } = T("ui"), [m, S] = C(""), [u] = j(m, 800), d = D(c);
23
- d.current = c, y(() => {
23
+ d.current = c, I(() => {
24
24
  d.current(u);
25
25
  }, [u]);
26
- const z = I(
26
+ const z = y(
27
27
  (r) => {
28
28
  S(r.currentTarget.value);
29
29
  },
@@ -9,22 +9,22 @@ import { NoData as A } from "../NoData/NoData.js";
9
9
  import { FilePickerSkeletonLoader as Q } from "./FilePickerSkeletonLoader.js";
10
10
  import { useUnsplashPhotos as R } from "./api/unsplashApi.js";
11
11
  import b from "./FilePicker.module.css.js";
12
- const y = (l) => (l || []).reduce((r, o) => (r[o.id] = o, r), {}), X = ({
12
+ const v = (l) => (l || []).reduce((t, o) => (t[o.id] = o, t), {}), X = ({
13
13
  onChange: l
14
14
  }) => {
15
- const { t: r } = z("ui"), [o, v] = m(""), [u] = q(o, 800), [x, h] = m(1), [p, d] = m({}), { data: a, isLoading: n } = R(
15
+ const { t } = z("ui"), [o, x] = m(""), [u] = q(o, 800), [y, h] = m(1), [p, d] = m({}), { data: a, isLoading: n } = R(
16
16
  {
17
17
  query: u,
18
- page: x,
18
+ page: y,
19
19
  per_page: 24,
20
20
  order_by: "popular"
21
21
  }
22
22
  ), i = P(
23
- () => Object.values({ ...p, ...y(a?.items) }),
23
+ () => Object.values({ ...p, ...v(a?.items) }),
24
24
  [p, a?.items]
25
25
  ), g = w(() => {
26
26
  setTimeout(() => {
27
- d((t) => ({ ...t, ...y(a?.items) }));
27
+ d((r) => ({ ...r, ...v(a?.items) }));
28
28
  }, 0);
29
29
  }, 100);
30
30
  f(() => {
@@ -33,8 +33,8 @@ const y = (l) => (l || []).reduce((r, o) => (r[o.id] = o, r), {}), X = ({
33
33
  d({});
34
34
  }, [u]);
35
35
  const I = T(
36
- (t) => {
37
- v(t.currentTarget.value), h(1);
36
+ (r) => {
37
+ x(r.currentTarget.value), h(1);
38
38
  },
39
39
  []
40
40
  );
@@ -44,7 +44,7 @@ const y = (l) => (l || []).reduce((r, o) => (r[o.id] = o, r), {}), X = ({
44
44
  {
45
45
  leftSection: n ? /* @__PURE__ */ e(F, { size: 16 }) : /* @__PURE__ */ e(j, { size: 16, icon: L }),
46
46
  maxLength: 50,
47
- placeholder: r("changeCover.searchImage"),
47
+ placeholder: t("changeCover.searchImage"),
48
48
  "data-autofocus": !0,
49
49
  value: o,
50
50
  onChange: I
@@ -52,42 +52,42 @@ const y = (l) => (l || []).reduce((r, o) => (r[o.id] = o, r), {}), X = ({
52
52
  ) }),
53
53
  /* @__PURE__ */ s(c, { mah: 300, w: "100%", style: { overflowY: "auto" }, children: [
54
54
  !!i.length && /* @__PURE__ */ s(k, { gap: 8, children: [
55
- /* @__PURE__ */ e(M, { cols: 4, spacing: 10, children: i.map((t) => /* @__PURE__ */ s(c, { children: [
55
+ /* @__PURE__ */ e(M, { cols: 4, spacing: 10, children: i.map((r) => /* @__PURE__ */ s(c, { children: [
56
56
  /* @__PURE__ */ e(
57
57
  N,
58
58
  {
59
- onClick: () => l?.(t.urls.regular),
59
+ onClick: () => l?.(r.urls.regular),
60
60
  ratio: 120 / 65,
61
61
  className: b.itemImage,
62
62
  style: {
63
- backgroundImage: `url(${t.urls.small})`
63
+ backgroundImage: `url(${r.urls.small})`
64
64
  }
65
65
  }
66
66
  ),
67
67
  /* @__PURE__ */ e(c, { className: b.imageAuthor, children: /* @__PURE__ */ s(C, { truncate: !0, c: "gray", size: "xs", children: [
68
- r("changeCover.photoBy"),
68
+ t("changeCover.photoBy"),
69
69
  " ",
70
70
  /* @__PURE__ */ e(
71
71
  C,
72
72
  {
73
73
  component: "a",
74
74
  inherit: !0,
75
- href: t.user.links.html,
75
+ href: r.user.links.html,
76
76
  target: "_blank",
77
77
  rel: "noopener noreferrer",
78
78
  onClick: (S) => S.stopPropagation(),
79
- children: t.user.name
79
+ children: r.user.name
80
80
  }
81
81
  )
82
82
  ] }) })
83
- ] }, t.id)) }),
83
+ ] }, r.id)) }),
84
84
  a?.hasMore && /* @__PURE__ */ e(
85
85
  _,
86
86
  {
87
87
  variant: "subtle",
88
88
  loading: n,
89
- onClick: () => h((t) => t + 1),
90
- children: r("loadMore")
89
+ onClick: () => h((r) => r + 1),
90
+ children: t("loadMore")
91
91
  }
92
92
  )
93
93
  ] }),
@@ -96,7 +96,7 @@ const y = (l) => (l || []).reduce((r, o) => (r[o.id] = o, r), {}), X = ({
96
96
  {
97
97
  size: 120,
98
98
  illustration: "noImage",
99
- description: r("changeCover.noResult"),
99
+ description: t("changeCover.noResult"),
100
100
  titleProps: { size: "xs", c: "dimmed" }
101
101
  }
102
102
  ) }),
@@ -1 +1 @@
1
- {"version":3,"file":"FilePickerUpload.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerUpload.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEtE,OAAO,EAEL,aAAa,EAEb,YAAY,EAEb,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGnC,OAAO,8BAA8B,CAAC;AAEtC,eAAO,MAAM,gBAAgB,GAAI,qDAM9B;IACD,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IAC9C,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IAC1C,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,4CA6GA,CAAC"}
1
+ {"version":3,"file":"FilePickerUpload.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerUpload.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEtE,OAAO,EAEL,aAAa,EAEb,YAAY,EAEb,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGnC,OAAO,8BAA8B,CAAC;AAEtC,eAAO,MAAM,gBAAgB,GAAI,qDAM9B;IACD,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IAC9C,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;IAC1C,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,4CAuHA,CAAC"}
@@ -1,70 +1,76 @@
1
1
  import { jsx as o, jsxs as p } from "react/jsx-runtime";
2
- import { useCallback as d } from "react";
3
- import { useTranslation as k, Trans as v } from "react-i18next";
4
- import { Image02Icon as I } from "@hugeicons/core-free-icons";
5
- import { HugeiconsIcon as E } from "@hugeicons/react";
6
- import { Stack as x, Text as s } from "@mantine/core";
7
- import { Dropzone as N, IMAGE_MIME_TYPE as T } from "@mantine/dropzone";
8
- import { showNotification as h } from "@mantine/notifications";
9
- import { getMaxUploadSize as g } from "../../config/envConfig.js";
10
- import { showErrorNotification as b } from "../../helpers/showNotifications.js";
11
- import j from "./FilePicker.module.css.js";
2
+ import { useCallback as x } from "react";
3
+ import { useTranslation as b, Trans as N } from "react-i18next";
4
+ import { Image02Icon as E } from "@hugeicons/core-free-icons";
5
+ import { HugeiconsIcon as I } from "@hugeicons/react";
6
+ import { Stack as u, Text as a } from "@mantine/core";
7
+ import { Dropzone as T, IMAGE_MIME_TYPE as $ } from "@mantine/dropzone";
8
+ import { showNotification as g } from "@mantine/notifications";
9
+ import { getMaxUploadSize as h } from "../../config/envConfig.js";
10
+ import { showErrorNotification as j } from "../../helpers/showNotifications.js";
11
+ import w from "./FilePicker.module.css.js";
12
12
  import "@mantine/dropzone/styles.css";
13
13
  const q = ({
14
- type: a = "image",
15
- uploading: u,
14
+ type: c = "image",
15
+ uploading: y,
16
16
  dropZoneProps: i,
17
- onUpload: c,
18
- icon: y
17
+ onUpload: m,
18
+ icon: z
19
19
  }) => {
20
- const { t: e } = k("ui"), l = i?.maxSize != null ? Math.round(i.maxSize / (1024 * 1024)) : Math.round((g() ?? 5 * 1024 * 1024) / (1024 * 1024)), m = `filePicker.description.${a}`, z = `filePicker.dropFileHere.${a}`, f = (() => {
21
- const r = e(m, { maxSize: l });
22
- return r !== m ? r : null;
23
- })(), M = d(
24
- (r) => {
25
- if (r.filter(
20
+ const { t: r } = b("ui"), s = i?.maxSize != null ? Math.round(i.maxSize / (1024 * 1024)) : Math.round((h() ?? 5 * 1024 * 1024) / (1024 * 1024)), S = (e) => {
21
+ if (e >= 1024) {
22
+ const l = e / 1024;
23
+ return Number.isInteger(l) ? `${l} GB` : `${l.toFixed(1)} GB`;
24
+ }
25
+ return `${e} MB`;
26
+ }, f = `filePicker.description.${c}`, F = `filePicker.dropFileHere.${c}`, d = (() => {
27
+ const e = r(f, { maxSize: S(s) });
28
+ return e !== f ? e : null;
29
+ })(), M = x(
30
+ (e) => {
31
+ if (e.filter(
26
32
  (t) => t.errors.some((n) => n.code === "file-invalid-type")
27
33
  ).length > 0) {
28
- h({
34
+ g({
29
35
  color: "blue",
30
- message: e("filePicker.errors.typeIsNotAllowed")
36
+ message: r("filePicker.errors.typeIsNotAllowed")
31
37
  });
32
38
  return;
33
39
  }
34
- if (r.some((t) => t.errors.some((n) => n.code === "file-too-large"))) {
35
- b({
36
- title: e("errorMessage"),
37
- message: e("filePicker.errors.shouldNotExceed", { maxSize: l })
40
+ if (e.some((t) => t.errors.some((n) => n.code === "file-too-large"))) {
41
+ j({
42
+ title: r("errorMessage"),
43
+ message: r("filePicker.errors.shouldNotExceed", { maxSize: s })
38
44
  });
39
45
  return;
40
46
  }
41
- if (r.filter(
47
+ if (e.filter(
42
48
  (t) => t.errors.some((n) => n.code === "too-many-files")
43
49
  ).length > 0) {
44
- h({
50
+ g({
45
51
  color: "blue",
46
- message: e("filePicker.errors.doNotUploadMoreThanSingleFile")
52
+ message: r("filePicker.errors.doNotUploadMoreThanSingleFile")
47
53
  });
48
54
  return;
49
55
  }
50
56
  },
51
- [e, l]
52
- ), S = d(c, [c]), F = i?.maxSize ?? g() ?? 5 * 1024 * 1024;
57
+ [r, s]
58
+ ), k = x(m, [m]), v = i?.maxSize ?? h() ?? 5 * 1024 * 1024;
53
59
  return /* @__PURE__ */ o(
54
- N,
60
+ T,
55
61
  {
56
- loading: u,
57
- onDrop: S,
62
+ loading: y,
63
+ onDrop: k,
58
64
  onReject: M,
59
65
  maxFiles: i?.maxFiles || 1,
60
- maxSize: F,
61
- accept: T,
66
+ maxSize: v,
67
+ accept: $,
62
68
  px: 60,
63
69
  py: "xl",
64
- className: `${j.pickerDropZone}`,
70
+ className: `${w.pickerDropZone}`,
65
71
  ...i || {},
66
72
  children: /* @__PURE__ */ p(
67
- x,
73
+ u,
68
74
  {
69
75
  justify: "center",
70
76
  gap: "var(--mantine-font-size-xs",
@@ -73,31 +79,33 @@ const q = ({
73
79
  style: { pointerEvents: "none" },
74
80
  children: [
75
81
  /* @__PURE__ */ o(
76
- E,
82
+ I,
77
83
  {
78
84
  size: 32,
79
85
  color: "var(--mantine-color-bright)",
80
- icon: y ?? I
86
+ icon: z ?? E
81
87
  }
82
88
  ),
83
- /* @__PURE__ */ p(x, { gap: 8, align: "center", children: [
84
- /* @__PURE__ */ o(s, { fw: 500, fz: "sm", c: "bright", lh: "sm", ta: "center", children: /* @__PURE__ */ o(
85
- v,
89
+ /* @__PURE__ */ p(u, { gap: 8, align: "center", children: [
90
+ /* @__PURE__ */ o(a, { fw: 500, fz: "md", c: "bright", lh: "md", ta: "center", children: /* @__PURE__ */ o(
91
+ N,
86
92
  {
87
93
  ns: "ui",
88
- i18nKey: z,
94
+ i18nKey: F,
89
95
  components: {
90
96
  choose: /* @__PURE__ */ o(
91
- s,
97
+ a,
92
98
  {
93
99
  component: "span",
94
- c: "var(--primary-color-text, var(--mantine-primary-color-filled))"
100
+ c: "var(--primary-color-text, var(--mantine-primary-color-filled))",
101
+ td: "underline",
102
+ style: { textUnderlineOffset: "3px" }
95
103
  }
96
104
  )
97
105
  }
98
106
  }
99
107
  ) }),
100
- f && /* @__PURE__ */ o(s, { fz: "xs", fw: 400, lh: "140%", c: "dimmed", ta: "center", children: f })
108
+ d && /* @__PURE__ */ o(a, { fz: "sm", fw: 400, lh: "140%", c: "dimmed", ta: "center", children: d })
101
109
  ] })
102
110
  ]
103
111
  }
@@ -1,49 +1,49 @@
1
- const e = "_bar_1vkxh_1", t = "_waveformClip_1vkxh_34", o = "_waveform_1vkxh_34", _ = "_tailRail_1vkxh_53", s = "_tail_1vkxh_53", n = "_tailSpacer_1vkxh_69", v = "_hoverActions_1vkxh_88", i = "_stem_1vkxh_119", c = "_stemActive_1vkxh_126", p = "_stemInactive_1vkxh_131", r = "_playBtn_1vkxh_136", a = "_timer_1vkxh_141", h = "_speedTrigger_1vkxh_146", l = "_speedChip_1vkxh_163", d = "_speedChipActive_1vkxh_183", m = "_speedLabel_1vkxh_191", x = "_volumeDropdown_1vkxh_197", k = "_volumeSlider_1vkxh_205", w = "_speedDropdown_1vkxh_228", A = "_ghostDropdown_1vkxh_240", g = "_hoverActionItem_1vkxh_248", C = "_actionIconBtn_1vkxh_261", D = {
2
- bar: e,
3
- waveformClip: t,
4
- waveform: o,
5
- tailRail: _,
6
- tail: s,
1
+ const o = "_bar_10qoi_1", e = "_waveformClip_10qoi_63", t = "_waveform_10qoi_63", i = "_tailRail_10qoi_101", _ = "_tail_10qoi_101", n = "_tailSpacer_10qoi_133", s = "_hoverActions_10qoi_161", c = "_stem_10qoi_223", p = "_stemActive_10qoi_237", r = "_stemInactive_10qoi_247", a = "_playBtn_10qoi_257", l = "_timer_10qoi_267", v = "_speedTrigger_10qoi_277", m = "_speedChip_10qoi_311", d = "_speedChipActive_10qoi_351", q = "_speedLabel_10qoi_367", w = "_volumeDropdown_10qoi_379", h = "_volumePopoverDropdown_10qoi_395", A = "_volumeSlider_10qoi_403", u = "_speedDropdown_10qoi_449", C = "_hoverActionItem_10qoi_489", D = "_actionIconBtn_10qoi_515", I = {
2
+ bar: o,
3
+ waveformClip: e,
4
+ waveform: t,
5
+ tailRail: i,
6
+ tail: _,
7
7
  tailSpacer: n,
8
- hoverActions: v,
9
- stem: i,
10
- stemActive: c,
11
- stemInactive: p,
12
- playBtn: r,
13
- timer: a,
14
- speedTrigger: h,
15
- speedChip: l,
8
+ hoverActions: s,
9
+ stem: c,
10
+ stemActive: p,
11
+ stemInactive: r,
12
+ playBtn: a,
13
+ timer: l,
14
+ speedTrigger: v,
15
+ speedChip: m,
16
16
  speedChipActive: d,
17
- speedLabel: m,
18
- volumeDropdown: x,
19
- volumeSlider: k,
20
- speedDropdown: w,
21
- ghostDropdown: A,
22
- hoverActionItem: g,
23
- actionIconBtn: C
17
+ speedLabel: q,
18
+ volumeDropdown: w,
19
+ volumePopoverDropdown: h,
20
+ volumeSlider: A,
21
+ speedDropdown: u,
22
+ hoverActionItem: C,
23
+ actionIconBtn: D
24
24
  };
25
25
  export {
26
- C as actionIconBtn,
27
- e as bar,
28
- D as default,
29
- A as ghostDropdown,
30
- g as hoverActionItem,
31
- v as hoverActions,
32
- r as playBtn,
33
- l as speedChip,
26
+ D as actionIconBtn,
27
+ o as bar,
28
+ I as default,
29
+ C as hoverActionItem,
30
+ s as hoverActions,
31
+ a as playBtn,
32
+ m as speedChip,
34
33
  d as speedChipActive,
35
- w as speedDropdown,
36
- m as speedLabel,
37
- h as speedTrigger,
38
- i as stem,
39
- c as stemActive,
40
- p as stemInactive,
41
- s as tail,
42
- _ as tailRail,
34
+ u as speedDropdown,
35
+ q as speedLabel,
36
+ v as speedTrigger,
37
+ c as stem,
38
+ p as stemActive,
39
+ r as stemInactive,
40
+ _ as tail,
41
+ i as tailRail,
43
42
  n as tailSpacer,
44
- a as timer,
45
- x as volumeDropdown,
46
- k as volumeSlider,
47
- o as waveform,
48
- t as waveformClip
43
+ l as timer,
44
+ w as volumeDropdown,
45
+ h as volumePopoverDropdown,
46
+ A as volumeSlider,
47
+ t as waveform,
48
+ e as waveformClip
49
49
  };
@@ -1 +1 @@
1
- {"version":3,"file":"VolumePopover.d.ts","sourceRoot":"","sources":["../../../../src/components/MusicPlayerBar/components/VolumePopover.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAI7D,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,MAAM,EACN,KAAK,EACL,aAAa,EACb,SAAS,EACT,WAAW,EACX,WAAW,EACX,YAAY,EACZ,cAAc,GACf,EAAE,KAAK,2CAiEP"}
1
+ {"version":3,"file":"VolumePopover.d.ts","sourceRoot":"","sources":["../../../../src/components/MusicPlayerBar/components/VolumePopover.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAI7D,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,MAAM,EACN,KAAK,EACL,aAAa,EACb,SAAS,EACT,WAAW,EACX,WAAW,EACX,YAAY,EACZ,cAAc,GACf,EAAE,KAAK,2CAmEP"}
@@ -1,9 +1,9 @@
1
- import { jsxs as p, jsx as o } from "react/jsx-runtime";
2
- import { HugeiconsIcon as g } from "@hugeicons/react";
3
- import { Popover as s, ActionIcon as w, Slider as v } from "@mantine/core";
1
+ import { jsxs as h, jsx as o } from "react/jsx-runtime";
2
+ import { HugeiconsIcon as v } from "@hugeicons/react";
3
+ import { Popover as l, ActionIcon as w, Slider as g } from "@mantine/core";
4
4
  import { pickVolumeIcon as x } from "../helpers.js";
5
- import l from "../MusicPlayerBar.module.css.js";
6
- function y({
5
+ import s from "../MusicPlayerBar.module.css.js";
6
+ function b({
7
7
  popover: e,
8
8
  volume: n,
9
9
  muted: r,
@@ -14,26 +14,26 @@ function y({
14
14
  onToggleMute: d,
15
15
  onVolumeChange: m
16
16
  }) {
17
- const u = x(n, r), f = r ? 0 : n, h = r || n === 0 ? t : a;
18
- return /* @__PURE__ */ p(
19
- s,
17
+ const u = x(n, r), f = r ? 0 : n, p = r || n === 0 ? t : a;
18
+ return /* @__PURE__ */ h(
19
+ l,
20
20
  {
21
21
  opened: e.opened,
22
22
  onChange: e.setOpened,
23
- position: "right",
24
- offset: 4,
23
+ position: "top",
24
+ offset: 0,
25
25
  withinPortal: !0,
26
26
  trapFocus: !1,
27
27
  returnFocus: !1,
28
- classNames: { dropdown: l.ghostDropdown },
28
+ classNames: { dropdown: s.volumePopoverDropdown },
29
29
  children: [
30
- /* @__PURE__ */ o(s.Target, { children: /* @__PURE__ */ o(
30
+ /* @__PURE__ */ o(l.Target, { children: /* @__PURE__ */ o(
31
31
  w,
32
32
  {
33
33
  variant: "subtle",
34
34
  color: "gray",
35
35
  size: 28,
36
- "aria-label": h,
36
+ "aria-label": p,
37
37
  onMouseEnter: i ? void 0 : e.open,
38
38
  onMouseLeave: i ? void 0 : e.close,
39
39
  onClick: () => {
@@ -44,7 +44,7 @@ function y({
44
44
  d();
45
45
  },
46
46
  children: /* @__PURE__ */ o(
47
- g,
47
+ v,
48
48
  {
49
49
  icon: u,
50
50
  size: 20,
@@ -53,14 +53,14 @@ function y({
53
53
  )
54
54
  }
55
55
  ) }),
56
- /* @__PURE__ */ o(s.Dropdown, { children: /* @__PURE__ */ o(
56
+ /* @__PURE__ */ o(l.Dropdown, { children: /* @__PURE__ */ o(
57
57
  "div",
58
58
  {
59
- className: l.volumeDropdown,
59
+ className: s.volumeDropdown,
60
60
  onMouseEnter: e.cancelClose,
61
61
  onMouseLeave: e.close,
62
62
  children: e.opened && /* @__PURE__ */ o(
63
- v,
63
+ g,
64
64
  {
65
65
  min: 0,
66
66
  max: 1,
@@ -68,10 +68,12 @@ function y({
68
68
  value: f,
69
69
  onChange: m,
70
70
  label: null,
71
- w: 57,
71
+ orientation: "vertical",
72
+ h: 57,
73
+ w: 10,
72
74
  size: 2,
73
75
  "data-testid": "music-volume-slider",
74
- className: l.volumeSlider,
76
+ className: s.volumeSlider,
75
77
  "aria-label": c
76
78
  }
77
79
  )
@@ -82,5 +84,5 @@ function y({
82
84
  );
83
85
  }
84
86
  export {
85
- y as VolumePopover
87
+ b as VolumePopover
86
88
  };
@@ -0,0 +1,19 @@
1
+ import { ReactNode } from 'react';
2
+ export type PillTabItem = {
3
+ value: string;
4
+ label: ReactNode;
5
+ disabled?: boolean;
6
+ 'data-cy'?: string;
7
+ };
8
+ export type PillTabsProps = {
9
+ value: string;
10
+ onChange: (value: string) => void;
11
+ items: PillTabItem[];
12
+ height?: number;
13
+ pillHeight?: number;
14
+ pillPaddingX?: number;
15
+ rightSlot?: ReactNode;
16
+ className?: string;
17
+ };
18
+ export declare const PillTabs: ({ value, onChange, items, height, pillHeight, pillPaddingX, rightSlot, className, }: PillTabsProps) => import("react/jsx-runtime").JSX.Element;
19
+ //# sourceMappingURL=PillTabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PillTabs.d.ts","sourceRoot":"","sources":["../../../src/components/PillTabs/PillTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMlC,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,qFAStB,aAAa,4CAkCf,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { jsx as l, jsxs as h } from "react/jsx-runtime";
2
+ import { Tabs as s, Flex as p } from "@mantine/core";
3
+ import e from "./PillTabs.module.css.js";
4
+ const f = ({
5
+ value: r,
6
+ onChange: t,
7
+ items: i,
8
+ height: d = 44,
9
+ pillHeight: n = 36,
10
+ pillPaddingX: b = 8,
11
+ rightSlot: c,
12
+ className: o
13
+ }) => /* @__PURE__ */ l(
14
+ s,
15
+ {
16
+ variant: "default",
17
+ value: r,
18
+ onChange: (a) => a && t(a),
19
+ className: o,
20
+ classNames: { list: e.tabsList, tab: e.tab },
21
+ w: "100%",
22
+ children: /* @__PURE__ */ h(s.List, { h: d, children: [
23
+ i.map((a) => /* @__PURE__ */ l(
24
+ s.Tab,
25
+ {
26
+ value: a.value,
27
+ disabled: a.disabled,
28
+ "data-cy": a["data-cy"],
29
+ h: "100%",
30
+ p: 0,
31
+ children: /* @__PURE__ */ l(
32
+ p,
33
+ {
34
+ className: e.tabPill,
35
+ px: b,
36
+ h: n,
37
+ align: "center",
38
+ children: a.label
39
+ }
40
+ )
41
+ },
42
+ a.value
43
+ )),
44
+ c
45
+ ] })
46
+ }
47
+ );
48
+ export {
49
+ f as PillTabs
50
+ };
@@ -0,0 +1,11 @@
1
+ const t = "_tabsList_1dv7h_1", s = "_tab_1dv7h_1", a = "_tabPill_1dv7h_45", b = {
2
+ tabsList: t,
3
+ tab: s,
4
+ tabPill: a
5
+ };
6
+ export {
7
+ b as default,
8
+ s as tab,
9
+ a as tabPill,
10
+ t as tabsList
11
+ };
@@ -1,5 +1,5 @@
1
1
  import { jsxs as g, jsx as e } from "react/jsx-runtime";
2
- import { Unlink03Icon as v } from "@hugeicons/core-free-icons";
2
+ import { Delete02Icon as v } from "@hugeicons/core-free-icons";
3
3
  import { HugeiconsIcon as y } from "@hugeicons/react";
4
4
  import { Stack as C, Text as c } from "@mantine/core";
5
5
  import { modals as a } from "@mantine/modals";
@@ -0,0 +1,2 @@
1
+ export declare const useOfficePreviewAvailable: () => boolean;
2
+ //# sourceMappingURL=useOfficePreviewAvailable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOfficePreviewAvailable.d.ts","sourceRoot":"","sources":["../../src/hooks/useOfficePreviewAvailable.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,yBAAyB,QAAO,OAsB5C,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { useQuery as a } from "@tanstack/react-query";
2
+ import { isOfficeEnabled as s } from "../config/envConfig.js";
3
+ const o = () => {
4
+ const e = s(), { data: t } = a({
5
+ queryKey: ["capabilities", "office"],
6
+ queryFn: async () => {
7
+ const i = await fetch("/v1/capabilities", {
8
+ credentials: "include",
9
+ cache: "no-store"
10
+ });
11
+ return i.ok ? { installed: !!(await i.json())?.office?.installed } : { installed: !1 };
12
+ },
13
+ staleTime: 3e4,
14
+ enabled: e
15
+ });
16
+ return e && !!t?.installed;
17
+ };
18
+ export {
19
+ o as useOfficePreviewAvailable
20
+ };