@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,21 +1,23 @@
1
- import { jsx as n, jsxs as u } from "react/jsx-runtime";
2
- import { useState as j, useMemo as h, useEffect as ne } from "react";
3
- import { useTranslation as ie } from "react-i18next";
4
- import { ImageAdd02Icon as A } from "@hugeicons/core-free-icons";
5
- import { HugeiconsIcon as E } from "@hugeicons/react";
6
- import { Flex as a, ActionIcon as le, Button as L, Text as re, Tabs as F, Box as ae, Popover as y, Stack as te } from "@mantine/core";
7
- import { isFeature as oe } from "../../helpers/feature.js";
8
- import { useMenu as se } from "../../hooks/useMenu.js";
9
- import { MediaLibraryBrowser as ce } from "../MediaLibrary/MediaLibraryBrowser.js";
10
- import { FilePickerGallery as de } from "./FilePickerGallery.js";
11
- import { FilePickerGiphy as ue } from "./FilePickerGiphy.js";
12
- import { FilePickerLink as he } from "./FilePickerLink.js";
1
+ import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
+ import { useState as E, useMemo as u, useEffect as ne } from "react";
3
+ import { useTranslation as le } from "react-i18next";
4
+ import { ImageAdd02Icon as V } from "@hugeicons/core-free-icons";
5
+ import { HugeiconsIcon as j } from "@hugeicons/react";
6
+ import { Flex as r, ActionIcon as ie, Button as A, Text as re, Tabs as x, Box as ae, Popover as F, Stack as oe } from "@mantine/core";
7
+ import { getEnvConfig as L } from "../../config/envConfig.js";
8
+ import { isFeature as se } from "../../helpers/feature.js";
9
+ import { useMenu as te } from "../../hooks/useMenu.js";
10
+ import { usePlatform as ce } from "../../hooks/usePlatform.js";
11
+ import { MediaLibraryBrowser as de } from "../MediaLibrary/MediaLibraryBrowser.js";
12
+ import { FilePickerGallery as ue } from "./FilePickerGallery.js";
13
+ import { FilePickerGiphy as he } from "./FilePickerGiphy.js";
14
+ import { FilePickerLink as pe } from "./FilePickerLink.js";
13
15
  import { FilePickerUnsplash as me } from "./FilePickerUnsplash.js";
14
- import { FilePickerGoogleDrive as pe } from "./FilePickerGoogleDrive.js";
15
- import { FilePickerUpload as fe } from "./FilePickerUpload.js";
16
- import { coverCollections as ge } from "./coverCollections.js";
16
+ import { FilePickerGoogleDrive as fe } from "./FilePickerGoogleDrive.js";
17
+ import { FilePickerUpload as ge } from "./FilePickerUpload.js";
18
+ import { coverCollections as ve } from "./coverCollections.js";
17
19
  import w from "./FilePicker.module.css.js";
