Skip to content

Commit

Permalink
Merge stable branch
Browse files Browse the repository at this point in the history
* commit '86e2e6750192055bfba24abf62e227976be5e085':
  Release: uppy@3.25.3 (#5161)
  @uppy/image-editor: fix tooltips (#5156)
  Remove redundant `plugins` prop from examples (#5145)
  Remove `target` option from examples and document consistently (#5146)
  @uppy/core: make getObjectOfFilesPerState more efficient (#5155)
  Release: uppy@3.25.2 (#5151)
  Upgrade @transloadit/prettier-bytes (#5150)
  • Loading branch information
Murderlon committed May 14, 2024
2 parents 4890281 + 86e2e67 commit c4b24b3
Show file tree
Hide file tree
Showing 31 changed files with 364 additions and 286 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,21 @@ Released: 2024-03-28
- @uppy/vue: [v4.x] remove manual types (Antoine du Hamel / #4803)
- meta: prepare release workflow for beta versions (Antoine du Hamel)

## 3.25.3

Released: 2024-05-14

| Package | Version | Package | Version |
| ------------------ | ------- | ------------------ | ------- |
| @uppy/core | 3.11.3 | uppy | 3.25.3 |
| @uppy/image-editor | 2.4.6 | | |

- @uppy/image-editor: fix tooltips (Avneet Singh Malhotra / #5156)
- meta: Remove redundant `plugins` prop from examples (Merlijn Vos / #5145)
- @uppy/image-editor: Remove `target` option from examples and document consistently (Merlijn Vos / #5146)
- @uppy/core: make getObjectOfFilesPerState more efficient (Merlijn Vos / #5155)


## 3.25.2

Released: 2024-05-07
Expand Down
75 changes: 58 additions & 17 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/framework-integrations/react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function Component() {
// IMPORTANT: passing an initializer function to prevent Uppy from being reinstantiated on every render.
const [uppy] = useState(() => new Uppy().use(Webcam));

return <Dashboard uppy={uppy} plugins={['Webcam']} />;
return <Dashboard uppy={uppy} />;
}
```
Expand Down Expand Up @@ -175,7 +175,7 @@ function Component(props) {
uppy.getPlugin('Webcam').setOptions({ modes: props.webcamModes });
}, [props.webcamModes]);

return <Dashboard uppy={uppy} plugins={['Webcam']} />;
return <Dashboard uppy={uppy} />;
}
```
Expand Down
4 changes: 2 additions & 2 deletions docs/framework-integrations/svelte.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ instance can be passed into components as an `uppy` prop. Due to the way Svelte
handles reactivity, you can initialize Uppy the same way you would with vanilla
JavaScript.

```html
```svelte
<script>
import { Dashboard } from '@uppy/svelte';
import Uppy from '@uppy/core';
Expand All @@ -64,7 +64,7 @@ JavaScript.
const uppy = new Uppy().use(Webcam);
</script>
<main><Dashboard uppy={uppy} plugins={["Webcam"]} /></main>
<main><Dashboard uppy={uppy} /></main>
```

[svelte]: https://svelte.dev
2 changes: 1 addition & 1 deletion docs/framework-integrations/vue.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ JavaScript.
</script>

<template>
<Dashboard :uppy="uppy" :plugins="['Webcam']" />
<Dashboard :uppy="uppy" />
</template>
```

Expand Down
6 changes: 2 additions & 4 deletions docs/guides/migration-guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,14 @@ new Uppy()
companionAllowedHosts: COMPANION_ALLOWED_HOSTS,
})
.use(Webcam, {
target: Dashboard,
showVideoSourceDropdown: true,
showRecordingLength: true,
})
.use(Audio, {
target: Dashboard,
showRecordingLength: true,
})
.use(ScreenCapture, { target: Dashboard })
.use(ImageEditor, { target: Dashboard })
.use(ScreenCapture)
.use(ImageEditor)
.use(Transloadit, {
service: 'https://api2.transloadit.com',
async getAssemblyOptions(file) {
Expand Down
3 changes: 2 additions & 1 deletion docs/presets/remote-sources.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ default: `same-origin`).
#### `target`

DOM element, CSS selector, or plugin to place the drag and drop area into
(`string`, `Element`, `Function`, or `UIPlugin`, default: `Dashboard`).
(`string`, `Element`, `Function`, or `UIPlugin`, default:
[`Dashboard`](/docs/dashboard)).

[`request.credentials` value]:
https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials
11 changes: 5 additions & 6 deletions docs/sources/audio.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ yarn add @uppy/audio
import { Uppy, Dashboard, Audio } from "{{UPPY_JS_URL}}"
const uppy = new Uppy()
uppy.use(Dashboard, { inline: true, target: 'body' })
uppy.use(Audio, { target: Uppy.Dashboard })
uppy.use(Audio)
`}
</UppyCdnExample>
</TabItem>
Expand All @@ -67,9 +67,7 @@ import '@uppy/core/dist/style.min.css';
import '@uppy/dashboard/dist/style.min.css';
import '@uppy/audio/dist/style.min.css';

new Uppy()
.use(Dashboard, { inline: true, target: 'body' })
.use(Audio, { target: Dashboard });
new Uppy().use(Dashboard, { inline: true, target: 'body' }).use(Audio);
```

### API
Expand All @@ -87,8 +85,9 @@ Configures the title / name shown in the UI, for instance, on Dashboard tabs

#### `target`

DOM element, CSS selector, or plugin to place the audio into (`string` or
`Element`, default: `null`).
DOM element, CSS selector, or plugin to place the drag and drop area into
(`string`, `Element`, `Function`, or `UIPlugin`, default:
[`Dashboard`](/docs/dashboard)).

#### `showAudioSourceDropdown`

Expand Down
10 changes: 5 additions & 5 deletions docs/sources/companion-plugins/box.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,9 @@ import Box from '@uppy/box';
import '@uppy/core/dist/style.min.css';
import '@uppy/dashboard/dist/style.min.css';

new Uppy().use(Dashboard, { inline: true, target: '#dashboard' }).use(Box, {
target: Dashboard,
companionUrl: 'https://your-companion.com',
});
new Uppy()
.use(Dashboard, { inline: true, target: '#dashboard' })
.use(Box, { companionUrl: 'https://your-companion.com' });
```

### Use in Companion
Expand Down Expand Up @@ -150,7 +149,8 @@ Title / name shown in the UI, such as Dashboard tabs (`string`, default:
#### `target`

DOM element, CSS selector, or plugin to place the drag and drop area into
(`string` or `Element`, default: `null`).
(`string`, `Element`, `Function`, or `UIPlugin`, default:
[`Dashboard`](/docs/dashboard)).

#### `companionUrl`

Expand Down
10 changes: 5 additions & 5 deletions docs/sources/companion-plugins/dropbox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,9 @@ import Dropbox from '@uppy/dropbox';
import '@uppy/core/dist/style.min.css';
import '@uppy/dashboard/dist/style.min.css';

new Uppy().use(Dashboard, { inline: true, target: '#dashboard' }).use(Dropbox, {
target: Dashboard,
companionUrl: 'https://your-companion.com',
});
new Uppy()
.use(Dashboard, { inline: true, target: '#dashboard' })
.use(Dropbox, { companionUrl: 'https://your-companion.com' });
```

### Use in Companion
Expand Down Expand Up @@ -149,7 +148,8 @@ Title / name shown in the UI, such as Dashboard tabs (`string`, default:
#### `target`

DOM element, CSS selector, or plugin to place the drag and drop area into
(`string` or `Element`, default: `null`).
(`string`, `Element`, `Function`, or `UIPlugin`, default:
[`Dashboard`](/docs/dashboard)).

#### `companionUrl`

Expand Down
8 changes: 3 additions & 5 deletions docs/sources/companion-plugins/facebook.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ import '@uppy/dashboard/dist/style.min.css';

new Uppy()
.use(Dashboard, { inline: true, target: '#dashboard' })
.use(Facebook, {
target: Dashboard,
companionUrl: 'https://your-companion.com',
});
.use(Facebook, { companionUrl: 'https://your-companion.com' });
```

### Use in Companion
Expand Down Expand Up @@ -148,7 +145,8 @@ Title / name shown in the UI, such as Dashboard tabs (`string`, default:
#### `target`

DOM element, CSS selector, or plugin to place the drag and drop area into
(`string` or `Element`, default: `null`).
(`string`, `Element`, `Function`, or `UIPlugin`, default:
[`Dashboard`](/docs/dashboard)).

#### `companionUrl`

Expand Down
8 changes: 3 additions & 5 deletions docs/sources/companion-plugins/google-drive.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ import '@uppy/dashboard/dist/style.min.css';

new Uppy()
.use(Dashboard, { inline: true, target: '#dashboard' })
.use(GoogleDrive, {
target: Dashboard,
companionUrl: 'https://your-companion.com',
});
.use(GoogleDrive, { companionUrl: 'https://your-companion.com' });
```

### Use in Companion
Expand Down Expand Up @@ -152,7 +149,8 @@ Title / name shown in the UI, such as Dashboard tabs (`string`, default:
#### `target`

DOM element, CSS selector, or plugin to place the drag and drop area into
(`string` or `Element`, default: `null`).
(`string`, `Element`, `Function`, or `UIPlugin`, default:
[`Dashboard`](/docs/dashboard)).

#### `companionUrl`

Expand Down
8 changes: 3 additions & 5 deletions docs/sources/companion-plugins/instagram.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ import '@uppy/dashboard/dist/style.min.css';

new Uppy()
.use(Dashboard, { inline: true, target: '#dashboard' })
.use(Instagram, {
target: Dashboard,
companionUrl: 'https://your-companion.com',
});
.use(Instagram, { companionUrl: 'https://your-companion.com' });
```

### Use in Companion
Expand Down Expand Up @@ -142,7 +139,8 @@ Title / name shown in the UI, such as Dashboard tabs (`string`, default:
#### `target`

DOM element, CSS selector, or plugin to place the drag and drop area into
(`string` or `Element`, default: `null`).
(`string`, `Element`, `Function`, or `UIPlugin`, default:
[`Dashboard`](/docs/dashboard)).

#### `companionUrl`

Expand Down
8 changes: 3 additions & 5 deletions docs/sources/companion-plugins/onedrive.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ import '@uppy/dashboard/dist/style.min.css';

new Uppy()
.use(Dashboard, { inline: true, target: '#dashboard' })
.use(OneDrive, {
target: Dashboard,
companionUrl: 'https://your-companion.com',
});
.use(OneDrive, { companionUrl: 'https://your-companion.com' });
```

### Use in Companion
Expand Down Expand Up @@ -142,7 +139,8 @@ Title / name shown in the UI, such as Dashboard tabs (`string`, default:
#### `target`

DOM element, CSS selector, or plugin to place the drag and drop area into
(`string` or `Element`, default: `null`).
(`string`, `Element`, `Function`, or `UIPlugin`, default:
[`Dashboard`](/docs/dashboard)).

#### `companionUrl`

Expand Down
8 changes: 3 additions & 5 deletions docs/sources/companion-plugins/unsplash.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ import '@uppy/dashboard/dist/style.min.css';

new Uppy()
.use(Dashboard, { inline: true, target: '#dashboard' })
.use(Unsplash, {
target: Dashboard,
companionUrl: 'https://your-companion.com',
});
.use(Unsplash, { companionUrl: 'https://your-companion.com' });
```

### Use in Companion
Expand Down Expand Up @@ -127,7 +124,8 @@ Title / name shown in the UI, such as Dashboard tabs (`string`, default:
#### `target`

DOM element, CSS selector, or plugin to place the drag and drop area into
(`string` or `Element`, default: `null`).
(`string`, `Element`, `Function`, or `UIPlugin`, default:
[`Dashboard`](/docs/dashboard)).

#### `companionUrl`

Expand Down
10 changes: 5 additions & 5 deletions docs/sources/companion-plugins/url.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,9 @@ import Url from '@uppy/url';
import '@uppy/core/dist/style.min.css';
import '@uppy/dashboard/dist/style.min.css';

new Uppy().use(Dashboard, { inline: true, target: '#dashboard' }).use(Url, {
target: Dashboard,
companionUrl: 'https://your-companion.com',
});
new Uppy()
.use(Dashboard, { inline: true, target: '#dashboard' })
.use(Url, { companionUrl: 'https://your-companion.com' });
```

### Use in Companion
Expand All @@ -110,7 +109,8 @@ Title / name shown in the UI, such as Dashboard tabs (`string`, default:
#### `target`

DOM element, CSS selector, or plugin to place the drag and drop area into
(`string` or `Element`, default: `null`).
(`string`, `Element`, `Function`, or `UIPlugin`, default:
[`Dashboard`](/docs/dashboard)).

#### `companionUrl`

Expand Down
10 changes: 5 additions & 5 deletions docs/sources/companion-plugins/zoom.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,9 @@ import Zoom from '@uppy/zoom';
import '@uppy/core/dist/style.min.css';
import '@uppy/dashboard/dist/style.min.css';

new Uppy().use(Dashboard, { inline: true, target: '#dashboard' }).use(Zoom, {
target: Dashboard,
companionUrl: 'https://your-companion.com',
});
new Uppy()
.use(Dashboard, { inline: true, target: '#dashboard' })
.use(Zoom, { companionUrl: 'https://your-companion.com' });
```

### Use in Companion
Expand Down Expand Up @@ -121,7 +120,8 @@ Title / name shown in the UI, such as Dashboard tabs (`string`, default:
#### `target`

DOM element, CSS selector, or plugin to place the drag and drop area into
(`string` or `Element`, default: `null`).
(`string`, `Element`, `Function`, or `UIPlugin`, default:
[`Dashboard`](/docs/dashboard)).

#### `companionUrl`

Expand Down
11 changes: 5 additions & 6 deletions docs/sources/screen-capture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ yarn add @uppy/screen-capture
import { Uppy, Dashboard, ScreenCapture } from "{{UPPY_JS_URL}}"
const uppy = new Uppy()
uppy.use(Dashboard, { inline: true, target: 'body' })
uppy.use(ScreenCapture, { target: Uppy.Dashboard })
uppy.use(ScreenCapture)
`}
</UppyCdnExample>
</TabItem>
Expand All @@ -79,9 +79,7 @@ import '@uppy/core/dist/style.min.css';
import '@uppy/dashboard/dist/style.min.css';
import '@uppy/screen-capture/dist/style.min.css';

new Uppy()
.use(Dashboard, { inline: true, target: 'body' })
.use(ScreenCapture, { target: Dashboard });
new Uppy().use(Dashboard, { inline: true, target: 'body' }).use(ScreenCapture);
```

### API
Expand All @@ -99,8 +97,9 @@ Configures the title / name shown in the UI, for instance, on Dashboard tabs

#### `target`

DOM element, CSS selector, or plugin to place the screen capture into (`string`
or `Element`, default: `null`).
DOM element, CSS selector, or plugin to place the drag and drop area into
(`string`, `Element`, `Function`, or `UIPlugin`, default:
[`Dashboard`](/docs/dashboard)).

#### `displayMediaConstraints`

Expand Down
11 changes: 5 additions & 6 deletions docs/sources/webcam.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ yarn add @uppy/webcam
import { Uppy, Dashboard, Webcam } from "{{UPPY_JS_URL}}"
const uppy = new Uppy()
uppy.use(Dashboard, { inline: true, target: 'body' })
uppy.use(Webcam, { target: Uppy.Dashboard })
uppy.use(Webcam)
`}
</UppyCdnExample>
</TabItem>
Expand All @@ -77,9 +77,7 @@ import '@uppy/core/dist/style.min.css';
import '@uppy/dashboard/dist/style.min.css';
import '@uppy/webcam/dist/style.min.css';

new Uppy()
.use(Dashboard, { inline: true, target: 'body' })
.use(Webcam, { target: Dashboard });
new Uppy().use(Dashboard, { inline: true, target: 'body' }).use(Webcam);
```

## API
Expand All @@ -92,8 +90,9 @@ A unique identifier for this plugin (`string`, default: `'Webcam'`).

#### `target`

DOM element, CSS selector, or plugin to place the webcam into (`string` or
`Element`, default: `null`).
DOM element, CSS selector, or plugin to place the drag and drop area into
(`string`, `Element`, `Function`, or `UIPlugin`, default:
[`Dashboard`](/docs/dashboard)).

#### `countdown`

Expand Down

0 comments on commit c4b24b3

Please sign in to comment.