mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-18 00:55:35 +00:00
287 commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
9d87b9eab1
|
[ci] release (#6166)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @uppy/components@1.2.0 ### Minor Changes - |
||
|
|
37f69d088d
|
Revert "[ci] release (#6162)"
This reverts commit
|
||
|
|
671e6b26f4
|
[ci] release (#6162)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @uppy/components@1.2.0 ### Minor Changes - |
||
|
|
c0a8776484
|
Revert "[ci] release (#6153)"
This reverts commit
|
||
|
|
0ee8fef148
|
[ci] release (#6153)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @uppy/components@1.2.0 ### Minor Changes - |
||
|
|
850c1cb1c5
|
Add useImageEditor (#6122)
- Create image editor abstraction in `@uppy/components`
- Refactor `Editor` (Preact) and `ImageEditor` (Uppy plugin) to put all
methods in the Uppy plugin class so they can be reused by the headless
abstraction
- Create framework hooks for React, Vue, Svelte
- Update all examples to showcase the new hook
- Symlink the `cropper.scss` (just regular CSS) from
`@uppy/image-editor` into `@uppy/components`, update `build:css` in all
framework packages to copy that file too into their own `dist/` output.
- cropper-js needs basic CSS to do the rotations and stuff which would
be very tedious to write yourself so we ship that CSS file to consumers
too so they can just import it.
- Fix memory leak where we created the image on each render inside the
original Preact plugin UI
```ts
import type { UppyFile } from '@uppy/core'
import { useImageEditor } from '@uppy/react'
interface ImageEditorProps {
file: UppyFile<any, any>
close: () => void
}
export function ImageEditor({ file, close }: ImageEditorProps) {
const {
state,
getImageProps,
getSaveButtonProps,
getCancelButtonProps,
getRotateButtonProps,
getFlipHorizontalButtonProps,
getZoomButtonProps,
getCropSquareButtonProps,
getCropLandscapeButtonProps,
getCropPortraitButtonProps,
getResetButtonProps,
getRotationSliderProps,
} = useImageEditor({ file })
return (
<div className="p-4 max-w-2xl w-full">
<div className="flex justify-between items-center mb-4">
<h2 className="text-xl font-bold">Edit Image</h2>
<button
type="button"
onClick={close}
className="text-gray-500 hover:text-gray-700"
>
✕
</button>
</div>
<div className="mb-4">
{/* biome-ignore lint/a11y/useAltText: alt is provided by getImageProps() */}
<img
className="w-full max-h-[400px] rounded-lg border-2"
{...getImageProps()}
/>
</div>
<div className="mb-4">
<label className="block text-sm font-medium mb-2">
Fine Rotation: {state.angle}°
<input className="w-full mt-1" {...getRotationSliderProps()} />
</label>
</div>
<div className="flex gap-2 flex-wrap mb-4">
<button
className="bg-gray-200 px-3 py-1 rounded disabled:opacity-50"
{...getRotateButtonProps(-90)}
>
↶ -90°
</button>
<button
className="bg-gray-200 px-3 py-1 rounded disabled:opacity-50"
{...getRotateButtonProps(90)}
>
↷ +90°
</button>
<button
className="bg-gray-200 px-3 py-1 rounded disabled:opacity-50"
{...getFlipHorizontalButtonProps()}
>
⇆ Flip
</button>
<button
className="bg-gray-200 px-3 py-1 rounded disabled:opacity-50"
{...getZoomButtonProps(0.1)}
>
+ Zoom
</button>
<button
className="bg-gray-200 px-3 py-1 rounded disabled:opacity-50"
{...getZoomButtonProps(-0.1)}
>
- Zoom
</button>
</div>
<div className="flex gap-2 flex-wrap mb-4">
<button
className="bg-gray-200 px-3 py-1 rounded disabled:opacity-50"
{...getCropSquareButtonProps()}
>
1:1
</button>
<button
className="bg-gray-200 px-3 py-1 rounded disabled:opacity-50"
{...getCropLandscapeButtonProps()}
>
16:9
</button>
<button
className="bg-gray-200 px-3 py-1 rounded disabled:opacity-50"
{...getCropPortraitButtonProps()}
>
9:16
</button>
<button
className="bg-gray-200 px-3 py-1 rounded disabled:opacity-50"
{...getResetButtonProps()}
>
Reset
</button>
</div>
<div className="flex gap-4 justify-end">
<button
className="bg-gray-500 text-white px-4 py-2 rounded-md"
{...getCancelButtonProps({ onClick: close })}
>
Cancel
</button>
<button
className="bg-green-500 text-white px-4 py-2 rounded-md disabled:opacity-50 disabled:bg-green-300"
{...getSaveButtonProps({ onClick: close })}
>
Save
</button>
</div>
</div>
)
}
export default ImageEditor
```
https://github.com/user-attachments/assets/4b0a99cc-8489-41a2-aa3b-ce88110025bf
---------
Co-authored-by: Prakash <qxprakash@gmail.com>
|
||
|
|
fd8f54f542
|
build(deps): bump preact from 10.26.9 to 10.26.10 (#6123)
Bumps [preact](https://github.com/preactjs/preact) from 10.26.9 to 10.26.10. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/preactjs/preact/releases">preact's releases</a>.</em></p> <blockquote> <h2>10.26.10</h2> <h2>Fixes</h2> <ul> <li>Enforce strict equality for VNode object constructors</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
79e6460a6c
|
Make Generics Optional in uppy.getPlugin (#6057)
fixes #6024. ### Problem - `getPlugin()` defaults to `UnknownPlugin`, so methods like `openModal` are not visible , since core is not aware of that plugin type ### Proposed change - Introduce a types-only registry in core: - `export interface PluginTypeRegistry<M extends Meta, B extends Body> {}` - Overload `getPlugin` to return a precise type when the id is a known key of the registry. - add `Dashboard` to PluginTypeRegistry through module augmentation: - `'Dashboard': Dashboard<M, B>`. - When a project imports from `@uppy/dashboard`, its module augmentation extends PluginTypeRegistry, adding the correct type into it - I've added Tests , kept them in a separate file so it's easier to review , once this approach gets approved I'll add them to `Uppy.test.ts` Once this PR gets a positive review I'll add this for other plugins , currently only added for `@uppy/dashboard` **Build with Local tarball can be checked here** https://stackblitz.com/~/github.com/qxprakash/uppy-type-test?file=type_test.ts |
||
|
|
b1e33bcef7
|
[ci] release (#6046)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @uppy/provider-views@5.1.2 ### Patch Changes - |
||
|
|
16aa6fe941
|
@uppy/react: export useUppyContext (#6044)
Fixes #6043 |
||
|
|
76abdfb325
|
[ci] release (#6029)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @uppy/angular@1.1.0 ### Minor Changes - |
||
|
|
72d2d68ea3
|
Fix various deps and peer deps in packages (#6030)
**Fixes**
- `@uppy/components` incorrectly had a lot of packages in `dependencies`
while they should be `peerDependencies`. Also removed `remote-sources`
completely as this drags in a lot of plugins and we don't even need it
there.
- `@uppy/{react,vue,svelte}` now has to have the same `peerDependencies`
as `components` as the requirement has been moved up. We also mark them
as optional, they are only needed if you use a hook such as `useWebcam`
needing `@uppy/webcam`.
- Remove `companion-client` and `provider-views` from `transloadit`.
Those are never used by the package.
- Remove `@uppy/utils` from `@uppy/angular` and `@uppy/react`, we can
just use imports from `core`
- Place `@uppy/status-bar` back in peer deps. This is critical but
forgotten when status bar was put back inside frameworks.
**Implications**
- Moving peer deps to deps in `@uppy/components` now requires people to
install these dependencies. However, they kind of had to anyway before
as we require people to install the plugin on uppy (`.use(Webcam')`) if
you want to use `useWebcam` and if you try to import a dep you did not
install they would have gotten an error already.
- Note: this is not the same situation as with importing dashboard
component from @uppy/react which causes a runtime crash because
@uppy/dashboard is missing. In this case we only depend on _types_, so
we don't have this problem.
|
||
|
|
86f353d2fe
|
@uppy/react: remove dashboard export (#6036)
No need to export it from index.ts, since it’s already exported through the export maps. Also, it’s an optional peer dependency, we probably missed this in #5830 , though this might count as a breaking change now ☹️ |
||
|
|
2509266130
|
Revert "[ci] release (#5973)"
This reverts commit
|
||
|
|
a45cd87d39
|
[ci] release (#5973)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @uppy/angular@1.1.0 ### Minor Changes - |
||
|
|
92a0a0d2b8
|
add back framework wrappers for @uppy/status-bar (#5948)
- added `react` `vue` `svelte` `angular` framwork wrappers for `@uppy/status-bar` - `git add -f packages/@uppy/angular/projects/uppy/angular/src/lib/components/status-bar/` because https://transloadit.slack.com/archives/C0FMW9PSB/p1755632185831369?thread_ts=1755526948.473969&cid=C0FMW9PSB |
||
|
|
54ee01105d
|
[ci] release (#5939)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @uppy/golden-retriever@5.1.0 ### Minor Changes - |
||
|
|
975317dd17
|
remove main from package.json (#5950)
redo of #5943 , forgot to add changesets , reverted in #5949 |
||
|
|
d65e6e4179
|
Revert "packages/@uppy/* : remove "main" from package.json (#5943)" (#5949)
This reverts commit
|
||
|
|
2117874073
|
packages/@uppy/* : remove "main" from package.json (#5943)
- The blocker was `@uppy/angular` — its build was failing because it
could not resolve modules and types for its dependencies
(`@uppy/dashboard`, `@uppy/utils`, `@uppy/provider-views`,
`@uppy/core`).
```typescript
------------------------------------------------------------------------------
Building entry point '@uppy/angular'
------------------------------------------------------------------------------
✖ Compiling with Angular sources in Ivy partial compilation mode.
../dashboard/lib/Dashboard.d.ts:1:106 - error TS2307: Cannot find module '@uppy/core' or its corresponding type declarations.
1 import type { Body, DefinePluginOpts, Meta, State, UIPluginOptions, UnknownPlugin, Uppy, UppyFile } from '@uppy/core';
~~~~~~~~~~~~
../dashboard/lib/Dashboard.d.ts:2:26 - error TS2307: Cannot find module '@uppy/core' or its corresponding type declarations.
2 import { UIPlugin } from '@uppy/core';
~~~~~~~~~~~~
../dashboard/lib/Dashboard.d.ts:3:35 - error TS2307: Cannot find module '@uppy/provider-views' or its corresponding type declarations.
```
Angular (TypeScript with moduleResolution: node) required a "main" or
"types" field in each dependency’s package.json, and ignored their
"exports" map.
|
||
|
|
075636a3b3
|
remove react h (#5938)
it was added in #5935 but no explanation of why. if you look at the build output of for example `packages/@uppy/react/lib/headless/generated/Dropzone.js`: ```js import { jsx as _jsx } from "react/jsx-runtime"; // This file was generated by build-components.mjs // ANY EDITS WILL BE OVERWRITTEN! import { Dropzone as PreactDropzone, } from '@uppy/components'; import { h as preactH, render as preactRender } from 'preact'; // biome-ignore lint/correctness/noUnusedImports: it's needed import { createElement as h, useContext, useEffect, useRef } from 'react'; import { UppyContext } from '../UppyContextProvider.js'; export default function Dropzone(props) { const ref = useRef(null); const ctx = useContext(UppyContext); useEffect(() => { if (ref.current) { preactRender(preactH(PreactDropzone, { ...props, ctx, }), ref.current); } }, [ctx, props]); return _jsx("div", { ref: ref }); } ``` as can be seen there is no usage of `h`. `import { jsx as _jsx } from "react/jsx-runtime";` is being injected for React JSX. see also https://github.com/transloadit/uppy/pull/5896#issuecomment-3169210799 |
||
|
|
d4bdb463c1
|
[ci] release (#5936)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @uppy/companion@6.0.1 ### Patch Changes - |
||
|
|
49522ec5cb
|
Remove preact/compat (#5935)
We drag it in unneccesarily in the bundle and it can cause JSX clashes in React apps with `"jsx": "preserve"` in their `tsconfig.json` (https://github.com/preactjs/preact/issues/4908) - Remove `@types/react` from companion (unused) - Fix tsconfig's for @uppy/utils (build was fine, but editor diagnostics weren't) |
||
|
|
3d27be16ed
|
[ci] release (#5932)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @uppy/drag-drop@5.0.0 ### Major Changes - |
||
|
|
a063bc3e4a
|
@uppy/vue,@uppy/react: remove status-bar from export map (#5926)
fixes #5923 --------- Co-authored-by: Merlijn Vos <merlijn@soverin.net> |
||
|
|
e183da8de9
|
[ci] release (#5918)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @uppy/audio@3.0.0 ### Major Changes - |
||
|
|
7765506138 | update use external sync store , fix yarn warnings | ||
|
|
6a33652458 | Merge branch 'main' of https://github.com/transloadit/uppy into 5.0 | ||
|
|
d301c01d6a
|
@uppy/utils: update export maps (#5900)
- cleanup `@uppy/utils ` removed unused / redundant modules . - migrated modules and tests from `.js` to `.ts` - removed all the nested export paths - updated `@uppy/utils` import paths for all packages - `@uppy/angular` is still failing while running`yarn build` , I'm looking into it. --------- Co-authored-by: Merlijn Vos <merlijn@soverin.net> |
||
|
|
d31c90e443
|
Run biome check on main (#5896)
this time on main closes #5891 also: fix a11y tabIndex (key event handler) |
||
|
|
e8692434d6
|
Merge @uppy/status-bar into @uppy/dashboard (#5825)
This pull request removes the `@uppy/status-bar` plugin and integrates it directly into the `@uppy/dashboard` plugin. ### Breakdown of the merge - The `StatusBar` class was refactored from a `UIPlugin` into a Preact Class component. - The `locale` strings from status-bar were merged into dashboard's locale file. - The Dashboard plugin now integrates the `StatusBar` component directly, controlling its visibility and passing down all props ( i.e. options that were specific to StatusBar (like showProgressDetails). - The standalone StatusBar wrappers for React , Vue , svelte , Angular were removed. - every reference to the @uppy/status-bar package from the monorepo (including in package.json and tsconfig.json files). - fixed failing tests and removed redundant tests. --------- Co-authored-by: Mikael Finstad <finstaden@gmail.com> Co-authored-by: Merlijn Vos <merlijn@soverin.net> |
||
|
|
62cf5bbb14
|
[ci] release (#5867)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @uppy/angular@0.9.0 ### Minor Changes - |
||
|
|
1b1a9e3591
|
Add "files" to all package.json's (#5852)
Closes #5865 I noticed we are publishing all files, we should filter them. npm automatically adds package.json, license, and readme so you can leave them out of the files array. |
||
|
|
c5b51f6158
|
Add Export Maps (#5830)
- added export maps to all the @uppy packages . - imports remain unaffected except for peerDep packages in `@uppy/react` `@uppy/svelte` and `@uppy/vue3`. - export maps added for index files , css , and package.json. - Added side effects for all the packages. --------- Co-authored-by: Mikael Finstad <finstaden@gmail.com> Co-authored-by: Merlijn Vos <merlijn@soverin.net> |
||
|
|
7d6d90ba5c
|
Version packages
After manual releasing all packages as changesets messed things up |
||
|
|
4ccd3716af
|
[ci] release (#5849) | ||
|
|
0e178aea68
|
Deduplicate dependencies & resolve all yarn warnings (#5848)
- Deduplicate Vite versions, always use 7.x (except for sveltekit, which
does not allow 7 yet)
- Add missing dev deps
- Fix react-native requested deps versions
- Fix companion @types/node
- Fix "engines" in root package.json
No more yarn warnings 🎉
|
||
|
|
4408f7e3f2
|
Merge branch 'main' into 5.0
* main: @uppy/locales: update Czech translations (#5819) Add CLAUDE.md Trigger release CI Migrate from Cypress to Vitest Browser Mode (#5828) build(deps): bump multer from 1.4.4 to 2.0.2 (#5831) Migrate to changesets from custom release tooling (#5840) Fix turbo race condition (#5839) |
||
|
|
cb9673bc1e
|
uppy 5.0: remove stale plugins (#5834)
This PR removes `@uppy/store-redux` , `@uppy/redux-dev-tools` , `@uppy/progress-bar` , `@uppy/drag-drop` , `@uppy/file-input` , `@uppy/aws-s3-multipart` - **Source Removal** Removed source Dirs of packages, including all source code, styles, documentation, and build configurations. - **Bundle & Exports** Removed related exports from `packages/uppy/src/bundle.ts` and `index.ts`. Cleaned up dependencies from `uppy/package.json`. - **Framework Cleanup** Removed components and exports from: - `@uppy/react` - `@uppy/vue` - `@uppy/svelte` - `@uppy/angular` - **Dependency Cleanup** Removed references across all `package.json`, `peerDependencies`, `tsconfig.*.json`, and `turbo.json` files. - **Example Updates** - Updated Angular example and `private/dev/DragDrop.js` - Removed deprecated plugin usage - Cleaned example dependencies - **Style Cleanup** Removed CSS imports from `packages/uppy/src/style.scss` and `examples/angular/src/styles.css`. Fixed TypeScript project references. - **Migration Guide** Updated `.github/MIGRATION.md` |
||
|
|
0525a2c91a
|
Fix turbo race condition (#5839)
Closes #5822 - `"^build"` makes sure dependencies of the package are build first. - Make dependencies of @uppy/components actually dependencies - Remove concurrency setting. It was too high for computers with low RAM. |
||
|
|
8d312a8551
|
Resolve @uppy/core yarn install warnings (#5826)
Closes #5774 There are still some warnings left but they are better done in their own PRs as they require bigger changes. --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> |
||
|
|
7c609a56d9
|
Use turbo for all unit tests (#5815)
- Upgrade vitest from 1.x to 3.x. - Fix some tests that now became more strict and started failing - Add test command to all packages + needed dependencies - Add turbo config for running tests Another PR will completely redo the e2e test suite. |
||
|
|
271db86ad0
|
Use turbo for building and watching concurrently (#5808)
- Add `typecheck` command to all packages. - Use turbo to build and watch concurrently with caches. - Remove root `bin/` folder with last global scripts - `bin/companion.sh` -> `@uppy/companion/start-dev` (`yarn start:companion` still works) - `bin/build-components.mjs` -> `@uppy/components/migrate.mjs` (`yarn migrate:components` can be used to run it). This only needs to be ran for new components, not changing existing ones, so that's why it's not part of the build process. turbo is smart enough to build dependencies within a package first before building the package itself (e.g if wanting to build @uppy/audio, build @uppy/utils first). Unfortunately @uppy/core is a peer dep everywhere turbo does not take it into account, yet it must be build first to avoid race conditions. Therefor I added a turbo.json to each package, which you normally never need, but this is an odd case I suppose. Other solutions ran into cyclic dep errors. Another PR would move over the test commands to turbo too. |
||
|
|
78299475ae
|
Migrate from Eslint/Prettier/Stylelint to Biome (#5794) | ||
|
|
d408570373
|
From Babel to TS (#5792) | ||
|
|
c16657e075
|
Release: uppy@4.18.0 (#5796)
| Package | Version | Package | Version | | -------------------------- | ------- | -------------------------- | ------- | | @uppy/components | 0.2.0 | @uppy/remote-sources | 2.3.4 | | @uppy/core | 4.4.7 | @uppy/screen-capture | 4.3.1 | | @uppy/google-drive-picker | 0.3.6 | @uppy/svelte | 4.5.0 | | @uppy/google-photos-picker | 0.3.6 | @uppy/vue | 2.3.0 | | @uppy/locales | 4.6.0 | @uppy/webcam | 4.2.1 | | @uppy/provider-views | 4.4.5 | uppy | 4.18.0 | | @uppy/react | 4.4.0 | | | - meta: Remove remark reference from CI (Murderlon) - @uppy/components,@uppy/screen-capture: useScreenCapture fixes (Prakash / #5793) - examples: Add useRemoteSource (Merlijn Vos / #5778) - @uppy/components: Use webcam fixes2 (Mikael Finstad / #5791) - meta: Remove remark (Merlijn Vos / #5790) - meta: Delete old, unused files (Merlijn Vos / #5788) - meta: Sort package.json (Murderlon) - examples: Headless Hooks: Add useScreenCapture (Prakash / #5784) - @uppy/locales: Update pt_BR localization (Gabriel Pereira / #5780) - e2e: Skip for now then (Murderlon) - e2e: fixup! Fix CI for now (Murderlon) - e2e: Fix CI for now (Murderlon) - examples: Add useWebcam (Merlijn Vos / #5741) - @uppy/react,@uppy/svelte,@uppy/vue: Add useDropzone & useFileInput (Merlijn Vos / #5735) - meta: build(deps): bump base-x from 3.0.9 to 3.0.11 (dependabot[bot] / #5772) - @uppy/provider-views: improve metadata handling in Google Photos Picker (ben rosenbaum / #5769) |
||
|
|
cb2999926b
|
Add useRemoteSource (#5778) | ||
|
|
b0e69cf7ce
|
Headless Hooks: Add useScreenCapture (#5784) | ||
|
|
7d807e6d5e
|
Add useWebcam (#5741)
Co-authored-by: Mikael Finstad <finstaden@gmail.com> |
||
|
|
5c0c831937
|
Add useDropzone & useFileInput (#5735)
Co-authored-by: Mikael Finstad <finstaden@gmail.com> |