18
- const ve = [
20
+ const be = [
19
21
  "gallery",
20
22
  "upload",
21
23
  "link",
@@ -23,176 +25,166 @@ const ve = [
23
25
  "giphy",
24
26
  "googleDrive",
25
27
  "media"
26
- ], Ee = ({
28
+ ], _e = ({
27
29
  onChange: N,
28
30
  onRemove: U,
29
31
  onUpload: b,
30
- uploading: H = !1,
31
- showTabs: o = ve,
32
- children: O,
33
- width: R = 610,
34
- position: $ = "bottom-end",
35
- readOnly: q = !1,
36
- hasImage: J,
37
- giphyToken: S,
38
- unsplashClientId: M,
39
- type: P = "image",
40
- galleryCollection: m = [],
41
- isValidMediaUrl: K,
42
- popoverProps: Q,
43
- dropZoneProps: W,
44
- targetProps: X,
45
- onOpenedChange: Y,
46
- googleDrive: i,
47
- mediaLibrary: t,
48
- inline: c = !1,
49
- tab: k
32
+ uploading: _ = !1,
33
+ showTabs: o = be,
34
+ children: H,
35
+ width: O = 610,
36
+ position: R = "bottom-end",
37
+ readOnly: $ = !1,
38
+ hasImage: q,
39
+ giphyToken: Ce,
40
+ unsplashClientId: ke,
41
+ type: S = "image",
42
+ galleryCollection: h = [],
43
+ isValidMediaUrl: J,
44
+ popoverProps: K,
45
+ dropZoneProps: Q,
46
+ targetProps: W,
47
+ onOpenedChange: X,
48
+ googleDrive: l,
49
+ mediaLibrary: a,
50
+ inline: p = !1,
51
+ tab: C
50
52
  }) => {
51
- const { t: l } = ie("ui"), [z, p] = j(!1), { isMobile: G } = se(), f = h(() => m.length > 0 ? m : c ? ge.map((e) => ({
52
- ...e,
53
- title: l(`coverGroups.${e.id}`, { defaultValue: e.id })
54
- })) : m, [m, c, l]), r = h(() => [
53
+ const { t: i } = le("ui"), [T, m] = E(!1), { isMobile: I } = te(), M = ce(), f = u(() => h.length > 0 ? h : p ? ve.map((n) => ({
54
+ ...n,
55
+ title: i(`coverGroups.${n.id}`, { defaultValue: n.id })
56
+ })) : h, [h, p, i]), s = u(() => [
55
57
  {
56
58
  value: "gallery",
57
- label: /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n("span", { children: l("changeCover.gallery") }) }),
59
+ label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: i("changeCover.gallery") }) }),
58
60
  visible: o.includes("gallery") && !!f.length
59
61
  },
60
62
  {
61
63
  value: "upload",
62
- label: /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n("span", { children: l("changeCover.upload") }) }),
64
+ label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: i("changeCover.upload") }) }),
63
65
  visible: o.includes("upload") && !!b
64
66
  },
65
67
  {
66
68
  value: "link",
67
- label: /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n("span", { children: l("changeCover.link") }) }),
69
+ label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: i("changeCover.link") }) }),
68
70
  visible: o.includes("link")
69
71
  },
70
72
  {
71
73
  value: "unsplash",
72
- label: /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n("span", { children: l("changeCover.searchImages") }) }),
73
- visible: o.includes("unsplash") && M
74
+ label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: i("changeCover.searchImages") }) }),
75
+ visible: o.includes("unsplash") && L().media?.unsplashEnabled !== !1
74
76
  },
75
77
  {
76
78
  value: "giphy",
77
- label: /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n("span", { children: "GIFs" }) }),
78
- visible: o.includes("giphy") && S
79
+ label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: "GIFs" }) }),
80
+ visible: o.includes("giphy") && M.has("giphy") && L().media?.giphyEnabled !== !1
79
81
  },
80
82
  {
81
83
  value: "googleDrive",
82
- label: /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n("span", { children: l("changeCover.googleDrive", {
84
+ label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: i("changeCover.googleDrive", {
83
85
  defaultValue: "Google Drive"
84
86
  }) }) }),
85
- visible: o.includes("googleDrive") && !!i
87
+ visible: o.includes("googleDrive") && !!l
86
88
  },
87
89
  {
88
90
  value: "media",
89
- label: /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n("span", { children: l("changeCover.media", { defaultValue: "Media" }) }) }),
90
- visible: o.includes("media") && !!t && oe()
91
+ label: /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e("span", { children: i("changeCover.media", { defaultValue: "Media" }) }) }),
92
+ visible: o.includes("media") && !!a && se()
91
93
  }
