@moises.ai/design-system 3.9.0 → 3.9.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.
- package/dist/index.js +224 -224
- package/package.json +1 -1
- package/src/components/ProjectsList/ProjectItem/ProjectItem.jsx +1 -1
- package/src/components/ProjectsList/ProjectTrackVoice/ProjectTrackVoice.jsx +4 -4
- package/src/components/ProjectsList/ProjectsList.stories.jsx +4 -3
- package/src/components/ProjectsList/utils-stories.js +1 -6
package/package.json
CHANGED
|
@@ -115,7 +115,7 @@ const ProjectItem = ({
|
|
|
115
115
|
|
|
116
116
|
{allTracks.length > 0 && (
|
|
117
117
|
<Flex direction="column" gap="1">
|
|
118
|
-
{typeof children === 'function' ? children(tracks) : children}
|
|
118
|
+
{typeof children === 'function' ? children({ projectId: id, tracks }) : children}
|
|
119
119
|
|
|
120
120
|
<Flex direction="row" gap="3" p="2" align="center" justify="center">
|
|
121
121
|
<Button variant="ghost" color="gray" style={{ flex: '1' }}
|
|
@@ -10,7 +10,7 @@ const ProjectTrackVoice = ({
|
|
|
10
10
|
...props
|
|
11
11
|
}) => {
|
|
12
12
|
const { onClickTrack } = useContext(ProjectsListContext)
|
|
13
|
-
const { id, title, cover, transfers, audioUrl, onChangeTransfer } = props
|
|
13
|
+
const { projectId, id, title, cover, transfers, audioUrl, onChangeTransfer } = props
|
|
14
14
|
|
|
15
15
|
const hasTransfers = useMemo(() => transfers && transfers.length > 0, [transfers])
|
|
16
16
|
|
|
@@ -24,12 +24,12 @@ const ProjectTrackVoice = ({
|
|
|
24
24
|
|
|
25
25
|
const handleChangeTransfer = useCallback((value) => {
|
|
26
26
|
setpitchShiftSelected(value)
|
|
27
|
-
onChangeTransfer?.({
|
|
27
|
+
onChangeTransfer?.(projectId, {
|
|
28
28
|
id,
|
|
29
29
|
title,
|
|
30
30
|
audioUrl: getAudioUrl(value),
|
|
31
31
|
})
|
|
32
|
-
}, [onChangeTransfer, id, title, transfers])
|
|
32
|
+
}, [onChangeTransfer, projectId, id, title, transfers])
|
|
33
33
|
|
|
34
34
|
const handleClickTrack = useCallback((e) => {
|
|
35
35
|
e.stopPropagation()
|
|
@@ -72,7 +72,7 @@ const ProjectTrackVoice = ({
|
|
|
72
72
|
</Text>
|
|
73
73
|
</Flex>
|
|
74
74
|
|
|
75
|
-
{hasTransfers && (
|
|
75
|
+
{hasTransfers && transfers.length > 1 && (
|
|
76
76
|
<NumberPicker
|
|
77
77
|
min={min}
|
|
78
78
|
max={max}
|
|
@@ -206,8 +206,8 @@ export const WithTrackVoice = {
|
|
|
206
206
|
onInsertAllTracks: (tracks) => {
|
|
207
207
|
console.log('insert-all-tracks', tracks)
|
|
208
208
|
},
|
|
209
|
-
onChangeTransfer: (track) => {
|
|
210
|
-
console.log('change-transfer', track)
|
|
209
|
+
onChangeTransfer: (projectId, track) => {
|
|
210
|
+
console.log('change-transfer', projectId, track)
|
|
211
211
|
},
|
|
212
212
|
},
|
|
213
213
|
render: (args) => {
|
|
@@ -219,9 +219,10 @@ export const WithTrackVoice = {
|
|
|
219
219
|
onInsertAllTracks={args.onInsertAllTracks}
|
|
220
220
|
onProjectClick={args.onProjectClick}
|
|
221
221
|
>
|
|
222
|
-
{(tracks) =>
|
|
222
|
+
{({ projectId, tracks }) =>
|
|
223
223
|
tracks.map((track) => (
|
|
224
224
|
<ProjectsList.TrackVoice
|
|
225
|
+
projectId={projectId}
|
|
225
226
|
key={track.id}
|
|
226
227
|
{...track}
|
|
227
228
|
onChangeTransfer={args.onChangeTransfer}
|
|
@@ -211,7 +211,7 @@ export const projects = [
|
|
|
211
211
|
|
|
212
212
|
export const projectsVoiceStudio = [
|
|
213
213
|
{
|
|
214
|
-
"id": "3842c898-9e0c-41e8-8927-
|
|
214
|
+
"id": "3842c898-9e0c-41e8-8927-7d9f1111111167c50bc6",
|
|
215
215
|
"title": "vocals - Billie Bossa Nova",
|
|
216
216
|
"artist": "Billie Bossa Nova",
|
|
217
217
|
"cover": null,
|
|
@@ -266,11 +266,6 @@ export const projectsVoiceStudio = [
|
|
|
266
266
|
"cover": "https://picsum.photos/103/103",
|
|
267
267
|
"type": "voice",
|
|
268
268
|
"transfers": [
|
|
269
|
-
{
|
|
270
|
-
"id": "b9470aco6y4a9dlef0c035-0",
|
|
271
|
-
"pitchShift": "-10",
|
|
272
|
-
"audioUrl": "https://d3-stage.moises.ai/v3/download/moises-stage--tasks-us-east1/operations/VOICETRANSFER_A/0b926e1f-52ce-4581-9f76-09545eed1c61/vocals.m4"
|
|
273
|
-
},
|
|
274
269
|
{
|
|
275
270
|
"id": "b9470aco6y4a9dlef0c035-1",
|
|
276
271
|
"pitchShift": "-11",
|