Skip to content

Commit ff7bc6a

Browse files
committed
Merge branch 'main' into ai-image-generator
* main: [ci] release (#5997) Use assembly_ssl_url for final status fetch (#5996) [ci] release (#5988) @uppy/svelte: fix props reactivity (#5991) Improve changeset again Improve a changeset fixup! Use workspace:* for all packages in packages/uppy Use workspace:* for all packages in packages/uppy Re-use types from the Transloadit node-sdk (#5992)
2 parents 000b8c9 + 98d8d1d commit ff7bc6a

File tree

21 files changed

+1732
-281
lines changed

21 files changed

+1732
-281
lines changed

.changeset/swift-pens-flow.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

BUNDLE-README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Hi, thanks for trying out the bundled version of the Uppy File Uploader. You can
44
use this from a CDN
5-
(`<script src="https://releases.transloadit.com/uppy/v5.1.2/uppy.min.js"></script>`)
5+
(`<script src="https://releases.transloadit.com/uppy/v5.1.4/uppy.min.js"></script>`)
66
or bundle it with your webapp.
77

88
Note that the recommended way to use Uppy is to install it with yarn/npm and use

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ npm install @uppy/core @uppy/dashboard @uppy/tus
103103
```
104104

105105
Add CSS
106-
[uppy.min.css](https://releases.transloadit.com/uppy/v5.1.2/uppy.min.css),
106+
[uppy.min.css](https://releases.transloadit.com/uppy/v5.1.4/uppy.min.css),
107107
either to your HTML page’s `<head>` or include in JS, if your bundler of choice
108108
supports it.
109109

@@ -117,7 +117,7 @@ CDN. In that case `Uppy` will attach itself to the global `window.Uppy` object.
117117
```html
118118
<!-- 1. Add CSS to `<head>` -->
119119
<link
120-
href="https://releases.transloadit.com/uppy/v5.1.2/uppy.min.css"
120+
href="https://releases.transloadit.com/uppy/v5.1.4/uppy.min.css"
121121
rel="stylesheet"
122122
/>
123123

@@ -128,7 +128,7 @@ CDN. In that case `Uppy` will attach itself to the global `window.Uppy` object.
128128
Uppy,
129129
Dashboard,
130130
Tus,
131-
} from 'https://releases.transloadit.com/uppy/v5.1.2/uppy.min.mjs'
131+
} from 'https://releases.transloadit.com/uppy/v5.1.4/uppy.min.mjs'
132132
133133
const uppy = new Uppy()
134134
uppy.use(Dashboard, { target: '#files-drag-drop' })
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<script lang="ts">
2+
import Uppy from '@uppy/core'
3+
import Dashboard from '@uppy/svelte/dashboard'
4+
import StatusBar from '@uppy/svelte/status-bar'
5+
6+
import '@uppy/core/css/style.css'
7+
import '@uppy/dashboard/css/style.css'
8+
import '@uppy/status-bar/css/style.css'
9+
10+
const uppy = new Uppy()
11+
uppy.addFile(new File(['hello world'], 'hello.txt'))
12+
let disabled = false
13+
let hideUploadButton = false
14+
</script>
15+
16+
<main class="p-5 max-w-xl mx-auto">
17+
<button onclick={() => (disabled = !disabled)}>Toggle dashboard</button>
18+
<Dashboard props={{disabled: disabled}} uppy={uppy} />
19+
<button onclick={() => (hideUploadButton = !hideUploadButton)}>Toggle statusbar</button>
20+
<div id="statusbar-container">
21+
<StatusBar props={{ hideUploadButton }} uppy={uppy} />
22+
</div>
23+
</main>

examples/sveltekit/test/index.test.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { userEvent } from '@vitest/browser/context'
22
import { describe, expect, test } from 'vitest'
33
import { render } from 'vitest-browser-svelte'
4+
import PropsReactivity from '../src/components/test/props-reactivity.svelte'
45
import App from '../src/routes/+page.svelte'
56

67
const createMockFile = (name: string, type: string, size: number = 1024) => {
@@ -124,3 +125,27 @@ describe('RemoteSource Component', () => {
124125
await expect.element(loginButton).toBeInTheDocument()
125126
})
126127
})
128+
129+
test('Dashboard reacts to prop changes', async () => {
130+
const screen = render(PropsReactivity)
131+
const toggleButton = screen.getByText('Toggle dashboard')
132+
const dashboard = screen.container.querySelector('.uppy-Dashboard')
133+
134+
expect(dashboard).toBeTruthy()
135+
expect(dashboard?.ariaDisabled).toEqual('false')
136+
await userEvent.click(toggleButton)
137+
expect(dashboard?.ariaDisabled).toEqual('true')
138+
})
139+
140+
test('StatusBar reacts to prop changes', async () => {
141+
const screen = render(PropsReactivity)
142+
const toggleButton = screen.getByText('Toggle statusbar')
143+
144+
expect(
145+
screen.container.querySelector('#statusbar-container .uppy-c-btn-primary'),
146+
).toBeVisible()
147+
await userEvent.click(toggleButton)
148+
expect(
149+
screen.container.querySelector('#statusbar-container .uppy-c-btn-primary'),
150+
).toEqual(null)
151+
})

packages/@uppy/components/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @uppy/components
22

3+
## 1.0.3
4+
5+
### Patch Changes
6+
7+
- 34639ba: add imageThumbnail prop to FilesList/FilesGrid
8+
39
## 1.0.2
410

511
### Patch Changes

packages/@uppy/components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@uppy/components",
33
"description": "Headless Uppy components, made in Preact",
4-
"version": "1.0.2",
4+
"version": "1.0.3",
55
"license": "MIT",
66
"type": "module",
77
"sideEffects": [

packages/@uppy/svelte/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @uppy/svelte
22

3+
## 5.0.2
4+
5+
### Patch Changes
6+
7+
- da754b7: Fix props reactivity. Now when the value of a prop you pass to a component changes, it is actually picked up.
8+
- Updated dependencies [34639ba]
9+
- @uppy/components@1.0.3
10+
311
## 5.0.1
412

513
### Patch Changes

packages/@uppy/svelte/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@uppy/svelte",
3-
"version": "5.0.1",
3+
"version": "5.0.2",
44
"description": "Uppy plugin that helps integrate Uppy into your Svelte project.",
55
"type": "module",
66
"sideEffects": [

packages/@uppy/svelte/src/lib/components/Dashboard.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ $: {
4040
...props,
4141
target: container,
4242
} satisfies DashboardOptions<M, B>;
43-
uppy.setOptions(options);
43+
plugin?.setOptions(options);
4444
}
4545
</script>
4646

0 commit comments

Comments
 (0)