92
- ].filter((e) => e.visible), [
94
+ ].filter((y) => y.visible), [
93
95
  o,
94
- l,
96
+ M,
97
+ i,
95
98
  f.length,
96
99
  b,
97
- i,
98
- t
99
- ]), g = k !== void 0, [Z, I] = j(() => {
100
- if (k !== void 0) return "";
101
- if (r[0]) return r[0].value;
102
- const e = r.find((x) => x.visible);
103
- return e ? e.value : "";
104
- });
100
+ l,
101
+ a
102
+ ]), g = C !== void 0, [Y, P] = E(() => C !== void 0 ? "" : s[0]?.value ?? "");
105
103
  ne(() => {
106
- g || r.length && I((e) => e && r.some((x) => x.value === e) ? e : r[0].value);
107
- }, [r, g]);
108
- const C = h(() => r.map((e) => e.value), [r]), v = g ? k : Z, s = h(() => v && C.includes(v) ? v : C[0] ?? "", [v, C]), B = (e) => {
109
- g || I(e);
110
- }, _ = (e) => {
111
- b?.(e, p);
112
- }, d = (e) => {
113
- N?.(e), c || p(!1);
114
- }, D = h(() => G ? /* @__PURE__ */ u(le, { size: "lg", children: [
115
- /* @__PURE__ */ n(E, { icon: A, size: 22 }),
104
+ g || s.length && P((n) => n && s.some((y) => y.value === n) ? n : s[0].value);
105
+ }, [s, g]);
106
+ const k = u(() => s.map((n) => n.value), [s]), v = g ? C : Y, t = u(() => v && k.includes(v) ? v : k[0] ?? "", [v, k]), z = (n) => {
107
+ g || P(n);
108
+ }, Z = (n) => {
109
+ b?.(n, m);
110
+ }, c = (n) => {
111
+ N?.(n), p || m(!1);
112
+ }, D = u(() => I ? /* @__PURE__ */ d(ie, { size: "lg", children: [
113
+ /* @__PURE__ */ e(j, { icon: V, size: 22 }),
116
114
  " "
117
- ] }) : /* @__PURE__ */ n(
118
- L,
115
+ ] }) : /* @__PURE__ */ e(
116
+ A,
119
117
  {
120
118
  variant: "default",
121
119
  size: "xs",
122
- leftSection: /* @__PURE__ */ n(E, { icon: A, size: 16 }),
123
- children: /* @__PURE__ */ n(re, { fw: 600, size: "sm", children: l("changeCover.change") })
120
+ leftSection: /* @__PURE__ */ e(j, { icon: V, size: 16 }),
121
+ children: /* @__PURE__ */ e(re, { fw: 600, size: "sm", children: i("changeCover.change") })
124
122
  }
125
- ), [l, G]), V = (e) => {
126
- p(e), Y?.(e);
127
- }, T = /* @__PURE__ */ u(te, { gap: 0, px: 8, pb: 8, pt: "sm", children: [
128
- s === "gallery" && !!f.length && /* @__PURE__ */ n(
129
- de,
123
+ ), [i, I]), G = (n) => {
124
+ m(n), X?.(n);
125
+ }, B = /* @__PURE__ */ d(oe, { gap: 0, px: 8, pb: 8, pt: "sm", children: [
126
+ t === "gallery" && !!f.length && /* @__PURE__ */ e(
127
+ ue,
130
128
  {
131
129
  galleryCollection: f,
132
- onChange: d
130
+ onChange: c
133
131
  }
134
132
  ),
135
- s === "upload" && /* @__PURE__ */ n(
136
- fe,
133
+ t === "upload" && /* @__PURE__ */ e(
134
+ ge,
137
135
  {
138
- type: P || "image",
139
- uploading: H,
140
- dropZoneProps: W,
141
- onUpload: _
136
+ type: S || "image",
137
+ uploading: _,
138
+ dropZoneProps: Q,
139
+ onUpload: Z
142
140
  }
143
141
  ),
144
- s === "link" && /* @__PURE__ */ n(
145
- he,
146
- {
147
- type: P || "image",
148
- onChange: d,
149
- isValidMediaUrl: K
150
- }
151
- ),
152
- s === "unsplash" && /* @__PURE__ */ n(
153
- me,
142
+ t === "link" && /* @__PURE__ */ e(
143
+ pe,
154
144
  {
155
- clientId: M,
156
- onChange: d
145
+ type: S || "image",
146
+ onChange: c,
147
+ isValidMediaUrl: J
157
148
  }
158
149
  ),
159
- s === "giphy" && /* @__PURE__ */ n(ue, { token: S, onChange: d }),
160
- s === "googleDrive" && i && /* @__PURE__ */ n(
161
- pe,
150
+ t === "unsplash" && /* @__PURE__ */ e(me, { onChange: c }),
151
+ t === "giphy" && /* @__PURE__ */ e(he, { onChange: c }),
152
+ t === "googleDrive" && l && /* @__PURE__ */ e(
153
+ fe,
162
154
  {
163
- isConnected: i.isConnected,
164
- connectedEmail: i.connectedEmail,
165
- files: i.files,
166
- isLoading: i.isLoading,
167
- hasMore: i.hasMore,
168
- isImporting: i.isImporting,
169
- onSearch: i.onSearch,
170
- onLoadMore: i.onLoadMore,
171
- onSelect: (e) => {
172
- i.onSelect(e, d);
155
+ isConnected: l.isConnected,
156
+ connectedEmail: l.connectedEmail,
157
+ files: l.files,
158
+ isLoading: l.isLoading,
159
+ hasMore: l.hasMore,
160
+ isImporting: l.isImporting,
161
+ onSearch: l.onSearch,
162
+ onLoadMore: l.onLoadMore,
163
+ onSelect: (n) => {
164
+ l.onSelect(n, c);
173
165
  },
174
- error: i.error
166
+ error: l.error
175
167
  }
176
168
  ),
177
- s === "media" && t && /* @__PURE__ */ n(
178
- ce,
169
+ t === "media" && a && /* @__PURE__ */ e(
170
+ de,
179
171
  {
180
- items: t.items,
181
- isLoading: t.isLoading,
182
- breadcrumbs: t.breadcrumbs,
183
- onFolderClick: t.onFolderClick,
184
- onBreadcrumbClick: t.onBreadcrumbClick,
185
- onSelect: (e) => {
186
- t.onSelect?.(e), c || p(!1);
172
+ items: a.items,
173
+ isLoading: a.isLoading,
174
+ breadcrumbs: a.breadcrumbs,
175
+ onFolderClick: a.onFolderClick,
176
+ onBreadcrumbClick: a.onBreadcrumbClick,
177
+ onSelect: (n) => {
178
+ a.onSelect?.(n), m(!1);
187
179
  }
188
180
  }
189
181
  )
190
- ] }), ee = /* @__PURE__ */ n(a, { justify: "space-between", align: "center", children: /* @__PURE__ */ n(
191
- F,
182
+ ] }), ee = /* @__PURE__ */ e(r, { justify: "space-between", align: "center", children: /* @__PURE__ */ e(
183
+ x,
192
184
  {
193
185
  defaultValue: "gallery",
194
- value: s,
195
- onChange: (e) => e && B(e),
186
+ value: t,
187
+ onChange: (n) => n && z(n),
196
188
  styles: {
197
189
  list: {
198
190
  alignItems: "center",
@@ -200,8 +192,8 @@ const ve = [
200
192
  }
201
193
  },
202
194
  w: "100%",
203
- children: /* @__PURE__ */ u(
204
- F.List,
195
+ children: /* @__PURE__ */ d(
196
+ x.List,
205
197
  {
206
198
  style: {
207
199
  gap: "4px"
@@ -209,21 +201,21 @@ const ve = [
209
201
  px: 8,
210
202
  h: 54,
211
203
  children: [
212
- r.map((e) => /* @__PURE__ */ n(
213
- F.Tab,
204
+ s.map((n) => /* @__PURE__ */ e(
205
+ x.Tab,
214
206
  {
215
207
  className: w.originalTab,
216
- disabled: q,
208
+ disabled: $,
217
209
  h: "100%",
218
210
  p: 0,
219
- value: e.value,
220
- onClick: () => B(e.value),
221
- children: /* @__PURE__ */ n(a, { className: w.customTab, px: "sm", h: 36, children: e.label })
211
+ value: n.value,
212
+ onClick: () => z(n.value),
213
+ children: /* @__PURE__ */ e(r, { className: w.customTab, px: "sm", h: 36, children: n.label })
222
214
  },
223
- e.value
215
+ n.value
224
216
  )),
225
- J && /* @__PURE__ */ n(
226
- L,
217
+ q && /* @__PURE__ */ e(
218
+ A,
227
219
  {
228
220
  variant: "subtle",
229
221
  fz: "sm",
@@ -234,7 +226,7 @@ const ve = [
234
226
  onClick: U,
235
227
  color: "var(--mantine-color-gray-light-color)",
236
228
  style: { marginLeft: "auto" },
237
- children: l("remove")
229
+ children: i("remove")
238
230
  }
239
231
  )
240
232
  ]
@@ -242,36 +234,36 @@ const ve = [
242
234
  )
243
235
  }
244
236
  ) });
245
- return c ? /* @__PURE__ */ n(
237
+ return p ? /* @__PURE__ */ e(
246
238
  ae,
247
239
  {
248
240
  "data-file-picker-inline": !0,
249
241
  bdrs: 8,
250
242
  p: 12,
251
243
  bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-7))",
252
- children: T
244
+ children: B
253
245
  }
254
- ) : /* @__PURE__ */ u(
255
- y,
246
+ ) : /* @__PURE__ */ d(
247
+ F,
256
248
  {
257
- width: R,
249
+ width: O,
258
250
  radius: "var(--mantine-spacing-sm)",
259
- position: $,
251
+ position: R,
260
252
  shadow: "md",
261
- opened: z,
262
- onChange: V,
253
+ opened: T,
254
+ onChange: G,
263
255
  withinPortal: !0,
264
- ...Q || {},
256
+ ...K || {},
265
257
  children: [
266
- /* @__PURE__ */ n(y.Target, { children: /* @__PURE__ */ n(a, { onClick: () => V(!z), ...X, children: O ?? D }) }),
267
- /* @__PURE__ */ u(y.Dropdown, { p: 0, children: [
258
+ /* @__PURE__ */ e(F.Target, { children: /* @__PURE__ */ e(r, { onClick: () => G(!T), ...W, children: H ?? D }) }),
259
+ /* @__PURE__ */ d(F.Dropdown, { p: 0, children: [
268
260
  ee,
269
- T
261
+ B
270
262
  ] })
271
263
  ]
272
264
  }
273
265
  );
274
266
  };
275
267
  export {
276
- Ee as FilePicker
268
+ _e as FilePicker
277
269
  };
@@ -1,17 +1,17 @@
1
- const o = "_itemImage_5y6cx_1", t = "_imageAuthor_5y6cx_14", c = "_originalTab_5y6cx_22", e = "_customTab_5y6cx_28", _ = "_button_5y6cx_36", a = "_pickerDropZone_5y6cx_46", n = {
1
+ const o = "_itemImage_7zb8o_1", t = "_imageAuthor_7zb8o_27", e = "_originalTab_7zb8o_43", _ = "_customTab_7zb8o_55", a = "_button_7zb8o_71", n = "_pickerDropZone_7zb8o_91", b = {
2
2
  itemImage: o,
3
3
  imageAuthor: t,
4
- originalTab: c,
5
- customTab: e,
6
- button: _,
7
- pickerDropZone: a
4
+ originalTab: e,
5
+ customTab: _,
6
+ button: a,
7
+ pickerDropZone: n
8
8
  };
9
9
  export {
10
- _ as button,
11
- e as customTab,
12
- n as default,
10
+ a as button,
11
+ _ as customTab,
12
+ b as default,
13
13
  t as imageAuthor,
14
14
  o as itemImage,
15
- c as originalTab,
16
- a as pickerDropZone
15
+ e as originalTab,
16
+ n as pickerDropZone
17
17
  };
@@ -3,26 +3,26 @@ import { useState as d, useMemo as f } from "react";
3
3
  import { useTranslation as x } from "react-i18next";
4
4
  import { Search01Icon as $ } from "@hugeicons/core-free-icons";
5
5
  import { HugeiconsIcon as v } from "@hugeicons/react";
6
- import { Stack as m, FocusTrap as g, TextInput as w, Text as u, SimpleGrid as C, AspectRatio as I } from "@mantine/core";
6
+ import { Stack as m, FocusTrap as g, TextInput as I, Text as u, SimpleGrid as w, AspectRatio as C } from "@mantine/core";
7
7
  import S from "./FilePicker.module.css.js";
8
- const F = ({
9
- galleryCollection: s,
8
+ const G = ({
9
+ galleryCollection: n,
10
10
  onChange: p
11
11
  }) => {
12
12
  const { t: a } = x("ui"), [i, h] = d(""), l = f(() => {
13
13
  const e = i.trim().toLowerCase();
14
- return e ? s.map((t) => ({
14
+ return e ? n.map((t) => ({
15
15
  ...t,
16
- items: t.items.filter((n) => `${t.title} ${t.id} ${t.path} ${n}`.toLowerCase().includes(e))
17
- })).filter((t) => t.items.length > 0) : s;
18
- }, [s, i]);
16
+ items: t.items.filter((s) => `${t.title} ${t.id} ${t.path} ${s}`.toLowerCase().includes(e))
17
+ })).filter((t) => t.items.length > 0) : n;
18
+ }, [n, i]);
19
19
  return /* @__PURE__ */ c(m, { gap: "sm", children: [
20
20
  /* @__PURE__ */ r(g, { active: !0, children: /* @__PURE__ */ r(
21
- w,
21
+ I,
22
22
  {
23
23
  leftSection: /* @__PURE__ */ r(v, { size: 16, icon: $ }),
24
24
  maxLength: 50,
25
- placeholder: a("changeCover.searchGifs"),
25
+ placeholder: a("changeCover.searchImage"),
26
26
  "data-autofocus": !0,
27
27
  value: i,
28
28
  onChange: (e) => h(e.currentTarget.value)
@@ -41,10 +41,10 @@ const F = ({
41
41
  children: e.title
42
42
  }
43
43
  ) }),
44
- /* @__PURE__ */ r(C, { spacing: 10, cols: 4, children: e.items.map((t, n) => {
44
+ /* @__PURE__ */ r(w, { spacing: 10, cols: 4, children: e.items.map((t, s) => {
45
45
  const o = "/images/covers/" + e.path + t;
46
46
  return /* @__PURE__ */ r(
47
- I,
47
+ C,
48
48
  {
49
49
  onClick: () => p?.(o),
50
50
  ratio: 120 / 65,
@@ -53,12 +53,12 @@ const F = ({
53
53
  backgroundImage: `url(${o})`
54
54
  }
55
55
  },
56
- `${e.id}-${t}-${n}`
56
+ `${e.id}-${t}-${s}`
57
57
  );
58
58
  }) })
59
59
  ] }, e.id)) })
60
60
  ] });
61
61
  };
62
62
  export {
63
- F as FilePickerGallery
63
+ G as FilePickerGallery
64
64
  };
@@ -1,4 +1,4 @@
1
- export declare const FilePickerGiphy: ({ token, onChange, }: {
1
+ export declare const FilePickerGiphy: ({ onChange, }: {
2
2
  token?: string;
3
3
  onChange?: (v: string) => void;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"FilePickerGiphy.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerGiphy.tsx"],"names":[],"mappings":"AAoCA,eAAO,MAAM,eAAe,GAAI,sBAG7B;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,4CAsGA,CAAC"}
1
+ {"version":3,"file":"FilePickerGiphy.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerGiphy.tsx"],"names":[],"mappings":"AAoCA,eAAO,MAAM,eAAe,GAAI,eAE7B;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,4CAqGA,CAAC"}