@layers-app/shared 0.4.2 → 0.4.3

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 (146) hide show
  1. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
  2. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +15 -16
  3. package/dist/components/EmojiPicker/EmojiPanel.js +6 -6
  4. package/dist/components/EmojiPicker/IconsPanel.js +11 -11
  5. package/dist/components/FormViewer/helpers/steps.d.ts.map +1 -1
  6. package/dist/components/FormViewer/helpers/steps.js +11 -11
  7. package/dist/components/MusicPlayerBar/MusicPlayerBar.d.ts +3 -0
  8. package/dist/components/MusicPlayerBar/MusicPlayerBar.d.ts.map +1 -0
  9. package/dist/components/MusicPlayerBar/MusicPlayerBar.js +239 -0
  10. package/dist/components/MusicPlayerBar/MusicPlayerBar.module.css.js +49 -0
  11. package/dist/components/MusicPlayerBar/components/HiddenAudio.d.ts +10 -0
  12. package/dist/components/MusicPlayerBar/components/HiddenAudio.d.ts.map +1 -0
  13. package/dist/components/MusicPlayerBar/components/HiddenAudio.js +35 -0
  14. package/dist/components/MusicPlayerBar/components/HoverActions.d.ts +20 -0
  15. package/dist/components/MusicPlayerBar/components/HoverActions.d.ts.map +1 -0
  16. package/dist/components/MusicPlayerBar/components/HoverActions.js +88 -0
  17. package/dist/components/MusicPlayerBar/components/MobileActionsDrawer.d.ts +18 -0
  18. package/dist/components/MusicPlayerBar/components/MobileActionsDrawer.d.ts.map +1 -0
  19. package/dist/components/MusicPlayerBar/components/MobileActionsDrawer.js +91 -0
  20. package/dist/components/MusicPlayerBar/components/MobileSpeedDrawer.d.ts +11 -0
  21. package/dist/components/MusicPlayerBar/components/MobileSpeedDrawer.d.ts.map +1 -0
  22. package/dist/components/MusicPlayerBar/components/MobileSpeedDrawer.js +38 -0
  23. package/dist/components/MusicPlayerBar/components/MobileTailControls.d.ts +11 -0
  24. package/dist/components/MusicPlayerBar/components/MobileTailControls.d.ts.map +1 -0
  25. package/dist/components/MusicPlayerBar/components/MobileTailControls.js +50 -0
  26. package/dist/components/MusicPlayerBar/components/PlayButton.d.ts +9 -0
  27. package/dist/components/MusicPlayerBar/components/PlayButton.d.ts.map +1 -0
  28. package/dist/components/MusicPlayerBar/components/PlayButton.js +28 -0
  29. package/dist/components/MusicPlayerBar/components/SpeedPopover.d.ts +11 -0
  30. package/dist/components/MusicPlayerBar/components/SpeedPopover.d.ts.map +1 -0
  31. package/dist/components/MusicPlayerBar/components/SpeedPopover.js +90 -0
  32. package/dist/components/MusicPlayerBar/components/Timer.d.ts +8 -0
  33. package/dist/components/MusicPlayerBar/components/Timer.d.ts.map +1 -0
  34. package/dist/components/MusicPlayerBar/components/Timer.js +25 -0
  35. package/dist/components/MusicPlayerBar/components/VolumePopover.d.ts +15 -0
  36. package/dist/components/MusicPlayerBar/components/VolumePopover.d.ts.map +1 -0
  37. package/dist/components/MusicPlayerBar/components/VolumePopover.js +86 -0
  38. package/dist/components/MusicPlayerBar/components/Waveform.d.ts +12 -0
  39. package/dist/components/MusicPlayerBar/components/Waveform.d.ts.map +1 -0
  40. package/dist/components/MusicPlayerBar/components/Waveform.js +47 -0
  41. package/dist/components/MusicPlayerBar/constants.d.ts +19 -0
  42. package/dist/components/MusicPlayerBar/constants.d.ts.map +1 -0
  43. package/dist/components/MusicPlayerBar/constants.js +21 -0
  44. package/dist/components/MusicPlayerBar/helpers.d.ts +11 -0
  45. package/dist/components/MusicPlayerBar/helpers.d.ts.map +1 -0
  46. package/dist/components/MusicPlayerBar/helpers.js +44 -0
  47. package/dist/components/MusicPlayerBar/hooks/useAudioPlayback.d.ts +23 -0
  48. package/dist/components/MusicPlayerBar/hooks/useAudioPlayback.d.ts.map +1 -0
  49. package/dist/components/MusicPlayerBar/hooks/useAudioPlayback.js +49 -0
  50. package/dist/components/MusicPlayerBar/hooks/useCopyFeedback.d.ts +6 -0
  51. package/dist/components/MusicPlayerBar/hooks/useCopyFeedback.d.ts.map +1 -0
  52. package/dist/components/MusicPlayerBar/hooks/useCopyFeedback.js +17 -0
  53. package/dist/components/MusicPlayerBar/hooks/useHoverPopover.d.ts +9 -0
  54. package/dist/components/MusicPlayerBar/hooks/useHoverPopover.d.ts.map +1 -0
  55. package/dist/components/MusicPlayerBar/hooks/useHoverPopover.js +18 -0
  56. package/dist/components/MusicPlayerBar/hooks/useMusicPlayerLabels.d.ts +3 -0
  57. package/dist/components/MusicPlayerBar/hooks/useMusicPlayerLabels.d.ts.map +1 -0
  58. package/dist/components/MusicPlayerBar/hooks/useMusicPlayerLabels.js +26 -0
  59. package/dist/components/MusicPlayerBar/hooks/useWaveform.d.ts +7 -0
  60. package/dist/components/MusicPlayerBar/hooks/useWaveform.d.ts.map +1 -0
  61. package/dist/components/MusicPlayerBar/hooks/useWaveform.js +28 -0
  62. package/dist/components/MusicPlayerBar/index.d.ts +3 -0
  63. package/dist/components/MusicPlayerBar/index.d.ts.map +1 -0
  64. package/dist/components/MusicPlayerBar/types.d.ts +33 -0
  65. package/dist/components/MusicPlayerBar/types.d.ts.map +1 -0
  66. package/dist/components/NavbarResizer/NavbarResizer.js +1 -1
  67. package/dist/components/OnboardingTour/OnboardingTourFooter.js +1 -1
  68. package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
  69. package/dist/components/table/hooks/useColumnsResizing.js +1 -1
  70. package/dist/helpers/isNoAccessError.d.ts +2 -0
  71. package/dist/helpers/isNoAccessError.d.ts.map +1 -0
  72. package/dist/helpers/isNoAccessError.js +7 -0
  73. package/dist/index.css +1 -1
  74. package/dist/index.d.ts +2 -2
  75. package/dist/index.d.ts.map +1 -1
  76. package/dist/index.js +109 -109
  77. package/dist/lang/locales/ui_en.json.js +6 -4
  78. package/dist/lang/locales/ui_es.json.js +8 -6
  79. package/dist/lang/locales/ui_ru.json.js +9 -7
  80. package/package.json +2 -2
  81. package/dist/assets/images/person.png.js +0 -4
  82. package/dist/assets/images/person2.png.js +0 -4
  83. package/dist/assets/images/person3.png.js +0 -4
  84. package/dist/assets/images/person4.png.js +0 -4
  85. package/dist/components/OnBoarding/OnBoardingPage.d.ts +0 -2
  86. package/dist/components/OnBoarding/OnBoardingPage.d.ts.map +0 -1
  87. package/dist/components/OnBoarding/OnBoardingPage.js +0 -80
  88. package/dist/components/OnBoarding/ProjectBoard.d.ts +0 -5
  89. package/dist/components/OnBoarding/ProjectBoard.d.ts.map +0 -1
  90. package/dist/components/OnBoarding/ProjectBoard.js +0 -141
  91. package/dist/components/OnBoarding/StepsNavBar.d.ts +0 -5
  92. package/dist/components/OnBoarding/StepsNavBar.d.ts.map +0 -1
  93. package/dist/components/OnBoarding/StepsNavBar.js +0 -21
  94. package/dist/components/OnBoarding/index.d.ts +0 -2
  95. package/dist/components/OnBoarding/index.d.ts.map +0 -1
  96. package/dist/components/OnBoarding/steps/AddTasks/AddTasksNav.d.ts +0 -3
  97. package/dist/components/OnBoarding/steps/AddTasks/AddTasksNav.d.ts.map +0 -1
  98. package/dist/components/OnBoarding/steps/AddTasks/AddTasksNav.js +0 -42
  99. package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.d.ts +0 -3
  100. package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.d.ts.map +0 -1
  101. package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.js +0 -51
  102. package/dist/components/OnBoarding/steps/CreateFirstProject.d.ts +0 -3
  103. package/dist/components/OnBoarding/steps/CreateFirstProject.d.ts.map +0 -1
  104. package/dist/components/OnBoarding/steps/CreateFirstProject.js +0 -45
  105. package/dist/components/OnBoarding/steps/DefineStatuses/DefineStatusesNav.d.ts +0 -3
  106. package/dist/components/OnBoarding/steps/DefineStatuses/DefineStatusesNav.d.ts.map +0 -1
  107. package/dist/components/OnBoarding/steps/DefineStatuses/DefineStatusesNav.js +0 -42
  108. package/dist/components/OnBoarding/steps/DefineStatuses/StatusBadge.d.ts +0 -9
  109. package/dist/components/OnBoarding/steps/DefineStatuses/StatusBadge.d.ts.map +0 -1
  110. package/dist/components/OnBoarding/steps/DefineStatuses/StatusBadge.js +0 -22
  111. package/dist/components/OnBoarding/steps/DefineStatuses/StatusesListBoard.d.ts +0 -3
  112. package/dist/components/OnBoarding/steps/DefineStatuses/StatusesListBoard.d.ts.map +0 -1
  113. package/dist/components/OnBoarding/steps/DefineStatuses/StatusesListBoard.js +0 -217
  114. package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsBoard.d.ts +0 -3
  115. package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsBoard.d.ts.map +0 -1
  116. package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsBoard.js +0 -16
  117. package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsNav.d.ts +0 -3
  118. package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsNav.d.ts.map +0 -1
  119. package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsNav.js +0 -56
  120. package/dist/components/OnBoarding/steps/DifferentLayouts/KanbanLayout.d.ts +0 -3
  121. package/dist/components/OnBoarding/steps/DifferentLayouts/KanbanLayout.d.ts.map +0 -1
  122. package/dist/components/OnBoarding/steps/DifferentLayouts/KanbanLayout.js +0 -272
  123. package/dist/components/OnBoarding/steps/DifferentLayouts/styles.module.css.js +0 -9
  124. package/dist/components/OnBoarding/steps/InviteUsers/BoardModal.d.ts +0 -3
  125. package/dist/components/OnBoarding/steps/InviteUsers/BoardModal.d.ts.map +0 -1
  126. package/dist/components/OnBoarding/steps/InviteUsers/BoardModal.js +0 -86
  127. package/dist/components/OnBoarding/steps/InviteUsers/InviteUsers.d.ts +0 -3
  128. package/dist/components/OnBoarding/steps/InviteUsers/InviteUsers.d.ts.map +0 -1
  129. package/dist/components/OnBoarding/steps/InviteUsers/InviteUsers.js +0 -26
  130. package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.d.ts +0 -9
  131. package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.d.ts.map +0 -1
  132. package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.js +0 -61
  133. package/dist/components/OnBoarding/steps/SelectCategory/SelectCategoryNav.d.ts +0 -3
  134. package/dist/components/OnBoarding/steps/SelectCategory/SelectCategoryNav.d.ts.map +0 -1
  135. package/dist/components/OnBoarding/steps/SelectCategory/SelectCategoryNav.js +0 -42
  136. package/dist/components/OnBoarding/steps/StartedStep.d.ts +0 -3
  137. package/dist/components/OnBoarding/steps/StartedStep.d.ts.map +0 -1
  138. package/dist/components/OnBoarding/steps/StartedStep.js +0 -71
  139. package/dist/components/OnBoarding/steps/Wrapper.d.ts +0 -15
  140. package/dist/components/OnBoarding/steps/Wrapper.d.ts.map +0 -1
  141. package/dist/components/OnBoarding/steps/Wrapper.js +0 -49
  142. package/dist/components/OnBoarding/steps/styles.module.css.js +0 -17
  143. package/dist/components/OnBoarding/styles.module.css.js +0 -15
  144. package/dist/store/onboarding.d.ts +0 -30
  145. package/dist/store/onboarding.d.ts.map +0 -1
  146. package/dist/store/onboarding.js +0 -53
