Skip to content

Commit

Permalink
Merge branch 'master' into rtl
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Jan 4, 2021
2 parents 113ae46 + 1227110 commit 8d9f1cf
Show file tree
Hide file tree
Showing 104 changed files with 2,173 additions and 166 deletions.
50 changes: 42 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,54 @@ Please add your entries in this format:

In the current stage we aim to release a new version at least every month.

## December 2020
## January 2021

### next

Planned: 2020-12-18

- [ ] companion: configurable oauth 3rd party credentials — provide your own Google Drive, Instagram application key/secret at the time of the request (@ife)
- [ ] dashboard: Add a `disabled` (`true`||`false`) option (later for /dragndrop and fileinput) (#1530, @arturi)
- [ ] goldenretriever: confirmation before restore, add “ghost” files #443 #257 (@arturi)
- [ ] add Svelte integration (@ajkachnic)
- [ ] dashboard: support for right-to-left languages (Arabic, Hebrew) (@arturi, @goto-bus-stop)
- [ ] react: add useUppy() hook (@goto-bus-stop)
- [ ] dashboard: support for right-to-left languages (Arabic, Hebrew) (@goto-bus-stop)

## December 2020

### 1.24.0

## 1.23.3
Released: 2020-12-23

This release adds new Svelte wrapper components, a React FileInput component, and an `autoOpenFileEditor` option for the Dashboard.

| Package | Version | Package | Version |
|-|-|-|-|
| @uppy/aws-s3-multipart | 1.8.10 | @uppy/progress-bar | 1.3.22 |
| @uppy/aws-s3 | 1.7.4 | @uppy/provider-views | 1.9.2 |
| @uppy/box | 0.3.2 | @uppy/react | 1.11.0 |
| @uppy/companion-client | 1.7.0 | @uppy/robodog | 1.10.0 |
| @uppy/companion | 2.4.0 | @uppy/screen-capture | 1.0.11 |
| @uppy/core | 1.15.0 | @uppy/status-bar | 1.8.1 |
| @uppy/dashboard | 1.14.0 | @uppy/svelte | 0.1.1 |
| @uppy/drag-drop | 1.4.22 | @uppy/thumbnail-generator | 1.7.3 |
| @uppy/dropbox | 1.4.20 | @uppy/transloadit | 1.6.16 |
| @uppy/facebook | 1.1.20 | @uppy/tus | 1.8.2 |
| @uppy/file-input | 1.4.20 | @uppy/unsplash | 0.1.4 |
| @uppy/form | 1.3.23 | @uppy/url | 1.5.14 |
| @uppy/golden-retriever | 1.3.22 | @uppy/utils | 3.3.0 |
| @uppy/google-drive | 1.5.20 | @uppy/vue | 0.1.2 |
| @uppy/image-editor | 0.2.0 | @uppy/webcam | 1.8.2 |
| @uppy/informer | 1.5.14 | @uppy/xhr-upload | 1.6.8 |
| @uppy/instagram | 1.4.20 | @uppy/zoom | 0.1.9 |
| @uppy/onedrive | 1.1.20 | uppy | 1.24.0 |

- @uppy/svelte: add Svelte integration (#2671 / @ajkachnic, @adammedford)
- @uppy/core: new event `files-added` with all files added in one batch (#2681 / @arturi)
- @uppy/react: add useUppy() hook (#2666 / @goto-bus-stop)
- @uppy/react: add FileInput component to React (#2706 / @ajkachnic)
- @uppy/status-bar: corrected StatusBar types (#2697 / @ajkachnic)
- @uppy/utils: Add archive mime types (#2703 / @ahmedkandel)
- @uppy/dashboard: add autoopen for file editors (@uppy/image-editor) (#2681 / @arturi)
- meta: use `tusd.tusdemo.net` (#2691 / @goto-bus-stop)

### 1.23.3

Released: 2020-12-11

Expand Down Expand Up @@ -58,7 +92,7 @@ And thanks to @elkebab, Norwegian (bokmål) translations are now available!

## November 2020

## 1.23.2
### 1.23.2

Released: 2020-11-27

Expand Down
49 changes: 24 additions & 25 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/build-lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const stat = promisify(fs.stat)

const SOURCE = 'packages/{*,@uppy/*}/src/**/*.js'
// Files not to build (such as tests)
const IGNORE = /\.test\.js$|__mocks__|companion\//
const IGNORE = /\.test\.js$|__mocks__|svelte|companion\//
// Files that should trigger a rebuild of everything on change
const META_FILES = [
'babel.config.js',
Expand Down
5 changes: 4 additions & 1 deletion bin/locale-packs.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ function buildPluginsList () {
for (const file of files) {
const dirName = path.dirname(file)
const pluginName = path.basename(dirName)
if (pluginName === 'locales' || pluginName === 'react-native' || pluginName === 'vue') {
if (pluginName === 'locales' ||
pluginName === 'react-native' ||
pluginName === 'vue' ||
pluginName === 'svelte') {
continue
}
const Plugin = require(dirName)
Expand Down
4 changes: 2 additions & 2 deletions examples/cdn-example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://releases.transloadit.com/uppy/v1.23.3/uppy.min.css" rel="stylesheet">
<link href="https://releases.transloadit.com/uppy/v1.24.0/uppy.min.css" rel="stylesheet">
</head>
<body>
<button id="uppyModalOpener">Open Modal</button>
<script src="https://releases.transloadit.com/uppy/v1.23.3/uppy.min.js"></script>
<script src="https://releases.transloadit.com/uppy/v1.24.0/uppy.min.js"></script>
<script>
const uppy = Uppy.Core({debug: true, autoProceed: false})
.use(Uppy.Dashboard, { trigger: '#uppyModalOpener' })
Expand Down
7 changes: 6 additions & 1 deletion examples/react-example/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const React = require('react')
const Uppy = require('@uppy/core')
const Tus = require('@uppy/tus')
const GoogleDrive = require('@uppy/google-drive')
const { Dashboard, DashboardModal, DragDrop, ProgressBar } = require('@uppy/react')
const { Dashboard, DashboardModal, DragDrop, ProgressBar, FileInput } = require('@uppy/react')

module.exports = class App extends React.Component {
constructor (props) {
Expand Down Expand Up @@ -93,6 +93,11 @@ module.exports = class App extends React.Component {
uppy={this.uppy}
hideAfterFinish={false}
/>

<h2>File Input</h2>
<FileInput
uppy={this.uppy}
/>
</div>
)
}
Expand Down
5 changes: 5 additions & 0 deletions examples/svelte-example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/node_modules/
/public/build/

.DS_Store
package-lock.json
3 changes: 3 additions & 0 deletions examples/svelte-example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `svelte-example`

More info coming soon...
37 changes: 37 additions & 0 deletions examples/svelte-example/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "@uppy-example/svelte-app",
"scripts": {
"build": "rollup -c",
"dev": "rollup -c -w",
"start": "sirv public",
"validate": "svelte-check"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^16.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^10.0.0",
"@rollup/plugin-typescript": "^6.0.0",
"@tsconfig/svelte": "^1.0.0",
"postcss": "^8.2.1",
"postcss-import": "^13.0.0",
"postcss-load-config": "^3.0.0",
"rollup": "^2.3.4",
"rollup-plugin-css-only": "^3.0.0",
"rollup-plugin-livereload": "^2.0.0",
"rollup-plugin-svelte": "^7.0.0",
"rollup-plugin-terser": "^7.0.0",
"svelte": ">=3.24.0",
"svelte-check": "^1.0.0",
"svelte-preprocess": "^4.6.1",
"tslib": "^2.0.0",
"typescript": "^3.9.3"
},
"dependencies": {
"@uppy/core": "^1.14.1",
"@uppy/svelte": "../../packages/@uppy/svelte",
"@uppy/webcam": "^1.8.1",
"@uppy/xhr-upload": "^1.6.7",
"sirv-cli": "^1.0.0"
},
"private": true
}
5 changes: 5 additions & 0 deletions examples/svelte-example/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
plugins: [
require('postcss-import')()
]
}
67 changes: 67 additions & 0 deletions examples/svelte-example/public/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
html,
body {
position: relative;
width: 100%;
height: 100%;
}

body {
color: #333;
margin: 0;
padding: 8px;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

a {
color: rgb(0, 100, 200);
text-decoration: none;
}

a:hover {
text-decoration: underline;
}

a:visited {
color: rgb(0, 80, 160);
}

label {
display: block;
}

input,
button,
select,
textarea {
font-family: inherit;
font-size: inherit;
-webkit-padding: 0.4em 0;
padding: 0.4em;
margin: 0 0 0.5em 0;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 2px;
}

input:disabled {
color: #ccc;
}

button {
color: #333;
background-color: #f4f4f4;
outline: none;
}

button:disabled {
color: #999;
}

button:not(:disabled):active {
background-color: #ddd;
}

button:focus {
border-color: #666;
}
17 changes: 17 additions & 0 deletions examples/svelte-example/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width,initial-scale=1'>

<title>Svelte app</title>

<link rel='icon' type='image/png' href='/favicon.png'>
<link rel='stylesheet' href='/global.css'>
<link rel='stylesheet' href='/build/bundle.css'>
<script defer src='/build/bundle.js'></script>
</head>

<body>
</body>
</html>
85 changes: 85 additions & 0 deletions examples/svelte-example/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import svelte from 'rollup-plugin-svelte'
import commonjs from '@rollup/plugin-commonjs'
import resolve from '@rollup/plugin-node-resolve'
import livereload from 'rollup-plugin-livereload'
import { terser } from 'rollup-plugin-terser'
import sveltePreprocess from 'svelte-preprocess'
import typescript from '@rollup/plugin-typescript'
import css from 'rollup-plugin-css-only'

const production = !process.env.ROLLUP_WATCH

function serve () {
let server

function toExit () {
if (server) server.kill(0)
}

return {
writeBundle () {
if (server) return
server = require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], {
stdio: ['ignore', 'inherit', 'inherit'],
shell: true
})

process.on('SIGTERM', toExit)
process.on('exit', toExit)
}
}
}

export default {
input: 'src/main.ts',
output: {
sourcemap: true,
format: 'iife',
name: 'app',
file: 'public/build/bundle.js'
},
plugins: [
svelte({
preprocess: sveltePreprocess({
postcss: true
}),
compilerOptions: {
// enable run-time checks when not in production
dev: !production
}
}),
// we'll extract any component CSS out into
// a separate file - better for performance
css({ output: 'bundle.css' }),

// If you have external dependencies installed from
// npm, you'll most likely need these plugins. In
// some cases you'll need additional configuration -
// consult the documentation for details:
// https://github.com/rollup/plugins/tree/master/packages/commonjs
resolve({
browser: true,
dedupe: ['svelte', '@uppy/core']
}),
commonjs(),
typescript({
sourceMap: !production,
inlineSources: !production
}),

// In dev mode, call `npm run start` once
// the bundle has been generated
!production && serve(),

// Watch the `public` directory and refresh the
// browser on changes when not in production
!production && livereload('public'),

// If we're building for production (npm run build
// instead of npm run dev), minify
production && terser()
],
watch: {
clearScreen: false
}
}
Loading

0 comments on commit 8d9f1cf

Please sign in to comment.