@@ -0,0 +1,47 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useCallback as h } from "react";
3
+ import e from "../MusicPlayerBar.module.css.js";
4
+ function x({
5
+ clipRef: l,
6
+ heights: s,
7
+ activeBar: c,
8
+ currentTime: n,
9
+ duration: i,
10
+ label: o,
11
+ onSeek: m
12
+ }) {
13
+ const v = h(
14
+ (t) => {
15
+ const a = t.currentTarget.getBoundingClientRect(), f = Math.max(
16
+ 0,
17
+ Math.min((t.clientX - a.left) / a.width, 1)
18
+ );
19
+ m(f);
20
+ },
21
+ [m]
22
+ ), d = Number.isFinite(i) && i > 0 ? Math.round(i) : 0;
23
+ return /* @__PURE__ */ r("div", { ref: l, className: e.waveformClip, children: /* @__PURE__ */ r(
24
+ "div",
25
+ {
26
+ "data-testid": "music-waveform",
27
+ className: e.waveform,
28
+ onClick: v,
29
+ role: "slider",
30
+ "aria-label": o,
31
+ "aria-valuenow": Math.round(n),
32
+ "aria-valuemin": 0,
33
+ "aria-valuemax": d,
34
+ children: s.map((t, a) => /* @__PURE__ */ r(
35
+ "div",
36
+ {
37
+ className: `${e.stem} ${a < c ? e.stemActive : e.stemInactive}`,
38
+ style: { height: t }
39
+ },
40
+ a
41
+ ))
42
+ }
43
+ ) });
44
+ }
45
+ export {
46
+ x as Waveform
47
+ };
@@ -0,0 +1,19 @@
1
+ export declare const DEFAULT_RATES: readonly [0.5, 0.7, 1, 1.2, 1.5, 1.7, 2];
2
+ export declare const BAR_WIDTH = 3;
3
+ export declare const BAR_GAP = 3;
4
+ export declare const BAR_STEP: number;
5
+ export declare const STEM_MIN_HEIGHT = 6;
6
+ export declare const STEM_MAX_HEIGHT = 28;
7
+ export declare const MIN_BAR_COUNT = 4;
8
+ export declare const MAX_BAR_COUNT = 200;
9
+ export declare const DEFAULT_BAR_COUNT = 40;
10
+ export declare const POLL_INTERVAL_MS = 200;
11
+ export declare const LINK_COPIED_TIMEOUT_MS = 1000;
12
+ export declare const SPEED_POPOVER_OPEN_DELAY_MS = 120;
13
+ export declare const SPEED_POPOVER_CLOSE_DELAY_MS = 220;
14
+ export declare const VOLUME_POPOVER_OPEN_DELAY_MS = 120;
15
+ export declare const VOLUME_POPOVER_CLOSE_DELAY_MS = 480;
16
+ export declare const TOUCH_DEVICE_QUERY = "(hover: none) and (pointer: coarse)";
17
+ export declare const TOUCH_TABLET_QUERY = "(hover: none) and (pointer: coarse) and (min-width: 769px)";
18
+ export declare const HOVER_CAPABLE_QUERY = "(hover: hover)";
19
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/MusicPlayerBar/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,0CAA2C,CAAC;AAEtE,eAAO,MAAM,SAAS,IAAI,CAAC;AAC3B,eAAO,MAAM,OAAO,IAAI,CAAC;AACzB,eAAO,MAAM,QAAQ,QAAsB,CAAC;AAE5C,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,aAAa,MAAM,CAAC;AACjC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,eAAO,MAAM,gBAAgB,MAAM,CAAC;AACpC,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAC/C,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAChD,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAChD,eAAO,MAAM,6BAA6B,MAAM,CAAC;AAEjD,eAAO,MAAM,kBAAkB,wCAAwC,CAAC;AACxE,eAAO,MAAM,kBAAkB,+DAC+B,CAAC;AAC/D,eAAO,MAAM,mBAAmB,mBAAmB,CAAC"}
@@ -0,0 +1,21 @@
1
+ const o = [0.5, 0.7, 1, 1.2, 1.5, 1.7, 2], _ = 3, E = 3, n = _ + E, O = 6, t = 28, c = 4, s = 200, A = 40, T = 200, P = 1e3, L = 120, R = 220, M = 120, S = 480, U = "(hover: none) and (pointer: coarse)", e = "(hover: none) and (pointer: coarse) and (min-width: 769px)", D = "(hover: hover)";
2
+ export {
3
+ E as BAR_GAP,
4
+ n as BAR_STEP,
5
+ _ as BAR_WIDTH,
6
+ A as DEFAULT_BAR_COUNT,
7
+ o as DEFAULT_RATES,
8
+ D as HOVER_CAPABLE_QUERY,
9
+ P as LINK_COPIED_TIMEOUT_MS,
10
+ s as MAX_BAR_COUNT,
11
+ c as MIN_BAR_COUNT,
12
+ T as POLL_INTERVAL_MS,
13
+ R as SPEED_POPOVER_CLOSE_DELAY_MS,
14
+ L as SPEED_POPOVER_OPEN_DELAY_MS,
15
+ t as STEM_MAX_HEIGHT,
16
+ O as STEM_MIN_HEIGHT,
17
+ U as TOUCH_DEVICE_QUERY,
18
+ e as TOUCH_TABLET_QUERY,
19
+ S as VOLUME_POPOVER_CLOSE_DELAY_MS,
20
+ M as VOLUME_POPOVER_OPEN_DELAY_MS
21
+ };
@@ -0,0 +1,11 @@
1
+ export declare function formatTime(seconds: number): string;
2
+ export declare function pseudoHeight(i: number, min?: number, max?: number): number;
3
+ export declare function buildHeights(n: number, source?: number[]): number[];
4
+ export declare function resolveDownloadFileName(src: string): string;
5
+ export declare function downloadByUrl(src: string, suggestedName: string): void;
6
+ export declare function pickVolumeIcon(volume: number, muted: boolean): [string, {
7
+ [key: string]: string | number;
8
+ }][] | readonly (readonly [string, {
9
+ readonly [key: string]: string | number;
10
+ }])[];
11
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/MusicPlayerBar/helpers.ts"],"names":[],"mappings":"AAQA,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAMlD;AAED,wBAAgB,YAAY,CAC1B,CAAC,EAAE,MAAM,EACT,GAAG,SAAkB,EACrB,GAAG,SAAkB,GACpB,MAAM,CAIR;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAenE;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAa3D;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAQtE;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;;;;MAI5D"}
@@ -0,0 +1,44 @@
1
+ import { VolumeOffIcon as f, VolumeLowIcon as m, VolumeHighIcon as u } from "@hugeicons/core-free-icons";
2
+ import { STEM_MIN_HEIGHT as c, STEM_MAX_HEIGHT as p } from "./constants.js";
3
+ function d(t) {
4
+ if (!Number.isFinite(t) || t < 0) return "0:00";
5
+ const n = Math.floor(t), o = Math.floor(n / 60), r = n % 60;
6
+ return `${o}:${r.toString().padStart(2, "0")}`;
7
+ }
8
+ function i(t, n = c, o = p) {
9
+ return Math.round(
10
+ Math.abs(Math.sin(t * 2.3 + 1.7) * Math.cos(t * 0.9)) * (o - n) + n
11
+ );
12
+ }
13
+ function M(t, n) {
14
+ return n?.length ? n.length === t ? n : Array.from({ length: t }, (o, r) => {
15
+ const l = n.length > 1 ? r / Math.max(t - 1, 1) * (n.length - 1) : 0, e = Math.floor(l), a = Math.min(e + 1, n.length - 1), h = l - e;
16
+ return Math.round(
17
+ (n[e] ?? i(e)) * (1 - h) + (n[a] ?? i(a)) * h
18
+ );
19
+ }) : Array.from({ length: t }, (o, r) => i(r));
20
+ }
21
+ function w(t) {
22
+ try {
23
+ const r = ((t.startsWith("http://") || t.startsWith("https://") ? new URL(t) : new URL(t, window.location.href)).searchParams.get("originalFileName") || t).split("/").pop()?.split("?")[0]?.trim();
24
+ return r && r.length > 0 ? r : "file";
25
+ } catch {
26
+ const n = t.split("/").pop()?.split("?")[0]?.trim();
27
+ return n && n.length > 0 ? n : "file";
28
+ }
29
+ }
30
+ function H(t, n) {
31
+ const o = document.createElement("a");
32
+ o.href = t, o.download = n, o.rel = "noopener noreferrer", document.body.appendChild(o), o.click(), o.remove();
33
+ }
34
+ function I(t, n) {
35
+ return n || t === 0 ? f : t <= 0.5 ? m : u;
36
+ }
37
+ export {
38
+ M as buildHeights,
39
+ H as downloadByUrl,
40
+ d as formatTime,
41
+ I as pickVolumeIcon,
42
+ i as pseudoHeight,
43
+ w as resolveDownloadFileName
44
+ };
@@ -0,0 +1,23 @@
1
+ export type AudioPlaybackState = {
2
+ audioRef: React.MutableRefObject<HTMLAudioElement | null>;
3
+ playing: boolean;
4
+ currentTime: number;
5
+ duration: number;
6
+ rateIndex: number;
7
+ volume: number;
8
+ muted: boolean;
9
+ setCurrentTime: (value: number) => void;
10
+ togglePlay: () => void;
11
+ setPlaying: (value: boolean) => void;
12
+ toggleMuted: () => void;
13
+ selectRate: (index: number) => void;
14
+ handleVolumeChange: (value: number) => void;
15
+ handleLoadedMetadata: () => void;
16
+ handleEnded: () => void;
17
+ };
18
+ export declare function useAudioPlayback(params: {
19
+ durationProp?: number;
20
+ initialVolume: number;
21
+ playbackRates: readonly number[];
22
+ }): AudioPlaybackState;
23
+ //# sourceMappingURL=useAudioPlayback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAudioPlayback.d.ts","sourceRoot":"","sources":["../../../../src/components/MusicPlayerBar/hooks/useAudioPlayback.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,KAAK,CAAC,gBAAgB,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IAC1D,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,kBAAkB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC,GAAG,kBAAkB,CAoFrB"}
@@ -0,0 +1,49 @@
1
+ import { useRef as C, useState as r, useEffect as u, useCallback as o } from "react";
2
+ import { useInterval as E } from "@mantine/hooks";
3
+ import { POLL_INTERVAL_MS as N } from "../constants.js";
4
+ function S(P) {
5
+ const { durationProp: n, initialVolume: R, playbackRates: l } = P, t = C(null), [s, a] = r(!1), [b, m] = r(0), [h, p] = r(() => n ?? 0), [i, k] = r(() => {
6
+ const e = l.indexOf(1);
7
+ return e >= 0 ? e : 0;
8
+ }), [f, x] = r(R), [c, g] = r(!1);
9
+ u(() => {
10
+ n != null && Number.isFinite(n) && n > 0 && p(n);
11
+ }, [n]);
12
+ const { start: y, stop: d } = E(() => {
13
+ t.current && m(t.current.currentTime);
14
+ }, N);
15
+ u(() => (s ? y() : d(), () => d()), [s, y, d]), u(() => {
16
+ const e = t.current;
17
+ e && (s ? e.play().catch(() => a(!1)) : e.pause());
18
+ }, [s]), u(() => {
19
+ t.current && (t.current.playbackRate = l[i] ?? 1);
20
+ }, [i, l]), u(() => {
21
+ t.current && (t.current.muted = c, t.current.volume = c ? 0 : f);
22
+ }, [c, f]);
23
+ const I = o(() => {
24
+ const e = t.current?.duration;
25
+ Number.isFinite(e) && (e ?? 0) > 0 && p(e ?? 0);
26
+ }, []), L = o(() => a(!1), []), M = o(() => a((e) => !e), []), T = o(() => g((e) => !e), []), V = o((e) => k(e), []), v = o((e) => {
27
+ x(e), e > 0 && g(!1);
28
+ }, []);
29
+ return {
30
+ audioRef: t,
31
+ playing: s,
32
+ currentTime: b,
33
+ duration: h,
34
+ rateIndex: i,
35
+ volume: f,
36
+ muted: c,
37
+ setCurrentTime: m,
38
+ togglePlay: M,
39
+ setPlaying: a,
40
+ toggleMuted: T,
41
+ selectRate: V,
42
+ handleVolumeChange: v,
43
+ handleLoadedMetadata: I,
44
+ handleEnded: L
45
+ };
46
+ }
47
+ export {
48
+ S as useAudioPlayback
49
+ };
@@ -0,0 +1,6 @@
1
+ export type CopyFeedback = {
2
+ linkCopied: boolean;
3
+ markCopied: () => void;
4
+ };
5
+ export declare function useCopyFeedback(): CopyFeedback;
6
+ //# sourceMappingURL=useCopyFeedback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCopyFeedback.d.ts","sourceRoot":"","sources":["../../../../src/components/MusicPlayerBar/hooks/useCopyFeedback.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF,wBAAgB,eAAe,IAAI,YAAY,CAoB9C"}
@@ -0,0 +1,17 @@
1
+ import { useState as n, useRef as o, useEffect as c, useCallback as l } from "react";
2
+ import { LINK_COPIED_TIMEOUT_MS as i } from "../constants.js";
3
+ function a() {
4
+ const [r, t] = n(!1), e = o(null);
5
+ c(() => () => {
6
+ e.current !== null && clearTimeout(e.current);
7
+ }, []);
8
+ const u = l(() => {
9
+ e.current !== null && clearTimeout(e.current), t(!0), e.current = setTimeout(() => {
10
+ t(!1), e.current = null;
11
+ }, i);
12
+ }, []);
13
+ return { linkCopied: r, markCopied: u };
14
+ }
15
+ export {
16
+ a as useCopyFeedback
17
+ };
@@ -0,0 +1,9 @@
1
+ export type HoverPopover = {
2
+ opened: boolean;
3
+ setOpened: (value: boolean) => void;
4
+ open: () => void;
5
+ close: () => void;
6
+ cancelClose: () => void;
7
+ };
8
+ export declare function useHoverPopover(openDelay: number, closeDelay: number): HoverPopover;
9
+ //# sourceMappingURL=useHoverPopover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useHoverPopover.d.ts","sourceRoot":"","sources":["../../../../src/components/MusicPlayerBar/hooks/useHoverPopover.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACpC,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC;AAEF,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GACjB,YAAY,CA2Bd"}
@@ -0,0 +1,18 @@
1
+ import { useState as a, useRef as s, useCallback as r, useEffect as T } from "react";
2
+ function d(o, u) {
3
+ const [l, c] = a(!1), n = s(null), t = s(null), e = r(() => {
4
+ n.current && clearTimeout(n.current), t.current && clearTimeout(t.current);
5
+ }, []);
6
+ T(() => () => e(), [e]);
7
+ const i = r(() => {
8
+ e(), n.current = setTimeout(() => c(!0), o);
9
+ }, [o, e]), f = r(() => {
10
+ e(), t.current = setTimeout(() => c(!1), u);
11
+ }, [u, e]), m = r(() => {
12
+ t.current && clearTimeout(t.current);
13
+ }, []);
14
+ return { opened: l, setOpened: c, open: i, close: f, cancelClose: m };
15
+ }
16
+ export {
17
+ d as useHoverPopover
18
+ };
@@ -0,0 +1,3 @@
1
+ import type { MusicPlayerBarLabels } from '../types';
2
+ export declare function useMusicPlayerLabels(): MusicPlayerBarLabels;
3
+ //# sourceMappingURL=useMusicPlayerLabels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMusicPlayerLabels.d.ts","sourceRoot":"","sources":["../../../../src/components/MusicPlayerBar/hooks/useMusicPlayerLabels.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAErD,wBAAgB,oBAAoB,IAAI,oBAAoB,CAqB3D"}
@@ -0,0 +1,26 @@
1
+ import { useMemo as l } from "react";
2
+ import { useTranslation as m } from "react-i18next";
3
+ function u() {
4
+ const { t: e } = m("ui");
5
+ return l(
6
+ () => ({
7
+ play: e("musicPlayer.play"),
8
+ pause: e("musicPlayer.pause"),
9
+ mute: e("musicPlayer.mute"),
10
+ unmute: e("musicPlayer.unmute"),
11
+ playbackSpeed: e("musicPlayer.playbackSpeed"),
12
+ volume: e("musicPlayer.volume"),
13
+ waveformSeek: e("musicPlayer.waveformSeek"),
14
+ timeDisplay: e("musicPlayer.timeDisplay"),
15
+ download: e("musicPlayer.download"),
16
+ copyLink: e("musicPlayer.copyLink"),
17
+ delete: e("musicPlayer.delete"),
18
+ more: e("musicPlayer.more"),
19
+ mobileActionsTitle: e("musicPlayer.mobileActionsTitle")
20
+ }),
21
+ [e]
22
+ );
23
+ }
24
+ export {
25
+ u as useMusicPlayerLabels
26
+ };
@@ -0,0 +1,7 @@
1
+ export type WaveformState = {
2
+ clipRef: React.MutableRefObject<HTMLDivElement | null>;
3
+ barCount: number;
4
+ heights: number[];
5
+ };
6
+ export declare function useWaveform(waveformHeights?: number[]): WaveformState;
7
+ //# sourceMappingURL=useWaveform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWaveform.d.ts","sourceRoot":"","sources":["../../../../src/components/MusicPlayerBar/hooks/useWaveform.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACvD,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF,wBAAgB,WAAW,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,GAAG,aAAa,CA0BrE"}
@@ -0,0 +1,28 @@
1
+ import { useRef as f, useState as m, useEffect as R, useMemo as A } from "react";
2
+ import { DEFAULT_BAR_COUNT as _, MIN_BAR_COUNT as a, MAX_BAR_COUNT as h, BAR_GAP as l, BAR_STEP as B } from "../constants.js";
3
+ import { buildHeights as M } from "../helpers.js";
4
+ function b(e) {
5
+ const o = f(null), [t, s] = m(_);
6
+ R(() => {
7
+ const r = o.current;
8
+ if (!r) return;
9
+ const n = new ResizeObserver(([u]) => {
10
+ const i = u.contentRect.width;
11
+ s(
12
+ Math.max(
13
+ a,
14
+ Math.min(h, Math.floor((i + l) / B))
15
+ )
16
+ );
17
+ });
18
+ return n.observe(r), () => n.disconnect();
19
+ }, []);
20
+ const c = A(
21
+ () => M(t, e),
22
+ [t, e]
23
+ );
24
+ return { clipRef: o, barCount: t, heights: c };
25
+ }
26
+ export {
27
+ b as useWaveform
28
+ };
@@ -0,0 +1,3 @@
1
+ export { MusicPlayerBar } from './MusicPlayerBar';
2
+ export type { MusicPlayerBarProps } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MusicPlayerBar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { ReactNode } from 'react';
2
+ export type MusicPlayerBarLabels = {
3
+ play: string;
4
+ pause: string;
5
+ mute: string;
6
+ unmute: string;
7
+ playbackSpeed: string;
8
+ volume: string;
9
+ waveformSeek: string;
10
+ timeDisplay: string;
11
+ download: string;
12
+ copyLink: string;
13
+ delete: string;
14
+ more: string;
15
+ mobileActionsTitle: string;
16
+ };
17
+ export type MusicPlayerBarProps = Readonly<{
18
+ src: string;
19
+ duration?: number;
20
+ playbackRates?: readonly number[];
21
+ initialVolume?: number;
22
+ waveformHeights?: number[];
23
+ disable?: boolean;
24
+ showDelete?: boolean;
25
+ showDownload?: boolean;
26
+ showCopyLink?: boolean;
27
+ onDelete?: () => void;
28
+ onDownload?: () => void;
29
+ onCopyLink?: () => Promise<void> | void;
30
+ onCopyError?: () => void;
31
+ extraActions?: ReactNode;
32
+ }>;
33
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/MusicPlayerBar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as h } from "react/jsx-runtime";
2
2
  import { memo as b, useState as r } from "react";
3
- import { useDraggable as x } from "draggable-ui";
3
+ import { useDraggable as x } from "@layers-app/draggable-ui";
4
4
  import { clamp as y } from "lodash-es";
5
5
  import M from "./NavbarResizer.module.css.js";
6
6
  const N = b(
@@ -43,7 +43,7 @@ const g = ({
43
43
  d,
44
44
  {
45
45
  variant: "subtle",
46
- color: "gray",
46
+ color: "gray.3",
47
47
  size: "sm",
48
48
  onClick: () => i.skipTour(),
49
49
  "aria-label": "Skip tour",
@@ -1 +1 @@
1
- {"version":3,"file":"useColumnsResizing.d.ts","sourceRoot":"","sources":["../../../../src/components/table/hooks/useColumnsResizing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAW9C,eAAO,MAAM,kBAAkB,GAAI,UAAU,gBAAgB,CAAC,OAAO,CAAC;oBAczD,GAAG;;CAqEf,CAAC"}
1
+ {"version":3,"file":"useColumnsResizing.d.ts","sourceRoot":"","sources":["../../../../src/components/table/hooks/useColumnsResizing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAW9C,eAAO,MAAM,kBAAkB,GAAI,UAAU,gBAAgB,CAAC,OAAO,CAAC;oBAc/B,GAAG;;CAqEzC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { useRef as o } from "react";
2
- import { useDraggable as S } from "draggable-ui";
2
+ import { useDraggable as S } from "@layers-app/draggable-ui";
3
3
  import { clamp as E, isNil as T } from "lodash-es";
4
4
  import { TABLE_ATTRIBUTES as i } from "../constants.js";
5
5
  import { columnsMapReselect as g } from "../selectors.js";
@@ -0,0 +1,2 @@
1
+ export declare const isNoAccessError: (error?: unknown) => boolean;
2
+ //# sourceMappingURL=isNoAccessError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isNoAccessError.d.ts","sourceRoot":"","sources":["../../src/helpers/isNoAccessError.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,GAAI,QAAQ,OAAO,KAAG,OAUjD,CAAC"}
@@ -0,0 +1,7 @@
1
+ const t = (r) => {
2
+ const o = r;
3
+ return o?.status === 403 || o?.originalStatus === 403 || o?.data?.code === "ERR_403" || o?.data?.code === "ERR403" || o?.data?.code === "ERR_UNAUTHORIZED";
4
+ };
5
+ export {
6
+ t as isNoAccessError
7
+ };